PHASE 01 / EXPLORATION
DREAMER Dataset N=23 Subjects Β· 14-ch EEG + 2-ch ECG Signal Processing & ML

Emotion Recognition via EEG & ECG

I tested whether AI could read emotions (happy vs sad, calm vs excited) from brain waves and heart signals. While many research papers claim high accuracy, my audit proved those models are barely better than a coin flip (~55%) when tested on new people. The AI wasn't reading real emotionsβ€”it was just memorizing which movie clip was playing.

Dataset
DREAMER Public Benchmark
People Tested
23 Participants (14M / 9F)
Sensors
14 Brain Sensors + Heart ECG
The Big Finding
AI Was Memorizing Movie Clips

The Big Question: Can Wearables Truly Read Your Mood?

Many tech companies and research papers claim AI can detect how you feel using heart and brain sensors. To test whether this claim holds up in the real world, I built an AI model using a benchmark dataset (DREAMER) where participants watched emotional movie clips while wearing sensors.

The Reality Check: When tested fairly on new people the model had never seen before, its accuracy collapsed to near coin-flip levels (52% to 57%). The models completely failed to transfer across different humans.

Why Does Emotion AI Struggle?

Can physical body signals (heartbeats and brain waves) reliably decode how someone is feeling without calibrating to each person individually first?

And when the AI fails, what is the real reason?

Dataset Specifications

Parameter Specification Notes
Dataset Source DREAMER (Katsigiannis & Ramzan, 2018) Public benchmark affective dataset
Participants (N) 23 Healthy Adults (14 Males, 9 Females) Aged 22–33 years
EEG Modality 14-Channel Emotiv EPOC Wireless EEG 128 Hz sampling, AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, AF4
ECG Modality 2-Channel SHIMMER Wireless ECG 256 Hz sampling rate, Lead I & Lead II placement
Stimuli Protocol 18 Film Clips (65–393 seconds duration) Targeting 9 distinct emotional quadrants
Ground Truth Labels Self-Assessment Manikin (SAM) Scale (1 to 5) Valence, Arousal, and Dominance ratings

Signal Acquisition & Processing Pipeline

STEP 01
Preprocessing & Denoising
EEG bandpassed at 4.0–45.0 Hz using 4th-order zero-phase Butterworth filter; ocular artifact rejection. ECG filtered (0.5–40 Hz) and baseline-wander removed via median subtraction.
STEP 02
Feature Extraction
Extracted Power Spectral Density (PSD) and Differential Entropy (DE) across Theta (4-8Hz), Alpha (8-13Hz), and Beta (14-30Hz) bands. ECG R-peak detection extracted RR intervals, RMSSD, and LF/HF power ratio.
STEP 03
Classification Models
Benchmarked Support Vector Machines (RBF kernel), Random Forests, and Gradient Boosted Classifiers across binary high/low valence and arousal splits.
STEP 04
Validation Protocol
Evaluated via both Leave-One-Trial-Out (within-subject) and Leave-One-Subject-Out (LOSO cross-subject) schemes to expose generalization degradation.

Experimental Audit: 30s Trajectories, Snapshot Windows & Confound Baselines

Both experiments completed on the 14 training subjects (252 trials from 18 stimuli). No validation or test subjects were used for feature extraction or modeling. The duration audit passed for all 252 trials, with zero alignment failures and zero feature-build errors. Stage 05 marked 253 of 414 trials for EEG review, but recommended excluding none. All available training windows were eligible for EEG, ECG, and fusion. The 500 Β΅V review flag appeared in 438 Experiment A windows and 133 Experiment B snapshots; it did not exclude them.

Experiment A: 30-Second Trajectory Windows

Later windows have fewer trials as clips end: sample support drops from 252 trials at 0–30 seconds down to 14 trials at 360–390 seconds. No Valence model produced out-of-fold predictions for that final window, and Dominance balanced accuracy was undefined there because observed labels contained only one class.

Across defined window positions, median balanced accuracy ranged from 0.426 to 0.576 across target, modality, and model combinations. These are descriptive medians across windows, not pooled performance estimates.

Target Modality Logistic Regression median [range] Random Forest median [range]
Valence EEG 0.571 [0.354–0.694] 0.561 [0.490–0.644]
Valence ECG 0.460 [0.406–0.554] 0.505 [0.452–0.588]
Valence EEG + ECG (Fusion) 0.570 [0.315–0.657] 0.576 [0.488–0.612]
Arousal EEG 0.500 [0.319–0.615] 0.506 [0.459–0.582]
Arousal ECG 0.426 [0.268–0.675] 0.483 [0.371–0.591]
Arousal EEG + ECG (Fusion) 0.521 [0.319–0.602] 0.506 [0.446–0.619]
Dominance EEG 0.536 [0.379–0.658] 0.518 [0.425–0.569]
Dominance ECG 0.485 [0.406–0.712] 0.499 [0.393–0.674]
Dominance EEG + ECG (Fusion) 0.526 [0.378–0.681] 0.510 [0.455–0.584]

