EEG Motor Imagery Decoding

Decoding imagined movements and mental commands from EEG, in three settings of increasing difficulty: per-subject decoding, decoding on participants never seen in training, and causal decoding of a live stream, one window at a time, for the NeurIPS 2026 EEG/EMG Foundation Challenge [1].

Streaming, sealed test set
0.753
PROTEUS, Challenge Track 2 [1]. Balanced accuracy, 3 classes
Cross-subject, 21 held-out participants
0.886
Dreyer2023 [2]. Balanced accuracy, 2 classes
Per subject, 87 subjects
0.727
Dreyer2023 [2]. Accuracy, 2 classes

Every number on this page is computed from the saved prediction dumps of the repository, whose README gives the commands that reproduce them.

PROTEUS: streaming decoding

The Challenge's Track 2 corpus has 10 participants, 14 sessions and 2,655 windows of 41 EEG channels. Each 4 s window carries one of three cued mental commands: kinesthetic motor imagery, mental subtraction or word generation. The scorer streams every session one window at a time, and the model predicts each window before it sees the next, so every statistic used at test time is causal. The score is balanced accuracy per (participant, session, interface) cell, averaged over cells. The sealed test set holds later sessions of the public participants and participants absent from the public release.

The submitted model blends 20 patch transformers with two tangent-space logistic regressions [3], one on time-delay covariances in five bands with slow potentials, one on region covariances. Each stream is aligned causally with Euclidean alignment [4], the blend is divided by the running mean of the stream's own predictions, and the linear members adapt their class means to the stream by prototype self-training.

Sealed-phase score of the five submissions

Each submission adds one change to the previous one. Hover a point for the change.

Table

Local cross-validation, step by step

Each row keeps every change of the rows above it and adds one more. Two protocols on the public data. New participant: leave one participant out over all ten, 28 cells. Later session: sessions 2 and 3 of participants 4 and 10, trained on everyone else plus that participant's earlier sessions, 8 cells. Mean over cells, bars are ± one standard error.

Table

Cell by cell

Compares two pipeline steps, picked below, on each (participant, session, interface) cell. Left: each point is one cell, placed at its score under From on the horizontal axis and under To on the vertical axis, so points above the diagonal are cells that To improves. Right: one bar per cell, its score under To minus its score under From, sorted. Bars above zero are cells that To improves.

Scores

Difference per cell, To minus From, sorted

Table

Dreyer2023: cross-subject motor imagery

Two-class motor imagery (left or right hand) from 87 subjects, 27 EEG channels at 512 Hz [2]. Participants 61 to 81 form the test set, 240 balanced trials each. Of the other 66, 14 are validation participants and 52 are fitting participants. No test participant contributes a trial or a label to training. The aligned members use per-participant Euclidean alignment [4], computed from each participant's own unlabeled trials.

Members, unaligned and aligned

EEG Conformer [5], EEGNet [6], the patch transformer, Riemannian tangent space [3] with Euclidean alignment or Riemannian recentering [7], and FBCSP [8]. Balanced accuracy, mean over the 21 test participants, bars are ± one standard deviation.

Table

Ensembles

Members are averaged uniformly. The subset is chosen on the validation participants' negative log-likelihood and shared by all test participants.

Table

Participant by participant

Compares two models or ensembles, picked below, on each of the 21 test participants. Left: each point is one participant, at its score under From on the horizontal axis and under To on the vertical axis, so points above the diagonal favor To. Right: one bar per participant, To minus From, sorted.

Scores

Difference per participant, To minus From, sorted

Table

Dreyer2023: per subject

Models are trained and tested per subject. The test set is the trailing, class-stratified 20% of the subject's session. The best checkpoint is selected on a single 80/20 split of the training portion. The final fit retrains on the whole training portion for the same number of steps.

EEGNet against EEG Conformer, per subject

Left: each point is one of the 87 subjects, at its EEG Conformer accuracy on the horizontal axis and its EEGNet accuracy on the vertical axis, so points above the diagonal favor EEGNet. Right: one bar per subject, EEGNet minus EEG Conformer, sorted.

Scores

Difference per subject, EEGNet minus EEG Conformer, sorted

Table

The patch transformer

The patch transformer is the network developed in this repository. It reads an EEG trial the way a vision transformer [9] reads an image: as a sequence of patches, each embedded by a convolution, then related to one another by self-attention [10]. Where EEGNet summarizes the trial by pooling, the patch transformer keeps a sequence of overlapping tokens and lets attention compare moments across the whole trial. Every size is set in milliseconds, so one configuration carries across sampling rates.

Architecture of the PROTEUS model

One 4 s window of 41 channels at 120 Hz in, three class probabilities out. 1.57M parameters.

EEG window

41 channels, 4 s at 120 Hz, aligned per participant.

Temporal convolutions

