Learning aligned EEG representations with subject-specific encoders

Bruna J. Lopes, Gabriel Schwartz, Sylvain Chevallier, Raphael Y. de Camargo, Bruno AristimunhaarXiv 2026

TL;DR

Cross-subject EEG decoding is notoriously difficult due to the massive brainwave variations between different individuals. This paper demonstrates that replacing a single shared neural network encoder with subject-specific encoders—or ultra-lightweight low-rank adapters—allows the model to automatically internalize and solve this alignment problem through architecture alone. This approach matches or outperforms traditional explicit domain adaptation techniques while using only a handful of parameters per subject.

What Problem Does This Paper Address?

When training deep learning models for Brain-Computer Interfaces (BCIs), pooling electroencephalography (EEG) data from multiple people seems like an obvious way to overcome data scarcity. However, individual differences in neuroanatomy, skull thickness, and cognitive states create massive "domain shifts" between subjects.

As shown in the paper, the between-subject gap is far larger than the session-to-session gap for a single person:

Figure 1. The between-subject domain gap is larger than the within-subject one. Two-dimensional projection of raw spatial-covariance features; marker shape encodes class (circle = left hand, cross = right hand). The two panels use different colour pairs because they compare different things. (A) Within-subject: the two sessions of one subject, coloured by the source/target role (orange source session 1 →purple target session 2). The sessions overlap heavily; the within-subject covariate shift, while non-zero, is small. (B) Between-subject: two different subjects (subject 1 and subject 3), each shown in its own subject colour. The two clouds are clearly separated, even though both subjects performed the same motor-imagery task with the same recording montage. This between-subject separation is the source of the negative-transfer problem motor-imagery decoders face when trained on pooled multi-subject data, and motivates both the alignment and architectural strategies developed in Sections 2.2–3.6.

This variance often leads to negative transfer, where adding data from other people actually degrades the model's performance on a new user. Traditional pipelines mitigate this using Euclidean Alignment (EA) to rigidly recenter everyone's covariance matrices during preprocessing. The authors of this paper investigate a compelling alternative: Can we skip manual preprocessing and force the neural network's architecture to learn these subject-specific alignments natively?

Methods

The authors introduce a multi-head hybrid architecture. Instead of routing all subjects through a single shared feature encoder, they give each training subject their own encoder head (or "branch") that projects their raw EEG data into a shared latent space, which then feeds into a common classifier.

They evaluate two versions of this subject-specific module:

  1. +hybrid: A full-capacity encoder backbone duplicated for each subject.
  2. +adapter: An ultra-parameter-efficient low-rank adapter (rank $r \in \{1, 2, 4, 8, 16\}$) that applies a simple channel-wise transformation ($X + UkDkX$) to the raw data. This requires only $2Cr$ parameters (where $C$ is the number of channels)—amounting to just tens of parameters per subject.
Figure 2. Overview of the proposed adaptation strategy for unseen subjects. After training the multi-head model, each subject-specific encoder is combined with the shared classifier to form an individual initialization candidate. These candidate models are evaluated using calibration data from the target subject, and the best-performing initialization is selected for further fine-tuning.

For unseen target subjects, they use a low-calibration approach: they pass a brief 48-trial calibration session through all available source heads, select the head that performs best on that data, and then fine-tune that specific head for the new subject.

Datasets

The approach was benchmarked across four distinct public motor-imagery and motor-execution datasets available via the Mother of All BCI Benchmarks (MOABB):

  • BNCI2014-001: 4-class motor imagery (left hand vs. right hand subset used), 9 subjects.
  • BNCI2015-001: Right hand vs. feet motor imagery, 12 subjects.
  • Schirrmeister2017 (High-Gamma): Motor execution dataset, 13 subjects analyzed.
  • Weibo2014: Motor imagery dataset, 10 subjects.

Key Insights and Ideas

  • Substitutability of EA and Architecture: The most striking finding is that subject-specific encoders and Euclidean Alignment are functionally substitutable. While EA is vital for standard shared encoders (reducing validation loss by 33%), removing EA from the hybrid model has almost no impact on final loss or latent space organization. The architecture completely internalizes EA's alignment role.
  • Extreme Parameter Efficiency: You don't need to duplicate the entire network to capture subject quirks. A low-rank adapter with a rank as low as $r=1$ or $2$ performs just as well as duplicating the entire encoder backbone, proving that subject-specific variations can be modeled as simple low-rank corrections.
  • Manifold Specialization: Subject-specific heads significantly sharpen class distinctiveness for their respective subjects. They learn to map each individual cleanly onto their own latent manifold while keeping the final classification boundaries well-aligned.

Key Results

  • Baseline EA Gains: On standard shared encoders, explicit Euclidean Alignment provided a massive boost, yielding median accuracy improvements of +6.6 to +7.8 percentage points across three popular backbones (EEGNet, AttentionBaseNet, and CTNet).
  • Adapter Performance: The proposed low-rank adapter (+adapter) with rank $r=2$ achieved a mean balanced accuracy of 75.9% (EEGNet), 74.1% (CTNet), and 75.6% (AttentionBaseNet) across the datasets. This matched or beat the full hybrid model while compressing the per-subject module by two to three orders of magnitude.

Limitations and Future Work

  • The Deployment Bottleneck: Adapting to a completely unseen subject still requires a calibration session (48 trials) to select and fine-tune a head. If the head-selection policy picks a sub-optimal head, performance drops compared to an ideal "oracle" selection.
  • Subject Heterogeneity: The authors note that some subjects are "consistently hard" across all configurations, likely due to poor underlying signal quality, which architectural changes alone cannot fix.
  • Future Directions: Promising next steps include developing better non-oracle head selection algorithms, exploring calibration-free test-time adaptation, and investigating whether this head specialization can improve long-term temporal robustness across multiple sessions for the same user.

Summary updated

BibTeX
@misc{lopes2026learning,
  author = {Bruna J. Lopes and Gabriel Schwartz and Sylvain Chevallier and Raphael Y. de Camargo and Bruno Aristimunha},
  title = {{Learning aligned EEG representations with subject-specific encoders}},
  year = {2026},
  eprint = {2606.16462},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.16462},
}
Figure