Brain-computer interfaces (BCIs) decode neural activity to restore lost function. Typically, training a high-performance neural decoder requires a large labeled dataset to be collected from every new subject. One way to reduce the labeled data cost is self-supervised pretraining, which learns general neural representations from unlabeled recordings that accumulate across subjects. However, for intracranial electroencephalography (iEEG) recordings, self-supervised learning has been challenging due to differences in contact placement and neuroanatomy between subjects. We propose MAPA, an otherwise vanilla masked autoencoder with two spatial encodings, an anatomical region embedding and a relative positional encoding, which together enable it to learn neural representations that transfer to unseen subjects and across various tasks. MAPA sets a new state of the art across all three regimes of the Neuroprobe benchmark without fine-tuning: within-session, cross-session, and cross-subject. In the cross-subject regime, a linear probe on MAPA's features needs only ∼164 labeled trials to reach the accuracy that takes 3,500 without pretraining. Our results show that self-supervised pretraining can scale across heterogeneous iEEG recordings and reduce the labeled data needed for accurate decoding in new subjects.
Figures & tables
Figure 1: Two spatial properties shared across subjects. (a) Arrays with differing placement across subjects sample the same neuroanatomical regions. (b) The same pattern of activity falls at different positions along the array in each subject.
Figure 2: MAPA architecture. During pretraining, a large random subset of patches over electrode contacts, frequency bands, and time is masked out. The encoder operates on the visible patches only, and a small decoder then processes the full set of encoded patches and mask tokens to reconstruct the frequency bins of the removed patches. Our two spatial encodings enter both the encoder and the decoder, and the decoder is discarded after pretraining.
Band
Window
Rate
Frequencies
Bins
Slow
500 ms
4 Hz
2–14 Hz
7
Mid
125 ms
16 Hz
16–56 Hz
6
Fast
62.5 ms
32 Hz
64–160 Hz
7
Table 1: Input representation. Each band contains the magnitude of a short-time Fourier transform at the listed window length. Long windows resolve low frequencies, and short windows resolve high frequencies. These frequency bins are the input to both the encoder and the frontend baseline.
Method
Within session
Cross session
Cross subject
BrainBERT
0.626
0.633
0.547
CNN Lap+STFT
0.669
0.670
0.578
PopT
0.670
0.663
0.575
DIVER-1 frozen
0.678
×
×
Frontend baseline
0.674
0.666
0.587
MAPA
0.695
0.691
0.608
Table 2: Neuroprobe leaderboard. Macro AUROC over 15 tasks. Only the best entry of each published method family is shown.
Figure 3: Gain from spatial encodings. Macro AUROC gain over the frontend baseline, one dot per subject, with the number of subjects improved above each bar. ∗ marks q<0.05 against the baseline, one-sided paired permutation test over subjects (Appendix D ).
Figure 4: Gain in held-out subjects. Macro AUROC by encoder depth in the cross-subject regime, on the two subjects excluded from pretraining. Layer 0 is the frontend baseline.
Figure 5: Pretraining reduces the labels needed for a given accuracy. Macro AUROC against the number of labeled trials on a log axis. The arrow marks the label saving against the frontend baseline fit on the full training set. MAPA is above the baseline at every label count we test, and the gain does not close as labels grow (Appendix G ).
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Session
Split
Shafts
Contacts
Regions
Hours
1:0
Pretrain
13
128
16
1.91
1:1
Test
13
119
16
—
1:2
Test
13
119
16
—
2:0
Test
14
119
14
—
2:1
Pretrain
16
133
14
2.42
2:2
Pretrain
16
132
14
2.66
Appendix
Table 3: Every Brain Treebank session. Each row is one session, written as the subject number and the index of the session within that subject. Split marks the session as a pretraining session or a test session. Shafts, Contacts, and Regions count the shafts, contacts, and anatomical regions of the session that enter the model. Hours is the recording time of a pretraining session that enters pretraining. A subject keeps the same implant across sessions, so the same shaft appears in every session of the subject. The Total rows do not sum the columns above them: each counts every unique shaft, contact, and region once over the sessions of the split, and sums the hours.
Parameter
Value
Clip length (s)
2.0
Masked fraction
0.75
Steps
55,000
Warmup steps
5,000
Cooldown steps
5,000
Learning rate
6e-3
Appendix
Table 4: Pretraining recipe. Hyperparameters of the reported run.
Regime
Model
Subjects improved
Gain
p
q
Within-session
Both encodings
6/6
+0.0210
0.0156
0.0417
Within-session
Relative position
5/6
+0.0125
0.0312
0.0417
Within-session
Region embedding
5/6
+0.0085
0.0312
0.0417
Within-session
Neither encoding
0/6
−0.0130
1.0000
1.0000
Cross-session
Both encodings
6/6
+0.0249
0.0156
0.0208
Cross-session
Relative position
6/6
+0.0221
0.0156
0.0208
Appendix
Table 5: Every model against the frontend baseline. Each model is one pretraining run, named for the spatial encodings it keeps. Subjects improved is the number of subjects whose macro AUROC exceeds the frontend baseline, out of the subjects in the regime. Gain is the mean over subjects of the difference in macro AUROC. p is the one-sided exact paired permutation test and q is the same p after Benjamini-Hochberg correction within the regime. Bold marks q<0.05 .
Within-session
Cross-session
Cross-subject
Task
Frontend
MAPA
Frontend
MAPA
Frontend
MAPA
onset
0.911
0.933
0.913
0.941
0.745
0.815
speech
0.891
0.917
0.909
0.932
0.719
0.779
volume
0.777
0.799
0.748
0.774
0.638
0.645
delta volume
0.778
0.800
0.768
0.787
0.674
0.705
pitch
0.597
0.628
0.590
0.633
0.540
0.537
Appendix
Table 6: The 15 Neuroprobe tasks. AUROC for the frontend baseline and for MAPA, in each regime. Bold is the larger of a pair. Tasks appear in the order the benchmark lists them.
Session
Frontend
MAPA
Difference
7:0
0.5234
0.5385
+0.0151
7:1
0.5326
0.5458
+0.0132
10:0
0.5754
0.5825
+0.0071
10:1
0.5994
0.6137
+0.0143
Mean
0.5577
0.5701
+0.0124
Appendix
Table 7: The two subjects held out of pretraining. Macro AUROC over the 15 tasks in the cross-subject regime. Sessions are named subject:session, and the last row is the mean over the four.
Subject
Within-session
Cross-session
Cross-subject
1
4.9
12.3
28.7
2
3.1
7.3
×
3
2.5
4.1
89.8
4
2.0
4.1
never reaches
7
2.9
3.8
20.7
10
2.3
3.1
15.9
Appendix
Table 8: Label saving by subject. The factor by which MAPA cuts the labeled trials needed to match the frontend baseline fit on every training trial. The pooled row is computed on all test sessions together and is not the mean of the rows above it. Subject 2 supplies the cross-subject training trials and is never a cross-subject test subject.
Rule
Fires when
Rate (%)
Guard 1
2.02
Spike
∣z∣ of the voltage slope exceeds 100 in over 1% of the contact’s 5-second clips
1.37
Noisy
Spread, as a z over the contacts of the session, exceeds 8
0.05
Dead
Spread is below 0.35 of the median spread of the session
0.60
Guard 2
1.08
Common mode
∣z∣ exceeds 4qb in n contacts at once
0.30
Appendix
Table 9: The three guards. A guard acts when any one of its rules fires. Rate is the share of pretraining data affected: of contacts for Guard 1, of windows for Guard 2, and of single values for Guard 3. The row of each guard gives the total share it removes. Spread is 1.4826 times the median absolute deviation, and z is the distance from the median divided by the spread. Guard 1 runs on voltage, and z is taken within a contact over time, except where a rule says over the contacts of the session. Guards 2 and 3 run on the normalized bands, where every value is already a z . The three rules of Guard 1 never fire on the same contact, so their rates sum to the share Guard 1 removes. A window can fail several rules of Guard 2, so those rates sum to more than the share Guard 2 removes. Each rule of Guard 3 acts on the values of one band, so the share Guard 3 removes is the mean of the three rates weighted by the number of values in each band.
Intracranial electroencephalography (iEEG) is widely used to record electrical activity directly from electrodes inside the human brain, making it an attractive modality for neural decoding. However, progress in iEEG decoding, especially toward general-purpose foundation models, remains difficult to measure reliably: datasets are task- or institution-specific, limiting evidence of generalization across tasks and recording environments, and preprocessing choices can strongly influence performance, making model improvements difficult to distinguish from preprocessing gains. Thus, we introduce iMINDBench, an iEEG Multi-Institution Neural Decoding Benchmark that evaluates models on a shared suite of fifteen decoding tasks across three naturalistic movie-watching datasets. The benchmark additionally defines standardized preprocessing tracks and fixed evaluation splits to support consistent model comparisons. Using iMINDBench, we find that the evaluated pretrained systems generally outperform baselines within their respective preprocessing tracks, while strong spectral baselines remain competitive across institutional datasets. In our scaling study, adding up to 25 times more supervised data from other subjects or institutions yields only small or task-dependent gains over within-session training. Together, these findings highlight the need for iEEG models that improve on strong preprocessing baselines and make more effective use of data across subjects and institutions. Project website: https://imindbench.github.io/
The development of generalizable electroencephalography (EEG) decoding models is essential for robust brain-computer interfaces (BCI) and objective neural biomarkers in mental health. Conventional approaches have been hindered by poor cross-subject and cross-task generalization, owing to high inter-subject variability and non-stationary neural signals. We address this challenge with a zero-shot cross-subject decoding framework on the large-scale Healthy Brain Network dataset, benchmarking a convolutional neural network baseline, a hybrid LSTM, and a Transformer-based foundation model. To adapt the Transformer for regression while averting catastrophic forgetting, we propose a novel progressive unfreezing strategy. The baseline yielded an nRMSE of 0.9991, whereas our fine-tuned Transformer achieved 0.9799 on unseen subjects. This work advances scalable, calibration-free EEG decoding for computational psychiatry and behavioral prediction.
Baimam Boukar Jean Jacques, Brandone Fonya, Nchofon Tagha Ghogomu +2
Electroencephalography (EEG) has become one of the key modalities underpinning brain-computer interfaces (BCIs) due to its high temporal resolution, rapid responsiveness, non-invasiveness, low cost, and portability. However, EEG signals are substantially inferior to intracranial EEG (iEEG) in signal-to-noise ratio and local spatial resolution, whereas iEEG suffers from extremely limited clinical accessibility owing to its invasive nature, hindering widespread application. To address this challenge, this study proposes a unified data-and prior knowledge-driven framework for EEG-iEEG representational enhancement. Guided by the principle that "geometric structure dictates function", the framework maps static cortical anatomy onto dynamic constraints governing neural signal propagation and integrates general-purpose neural representations extracted by a pre-trained large EEG model to explicitly model signal transmission through the brain. Enhanced EEG signals are then synthesized via a multidimensional representation diffusion process. Numerous experimental results demonstrate that the generated enhanced EEG signals effectively recover the neural activity patterns lost during propagation through the brain. This finding indicates that the performance ceiling of BCIs is constrained not only by acquisition hardware but also by the depth to which the generative model resolves the mechanisms of neural signal propagation. Collectively, the proposed framework provides a viable pathway toward acquiring high-fidelity neural signals at low cost.
Yihang Dong, Changhong Jing, Shuqiang Wang
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Shenzhen, China. · University of Chinese Academy of Sciences, Beijing, China.