Foundation models for EEG analysis are still in their infancy, limited by two key challenges: (1) variability across datasets caused by differences in recording devices and electrode configurations, and (2) the low signal-to-noise ratio (SNR) of EEG, where neural activity is often buried under artifacts and non-brain sources. To address these challenges, we present EEG-X, a device-agnostic and noise-robust foundation model for EEG representation learning. EEG-X introduces a location-based channel embedding that enables robust transfer across heterogeneous EEG devices and electrode layouts. To improve robustness against noise, EEG-X employs a novel noise-aware masking-reconstruction strategy that reconstructs artifact-cleaned signals rather than raw noisy EEG and introduces a novel Dictionary-based Convolutional Transformation (DiCT) that improves reconstruction-based pretraining by comparing signals in a structured feature space instead of directly in the raw signal space. Experiments across datasets collected from diverse EEG devices show that EEG-X consistently outperforms state-of-the-art methods across multiple downstream tasks and demonstrates strong cross-domain generalization when pretraining and downstream datasets differ in electrode layouts and recording configurations paving the way towards foundation models. The models and code are available at https://github.com/Emotiv/EEG-X.
Figures & tables
Figure 1: Architecture of EEG-X. EEG-X is built upon a masked autoencoding (MAE) framework and consists of three main components: (1) a signal embedding module augmented with location-based channel embeddings for handling heterogeneous EEG devices and channel layouts, (2) an artifact removal module that produces artifact-cleaned reconstruction targets from raw EEG signals, and (3) Dictionary-based Convolution Transformation (DiCT) objective for structured reconstruction learning.
Figure 2: (a) Location-based channel embedding using a universal scalp coordinate mapping to assign each channel Cartesian coordinates. (b) Embedding similarity of electrode F4 with all other channels, showing higher similarity to nearby electrodes (e.g., F2, F6) than distant ones (e.g., P7).
Figure 3: Real EEG signal and reconstructed variants. Left: low-frequency dominant reconstruction preserving mainly Delta and Theta components. Right: mid/high-frequency dominant reconstruction preserving Theta, Alpha, Beta, and Gamma components. These examples illustrate the amplitude bias of direct time-domain MSE, where low-frequency high-amplitude components can dominate the reconstruction objective despite missing informative higher-frequency temporal patterns.
Figure 4: Comparison of four different EEG headset configurations used for data collection
Category
Datasets
Channel
Length
#Samples
Task
In-Domain (Pre-training)
DREAMER
14
2s
170,246
Emotion Detection
STEW
14
2s
56,928
Mental Workload Classification
TUAB
19
10s
409,455
Abnormal EEG Classification
TUEV_binary
19
2s
98,684
Epileptiform Classification
Cross-Domain (Downstream)
Crowdsourced
14
2s
12,296
Eyes Open/Close Detection
BCICIV_2A
22
4s
5,184
Motor Imagery
Table 1: Datasets for pre-training and downstream evaluation (headset configurations in Fig. 4 ).
Model
STEW
DREAMER
TUAB
TUEV_binary
Acc
AUROC
Acc
AUROC
Acc
AUROC
Acc
AUROC
MAEEG
75.98 ± 2.87
81.73 ± 2.95
52.36 ± 3.12
54.45 ± 2.98
77.56 ± 1.45
86.56 ± 1.67
85.75 ± 2.03
91.36 ± 1.89
BioT
75.79 ± 1.12
86.48 ± 1.45
52.85 ± 1.34
54.19 ± 1.23
79.21 ± 1.56
87.42 ± 1.78
86.28 ± 1.43
93.06 ± 1.67
LaBraM
75.26 ± 1.35
84.37 ± 1.67
55.85 ± 1.45
55.34 ± 1.23
80.61 ± 1.54
88.77 ± 1.76
85.43 ± 1.48
90.10 ± 1.59
EEGPT
77.65 ± 2.95
85.98 ± 3.01
54.11 ± 3.12
54.91 ± 2.87
78.91 ± 1.49
87.16 ± 1.85
84.05 ± 2.03
90.26 ± 1.78
EEG2Rep
76.71 ± 1.23
85.89 ± 1.45
57.09 ± 1.32
56.35 ± 1.21
80.21 ± 1.54
88.43 ± 1.67
89.83 ± 1.38
95.57 ± 1.47
Table 2: Average classification accuracy over three runs in the in-domain setting across four EEG tasks
Model
Crowdsourced
BCICIV_2A
SSVEP
PhysioNetMI
Acc
AUROC
B-Acc
Weighted F1
B-Acc
Weighted F1
B-Acc
Weighted F1
BioT
77.76 ± 1.12
83.62 ± 1.34
27.26 ± 1.05
25.26 ± 1.23
29.92 ± 1.41
27.27 ± 1.36
48.51 ± 2.70
59.03 ± 2.44
LaBraM
77.28 ± 1.25
89.83 ± 1.47
32.44 ± 1.13
27.37 ± 1.21
29.69 ± 1.28
27.41 ± 1.19
47.41 ± 1.60
57.92 ± 1.48
EEGPT
79.55 ± 1.36
87.79 ± 1.52
30.07 ± 1.17
24.68 ± 1.08
26.06 ± 1.11
27.40 ± 1.07
46.96 ± 2.10
57.37 ± 1.95
CBraMod
78.41 ± 1.31
88.73 ± 1.45
30.07 ± 1.12
24.68 ± 1.09
28.24 ± 1.34
27.79 ± 1.25
47.88 ± 3.10
58.26 ± 2.87
REVE
83.92 ± 1.29
90.72 ± 1.38
35.91 ± 1.11
33.88 ± 1.16
31.18 ± 1.35
27.94 ± 1.27
50.33 ± 1.43
60.88 ± 1.31
Table 3: Cross-domain performance comparison of models pre-trained on TUAB dataset.
In-Domain
Component
STEW
DREAMER
TUAB
TUEV_binary
Average
Without channel embedding
79.44
56.17
79.94
90.46
76.50 ( ↓ 1.16)
Learnable channel embedding
80.07
57.12
80.94
90.14
77.07 ( ↓ 0.59)
Without DiCT
76.91
54.36
78.88
88.01
74.54 ( ↓ 3.12)
Raw reconstruction
77.90
55.41
79.41
88.22
75.24 ( ↓ 2.42)
Full EEG-X
80.32
58.14
81.02
91.15
77.66
Table 4: Ablation study of EEG-X components. The average column reports the mean score across datasets, with the difference from full EEG-X in parentheses.
Setting
STEW
DREAMER
TUAB
TUEV_binary
Supervised (Raw input)
75.12 ± 2.64
55.69 ± 1.34
78.12 ± 0.98
88.24 ± 2.09
Supervised (rASR input)
73.68 ± 1.74
56.41 ± 1.04
78.32 ± 1.11
83.36 ± 1.68
Self-Supervised (Raw input with rASR target)
80.32 ± 1.21
58.14 ± 1.35
81.02 ± 1.48
91.15 ± 1.41
Table 5: Performance of EEG-X under different data and training settings. Supervised models are evaluated using raw or rASR-preprocessed inputs, while the self-supervised model is pretrained using raw inputs with rASR-cleaned reconstruction targets.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Original EEG signal (top) and reconstructed variants: (1) low-frequency dominant (Delta + Theta), (2) mid/high-frequency dominant (Theta + Alpha + Beta + Gamma), and (3) phase-shifted signal. These examples highlight amplitude bias and phase sensitivity in time-domain MSE.
Target
MSE (Time)
MSE (DiCT)
Low-frequency dominant
47.55
11.44
Mid/High-frequency dominant
95.75
4.26
Phase-shifted signal
126.79
0.02
Appendix
Table 6: Comparison of reconstruction error before and after DiCT transformation.
Groups ( G )
Kernels ( K )
STEW Acc (%)
DREAMER Acc (%)
4
16
80.15
58.00
8
32
80.32
58.14
64
16
80.28
58.10
8
64
80.30
58.12
Appendix
Table 7: Effect of the number of groups and kernels per group on downstream performance.
Figure 6: Real example of DiCT on an EEG segment. (a) Real EEG signal and two reconstructions; (b) DiCT on the input EEG. (c) The representation of the input and each reconstruction; (d) The raw signal MSE (point-wise) is lower for the low-frequency reconstruction, whereas the DiCT representation MSE is lower for the high-frequency one, which preserves the input’s fast pattern content.
Figure 7: Dense scalp electrode mesh combining positions from the 10-05, 10-10, and 10-20 systems, used as a universal location mapping.
Setting
REVE
ST-EEGFormer
EEG2Rep
CBraMod
LaBraM
EEGPT
BioT
MAEEG
In-domain
0.5324
0.1700
0.0264
0.0056
0.0036
0.0036
0.0036
0.0036
Appendix
Table 8: Holm-adjusted p -values for pairwise comparisons between EEG-X and competing methods.
Emb. dim
Enc. params
Total params
Inference GFLOPs / window
Pretrain TFLOPs / epoch
STEW
DREAMER
64
0.40M
0.65M
0.114
44.97
80.32
58.14
128
1.59M
2.59M
0.405
72.70
80.70
58.68
256
6.33M
10.28M
1.515
179.87
80.75
59.12
512
25.2M
41.01M
5.848
601.05
80.78
60.38
Appendix
Table 9: Scalability of EEG-X across encoder widths. Parameter counts and dense FLOP estimates are measured from our implementation; FLOPs are per 2 s window (inference) or per pass over the STEW training set (39,138 windows; pretraining). Downstream columns report accuracy on STEW and DREAMER.
Figure 8: 2D t-SNE visualization of the learned representation on the STEW dataset at different epochs during pre-training. At epoch 5, the classes are highly entangled, with separation increasing over time, becoming distinct by epoch 100. The accuracy improves from 65.73% at epoch 5 to 78.81% at epoch 100.
Electroencephalography (EEG) foundation models learn reusable representations of brain signals for transfer across people, tasks, and recording setups.