Kernels of 100, 200 and 400 ms, centered on the same patch, one output every 40 ms. 128 feature maps per channel.

Spatial convolution

Mixes all 41 channels into every feature map. Batch normalization, ELU. One 128-dimensional token per patch: 94 tokens.

Transformer encoder

Sinusoidal time positions, 2 layers, 8 heads, feed-forward width 256. The mean over tokens represents the trial.

Phase synchrony branch

Phase-locking value of every channel pair in 4-8, 8-13 and 13-30 Hz over 500 ms windows, averaged over the trial, projected to 128 dimensions. Dropped whole with probability 0.25 in training.

Classifier

The pooled tokens and the phase vector are concatenated, then a linear layer gives the three classes.

Tokens

A temporal convolution slides over each channel with a stride equal to the token spacing, so windowing and feature extraction happen in one step. Patches are 100 ms long and start every 40 ms, so neighboring patches overlap and an oscillation is never cut at a fixed boundary. The PROTEUS model runs three temporal convolutions in parallel, with kernels of 100, 200 and 400 ms centered on the same patch, each filling a third of the 128 feature maps, so one token describes the same moment at three time scales. A spatial convolution then mixes all channels into every feature map, as the depthwise layer of EEGNet does.

From signal to tokens

One channel of an illustrative 4 s window. Each tick marks where a patch starts. Hover or drag across the signal to pick a token and see the span of its three temporal kernels.

Encoder, phase branch and training

Fixed sinusoidal encodings mark the time position of each token, and a standard transformer encoder relates the tokens to one another. Their mean is the trial's representation. A second branch, with no learned filters, measures how consistently pairs of channels oscillate together: the phase-locking value of every channel pair, in three bands, whose imaginary part ignores the zero-lag coupling that volume conduction produces. It joins the network only at the classifier, and dropping it for a quarter of the training trials keeps the classifier from depending on it alone. Training adds a copy of every window with Gaussian noise at 50% of its standard deviation. The Dreyer2023 model keeps the same 100 ms patches at a 40 ms stride with a single kernel, 64 dimensions, 4 encoder layers and no phase branch, 0.31M parameters.

Overlapping tokens on Dreyer2023

The same unaligned model with 100 ms patches, at a 100 ms stride (40 tokens per trial) and a 40 ms stride (98 tokens). Left: each point is one of the 21 test participants, at its 100 ms score on the horizontal axis and its 40 ms score on the vertical axis, so points above the diagonal favor the 40 ms stride. Right: one bar per participant, 40 ms minus 100 ms, sorted.

Scores

Difference per participant, 40 ms minus 100 ms stride, sorted

Table

References

  1. "EEG/EMG Foundation Challenge 2026," Brain and Body Workshop at NeurIPS 2026, Track 2 (BCI decoding). Tracks and data.
  2. P. Dreyer, A. Roc, L. Pillette, S. Rimbert, and F. Lotte, "A large EEG database with users' profile information for motor imagery brain-computer interface research," Scientific Data, vol. 10, p. 580, 2023. DOI.
  3. A. Barachant, S. Bonnet, M. Congedo, and C. Jutten, "Multiclass brain-computer interface classification by Riemannian geometry," IEEE Transactions on Biomedical Engineering, vol. 59, no. 4, pp. 920-928, 2012.
  4. H. He and D. Wu, "Transfer learning for brain-computer interfaces: A Euclidean space data alignment approach," IEEE Transactions on Biomedical Engineering, vol. 67, no. 2, pp. 399-410, 2020.
  5. Y. Song, Q. Zheng, B. Liu, and X. Gao, "EEG Conformer: Convolutional transformer for EEG decoding and visualization," IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 31, pp. 710-719, 2023.
  6. V. J. Lawhern, A. J. Solon, N. R. Waytowich, S. M. Gordon, C. P. Hung, and B. J. Lance, "EEGNet: A compact convolutional neural network for EEG-based brain-computer interfaces," Journal of Neural Engineering, vol. 15, no. 5, p. 056013, 2018.
  7. P. Zanini, M. Congedo, C. Jutten, S. Said, and Y. Berthoumieu, "Transfer learning: A Riemannian geometry framework with applications to brain-computer interfaces," IEEE Transactions on Biomedical Engineering, vol. 65, no. 5, pp. 1107-1116, 2018.
  8. K. K. Ang, Z. Y. Chin, H. Zhang, and C. Guan, "Filter bank common spatial pattern (FBCSP) in brain-computer interface," in Proc. IEEE International Joint Conference on Neural Networks (IJCNN), pp. 2390-2397, 2008.
  9. A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, "An image is worth 16x16 words: Transformers for image recognition at scale," in Proc. International Conference on Learning Representations (ICLR), 2021.
  10. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, "Attention is all you need," in Advances in Neural Information Processing Systems 30 (NeurIPS 2017), 2017.