Long EEG. Any headset. One model.

SAMBA

Learn from long EEG across different headsets.

Jiazhen Hong · Geoffrey Mackellar · Soheila Ghane

SLinear time
EEG signals
Shared space
O(n)linear with sequence length
3Done space for every headset
TSR + DMlearn signals, reduce shared noise

01 / playground

Try the model.
Watch it change.

Move a slider. The visual updates beside it.

Live viewLong EEG
Visible50%
Shared space64 ch
Sequence length

15,360 time steps

Compared with the tested 120 s setting.

Transformer O(n²)
×1.0
SAMBA O(n)
×1.0
Shared log scale
Raw EEGMaskedReconstructed
Differential Mamba

Remove noise. Keep the EEG.

4 paired heads · 8 Mamba branches70% illustrative noise amplitude
Current outputUnderlying EEG

Illustration only. Move “Differential heads” to change noise amplitude; the underlying EEG stays fixed.

Resource trend

Measured → estimated

EstimatedPast reported resource points
GPU memory2,695 MB

Measured: 207 MB at 200; 1,438 MB at 2,000 steps.

Inference / sample0.48 ms

Measured: 0.28 ms at 200; 0.38 ms at 2,000 steps.

Solid: reported Dashed: estimated Last reported point

Solid lines use reported measurements. Dashed lines extend the trend; they are not new benchmarks. Paper ↗

02 / the model

Four steps.
One model.

Tap a step.

Self-supervision

Hide EEG spans

Hide part of the signal, then rebuild it.

Why

Learn the larger pattern.

ΔMamba
hidden EEGcontextrebuilt EEG
EPOC X · 14 ch
Pairwise 3D differenceΔ(x, y, z)MLP → softmax over input channelsXtarget = W Xinput
PhysioNet · 64 ch
Full modelOpen model code↗

03 / spatial mapping

Any headset.
One pretraining space.

3D coordinates map each headset into the same space.

Input headsetEPOC X · 14 chChoose a layout.
Input space14 channels
Simulated mappingAF3

Peak: Fp1 · 36.1%

Coordinate-distance proxy

Illustrative W column

Shared pretraining space64-channel target
LowHigh contribution

Simulation only · no checkpoint weights · repository coordinates; MN8 is schematic.

Real coordinatesOpen montage files↗

04 / results

What SAMBA
learns.

Pick a task to see where it focuses.

Cite SAMBABibTeX and plain text

Hong, J., Mackellar, G., & Ghane, S. (2026). SAMBA: Toward an EEG Foundation Model via Differential Mamba and Coordinate-Driven Spatial Embedding. NeurReps 2026 Proceedings Track.