Experiment B: Equal-Duration Snapshots (Early, Middle, Late)

All three temporal regions (Early, Middle, Late) had 14 subjects, 252 trials, and 18 stimuli. Illustrative exploratory point estimates were:

  • Valence (Middle / EEG / LogReg): 0.600 (95% participant-bootstrap CI: 0.553–0.644)
  • Arousal (Early / EEG+ECG / Random Forest): 0.566 (95% CI: 0.517–0.612)
  • Dominance (Middle / EEG / Random Forest): 0.613 (95% CI: 0.554–0.675)
Fig. 01 Β· Dominance Β· Random Forest Snapshots (Early, Middle, Late)
N=14 Subjects Β· 252 Trials
Dominance Β· Random Forest snapshots across Early, Middle, Late regions
Balanced accuracy (95% CI) across Early, Middle, and Late stimulus snapshots for EEG, ECG, and EEG+ECG. Integrity check confirms 0 of 1,242 Holm-adjusted contrasts reached significance, while the non-physiological clip-only baseline reached 0.83 (Valence), 0.72 (Arousal), and 0.75 (Dominance).
Statistical Correction Audit: No paired temporal comparison survived Holm multiplicity correction: 0 of 1,242 comparisons with finite adjusted p-values. For example, while the early-minus-middle Dominance difference for EEG Random Forest was −0.122 with a raw p = 0.004, its Holm-adjusted p-value rose to p = 0.191. The empirical results do not establish that any temporal region performs better than chance.

Confound Baselines: The Decisive Alternative Explanation

Evaluating non-physiological confound baselines revealed the underlying mechanism of apparent classifier predictive capacity:

Baseline Model Valence BA [95% CI] Arousal BA [95% CI] Dominance BA [95% CI] Interpretation
Clip-Only Baseline 0.828 [0.783–0.878] 0.718 [0.670–0.768] 0.755 [0.702–0.814] Massively exceeds physiological models
Duration-Only Baseline 0.491 0.534 0.617 [0.577–0.654] Near chance for Valence/Arousal; modest Dominance bias
Global Majority Baseline 0.500 0.500 0.500 Theoretical chance floor
Subject-Majority Oracle ~0.59–0.60 ~0.59–0.60 ~0.59–0.60 Descriptive only; not a new-participant predictor
Best Multimodal Physiology 0.576 [0.488–0.612] 0.521 [0.319–0.602] 0.526 [0.378–0.681] Falls far short of stimulus clip predictor

Why this matters: A simple model that only guessed based on which movie clip was playing (without looking at heartbeats at all) scored 83% accuracy! This proved that past papers claiming high AI accuracy were just memorizing the movie clips, not actually reading human biology.

Why Emotion AI Broke Down

When testing the AI on new people who hadn't been in the training data, its accuracy collapsed. Two people can watch the exact same horror clip: one person feels thrilled, while another person feels bored. Because two people feel completely different things watching the same clip, the AI has no way to learn a single "correct" answer.

The Trap in Previous Research: When researchers test AI on the same people who watched the clips before, the AI just memorizes the video itself. But the second you test a new person, the illusion breaks down.

What I Learned: You Can't Grade Feelings with a Number Scale

"I started out trying to build a better emotion AI. I ended up discovering that the AI was just memorizing movie clips, not reading real human feelings."

In health AI, the hardest problem isn't writing fancy machine learning code. The hardest problem is that human feelings are subjective. Asking strangers to score their emotions on a 1-to-5 number scale produces messy, inconsistent data that AI cannot reliably learn.

Scope of Validity & Formal Caveats

How This Led to Phase 02

Transition to Phase 02: DIY ECG Monitoring System

If the core flaw was relying on noisy labels and stimulus artifacts from anonymous dataset subjects, the solution was clear: become both the subject and the observer. I decided to build my own analog ECG acquisition system from scratch to study my own physiology under continuous, known protocols.

Explore Phase 02 Case Study

Output Tables & Audit Logs

Artifact Description Local File Reference Audit Content
Experiment A Results outputs/temporal/experiment_a_results_table.csv Full 30s trajectory results by window position, modality, target, and model
Experiment B Results outputs/temporal/experiment_b_results_table.csv Early, Middle, Late snapshot results across 14 training subjects and 252 trials
All Metrics & Baselines outputs/temporal/temporal_performance.csv Clip-only (0.828), duration-only, global-majority, and subject-majority performance
Multiplicity Corrections outputs/temporal/paired_temporal_comparisons.csv 1,242 paired comparisons with raw and Holm-adjusted p-values (0 survived)
Duration-Feature Audit outputs/temporal/duration_feature_audit.csv Trial-level and stimulus-level correlation logs
Window Eligibility outputs/temporal/window_eligibility_by_position.csv Sample support decay logs (252 trials at 0–30s β†’ 14 at 360–390s)
Out-of-Fold Predictions outputs/temporal/temporal_oof_predictions.csv Subject-held-out cross-validated predictions table