A decoder trained on one subject rarely survives contact with the next. Electrode impedance, montage placement, anatomy, alertness and session-to-session drift all shift the feature distribution, and a model with no mechanism to account for that shift transfers badly — which is why cross-subject accuracies in the literature sit so far below within-subject ones.
Domain adaptation is the family of methods that addresses the shift directly, by aligning source and target distributions rather than hoping the model generalises. In BCILattice they are blocks on the ML Suite canvas, and they are free on every plan.
The adaptation blocks
Alongside them sits a Domain Incremental Learning family for the continual-learning case, where new subjects or sessions arrive over time rather than all at once.
| Block | What it does |
|---|---|
| CORAL Adapter | Aligns the second-order statistics — the covariance — of the source and target feature distributions. |
| MMD Aligner | Minimises maximum mean discrepancy between source and target, a kernel-based distribution distance. |
| Transfer Component Analysis | Learns a shared subspace in which the marginal distributions of the two domains are close. |
| DANN Discriminator | Adversarial domain-adversarial training: a discriminator tries to tell the domains apart, the encoder learns features it cannot. |
| Feature Alignment | Direct alignment of feature-space statistics between domains. |
| Subject Adaptation | Subject-specific adaptation of a model trained across a cohort. |
Not an upsell
One hundred and eighteen of the 119 blocks in the catalogue are free on every plan, and the domain adaptation family is among them. So are continual learning, federated averaging, conformal prediction, neural architecture search and the reinforcement learning trainers.
The single gated block is Custom Code, which executes arbitrary Python you supply.
Adaptation makes the evaluation harder, not easier
A cross-subject claim requires a grouped split: the target subject must be wholly absent from training. Any leakage of target trials into the training fold turns a transfer result into a within-subject one wearing the wrong label.
The Results validation tab infers the grouping from the run and states which comparisons the design supports. If the split does not license a cross-subject claim, the result is still listed with its real number and a flag rather than being quietly presented as transfer.
When to reach for it
Cross-subject decoding
A model that must work on a subject who contributed no training data.
Cross-session
The same subject on a different day, with a re-mounted cap and different impedances.
Cross-device
Recordings from two acquisition systems in one cohort, where the shift is instrumental as well as physiological.
fNIRS especially
Between-subject variability in optode coupling and placement is large, which is why fNIRS models transfer worse than EEG ones by default.
Questions
Which domain adaptation method should I try first?
CORAL, usually. It aligns covariance, needs no adversarial training, is cheap to run, and gives you a baseline transfer number before you invest in a DANN setup that is harder to tune.
Do I need labelled target data?
It depends on the method. CORAL, MMD and TCA align distributions and can work with unlabelled target data; subject adaptation and supervised fine-tuning need labels from the target. The block you choose determines the answer.
Does domain adaptation work for fNIRS as well as EEG?
Yes, and it matters more there. fNIRS between-subject variability from optode placement and coupling is substantial, so a within-subject model transfers poorly without alignment.
How do I report a cross-subject result honestly?
Use a grouped split with the target subject wholly held out, evaluate with nested cross-validation if you tuned anything, and report the per-fold scores rather than only the mean. The validation tab checks all three against the run design.
Read the reference
Related
EEG Machine Learning
A node canvas of 119 blocks covers the pipeline from design matrix to evaluation — and the evaluation half is built to make an inflated score hard to produce by accident.
Deep Learning for BCI and EEG
The published BCI architectures, the sequence models and the transformers are blocks on a canvas. Training runs on your machine against your own GPU.
fNIRS Machine Learning
The model canvas is the same one EEG uses. What changes for fNIRS is which features carry information at 10 Hz, how the chromophore enters the design matrix, and how little a small cohort forgives a bad split.
Reproducible BCI Research
A methods section is a summary written from memory weeks after the run. A study that carries its own stages, parameters and fold scores is the run itself.