Cells, brains & medicine

EEG Decoding

Develop AI models that interpret electrical brain signals across multiple clinical and brain–computer interface tasks, generalizing to unseen subjects.

A shared EEG model for five classification tasks
  1. Scalp EEG recordings

    Each trace represents one scalp channel, such as Fp1 or Pz.

  2. Shared EEG encoder

    Encode multiple channels in a shared representation.

  3. Task-specific predictions
    Brain states and events
    Emotion, EEG events and clinical group
    Brain–computer interface
    Motor imagery and eye state

Results

Score breakdown

The Task

What is Brain–Computer Interface Decoding?

The brain produces electrical activity when neurons communicate. Electroencephalography (EEG) uses electrodes on the scalp to record how voltage changes over time.

Brain–computer interface (BCI) decoding uses these signals to infer a brain state, intended action, or clinically relevant condition. For example, EEG can help distinguish imagined left- and right-hand movements or identify abnormal EEG events.

  1. EEG recording

    Person wearing an EEG cap with scalp electrodes
    Example traces from EEG channels Fz, C3, Cz, and C4
    62 channels × 800 samples · 4 s at 200 Hz
  2. EEG representation

    Example spectrogram
    Frequency (Hz)
    Spectrogram showing changes in EEG frequency content over four seconds
    Time (s)
  3. EEG model

    AkChannel adapter
    FθShared backbone
    HkTask classifier
  4. Example prediction

    Imagined movement
    Left hand
    0.93
    Right hand
    0.07

Predicting Brain States from EEG

The model takes a short EEG recording with C channels and T time samples. For example, a 4-second recording from 62 channels sampled at 200 Hz has 800 time samples per channel.

X∈ℝC×T, X∈ℝ62×800 in this example

For a task with K classes, the model predicts one probability per class. In left-versus-right motor imagery, those probabilities correspond to the two imagined movements.

fθ(X)⟶𝐩^∈[0,1]K

EEG signals vary across people, recording devices, electrode arrangements, and tasks.

What the Agent Develops

The agent develops one EEG model that learns from four datasets and generalizes to previously unseen subjects. The tasks use different channel layouts and prediction targets, and share one jointly trained backbone.

𝐳=Fθ(Ak(X)), 𝐩^k=Hk(𝐳)

For task k, adapter Ak handles its channel layout, backbone Fθ learns a shared EEG representation, and classifier Hk predicts its classes.

The agent may redesign the architecture, signal preprocessing, representations, training objectives, and optimization methods. Joint training can start from scratch or from the benchmark’s approved CBraMod[3] or CodeBrain[5] initialization checkpoints. The benchmark excludes other pretrained weights.

Data & Prediction Tasks

The benchmark uses four EEG datasets for classifying clinical groups, EEG events, imagined movement, and resting states. Model inputs are standardized to 200 Hz. Channel counts and window lengths vary by task.

DatasetPrediction taskInput per sampleTrain / validation / test
TUEV[6]Six clinical EEG event classes16 channels × 5 s
16×1000 samples
68,445 / 15,487 / 29,421
AD65[7]Alzheimer’s disease, frontotemporal dementia, or healthy control19 channels × 10 s
19×2000 samples
3,774 / 1,343 / 1,376
OpenBMI[8]Imagined left- or right-hand movement62 channels × 4 s
62×800 samples
12,800 / 4,400 / 4,400
Longitudinal[9]Eyes-open or eyes-closed resting state58 channels × 2 s
58×400 samples
28,523 / 8,418 / 10,028

Counts are EEG windows or trials.

Training and Evaluation

The model trains jointly on the four training splits. Validation data guide model selection. Test data contain held-out subjects or patients.

For each EEG window, the model outputs probabilities for 6, 3, 2, or 2 classes, depending on the task. The evaluation measures how well the shared representation transfers to new people and recording sessions.

Evaluation

Classification Accuracy

Balanced accuracy (BA) measures the average recall across classes. Each class contributes equally, regardless of how often it occurs in the data.

BA=1K ∑c=1K TPcTPc+FNc

For class c, TPc counts correct predictions of that class and FNc counts its missed examples.

TaskEvaluation
TUEVBalanced accuracy on held-out patient EEG events.
AD65Average window probabilities per patient, then calculate patient-level balanced accuracy.
OpenBMICalculate balanced accuracy per subject, then average across subjects.
LongitudinalCalculate accuracy per recording session, average sessions within each subject, then average across subjects.

Overall Scoring

Each task’s accuracy mk, computed as described above, is adjusted relative to the chance level for its Kk classes.

sk= mk−1/Kk1−1/Kk

A normalized task score of 0 is chance-level accuracy and 1 is perfect classification. The benchmark averages the four task scores equally and clips the result to [0, 1].

Overall Score= clip[0,1](14∑k=14sk)

An earlier protocol also included FACED and averaged the five chance-normalized scores.

References

  1. [1] Lawhern, V. J. et al. EEGNet: a compact convolutional neural network for EEG-based brain–computer interfaces. Journal of Neural Engineering (2018).
  2. [2] Yang, C. et al. Self-supervised EEG Representation Learning for Automatic Sleep Staging. arXiv (2021).
  3. [3] Wang, J. et al. CBraMod: A Criss-Cross Brain Foundation Model for EEG Decoding. ICLR (2025).
  4. [4] Yang, C., Westover, M. B. & Sun, J. BIOT: Biosignal Transformer for Cross-data Learning in the Wild. NeurIPS (2023).
  5. [5] Ma, J. et al. CodeBrain: Bridging Decoupled Tokenizer and Multi-Scale Architecture for EEG Foundation Model. ICLR (2026).
  6. [6] National Engineering Research and Development Center. Temple University Hospital EEG Events Corpus.
  7. [7] Miltiadous, A. et al. A Dataset of Scalp EEG Recordings of Alzheimer’s Disease, Frontotemporal Dementia and Healthy Subjects from Routine EEG. Data (2023). OpenNeuro dataset.
  8. [8] Lee, M.-H. et al. EEG dataset and OpenBMI toolbox for three BCI paradigms. GigaScience (2019). GigaDB dataset.
  9. [9] Isaza, V. H. et al. Longitudinal EEG Test-Retest Reliability in Healthy Individuals. OpenNeuro.