Electroencephalography (EEG) foundation models have emerged as promising paradigms for decoding brain activity through large-scale self-supervised pretraining. Notably, most existing approaches employ masked patch reconstruction, in which randomly selected EEG patches are masked and recovered by the network. However, purely random masking may limit representation learning as informative patches from highly correlated channels often remain unmasked, causing the network to underutilize weakly correlated channels or serial dependencies. Furthermore, because these models are typically based on transformer architectures, their performance is influenced by the choice of positional encoding. Although positional encoding has been extensively explored in natural language processing and computer vision, few studies have adapted it to the unique characteristics of EEG signals. To address these limitations, this study introduces a conditional positional encoding method based on graph convolutional networks (GCNs) to explicitly model inter-channel correlations, along with an adaptive masking strategy that enhances representation learning by modulating the difficulty of masked patch reconstruction. To the best of our knowledge, this is the first study to integrate graph-based representations into conditional positional encoding and introduce adaptive masking within EEG foundation model pretraining. Experimental results on ten benchmark datasets demonstrate that the proposed GCN-based positional encoding and adaptive masking strategies, both individually and in combination, achieve state-of-the-art or competitive performance, highlighting their effectiveness in EEG foundation modeling.
Figures & tables
Figure 1: EEG channel correlations and random masking. (a) EEG electrode layout (10–20 system). Based on Pearson correlation coefficients estimated from the TUEG dataset, channels whose correlation coefficients are greater than or equal to 0.5 relative to Cz are highlighted by purple circles, with Cz indicated by a red circle. (b) Example of 50% random masking used during pretraining, where masked patches are visualized in white. Rows correspond to EEG channels arranged in an arbitrary order for constructing a 2D tensor, and columns correspond to consecutive time slots. The red square indicates the receptive field of the convolution kernel used to compute the conditional positional embedding for the masked Cz patch (red cell). Purple boxes indicate patches belonging to channels strongly correlated with Cz. This example illustrates that many channels strongly correlated with Cz may lie beyond the receptive field of the convolutional kernel and are unlikely to be masked simultaneously under random masking.
Figure 2: General framework of raw-signal reconstruction-based EEG foundation models.
Figure 3: Application of a 19×7 convolution to a 2D tensor formed by stacking EEG channels in an arbitrary sequence.
Figure 4: Graph convolution with edges defined by the top three inter-channel correlations.
Figure 5: Analysis of channel and serial correlation in EEG signals.
Figure 6: Estimation of nonparametric kernel density for sampling time slots as part of adaptive mask generation.
Downstream task
Dataset
# Channels
# Class
Mental stress detection
MentalArithmetic [ 8 ]
20
2
Mental disorder diagnosis
Mumtaz2016 [ 66 ]
19
2
Motor Imagery classification
SHU-MI [ 5 ]
32
2
PhysioNet-MI [ 4 ]
64
4
BCIC-IV-2a [ 63 ]
22
4
Seizure detection
CHB-MIT [ 65 ]
16
2
Table 1: Overview of test datasets.
Dataset
CABrain(PE)
CABrain(Mask)
CABrain(Comb)
MentalArithmetic
0.00001
0.000025
0.000025
Mumtaz2016
0.00005
0.000025
0.000025
SHU-MI
0.0001
0.0001
0.000005
PhysioNet-MI
0.00025
0.00025
0.00025
BCIC-IV-2a
0.00025
0.00025
0.0025
CHB-MIT
0.00005
0.000075
0.0001
Table 2: Learning rates for test datasets.
Dataset
Method
Bal. Acc.
AUC-PR
AUROC
MentalArithmetic
EEGNet
67.70±1.16
57.63±1.02
73.21±1.08
CNN-Trans.
67.79±2.68
57.77±2.85
72.58±3.36
BIOT
68.75±1.86
60.04±1.95
75.36±1.44
LaBraM-Base
69.09±1.25
59.99±1.55
77.21±0.93
CBraMod
72.56±1.32
62.67±0.99
79.05±0.73
CABrain(PE)
73.47±2.52
74.96±2.39
83.50±3.65
Table 3: Performance comparison with existing methods (binary-class).
Dataset
Method
Bal. Acc.
Cohen’s Kappa
Weighted F1
PhysioNet-MI
EEGNet
58.14±1.25
44.68±1.99
57.96±1.15
CNN-Trans.
60.53±1.18
47.25±2.23
60.41±1.05
BIOT
61.53±1.54
48.75±2.72
61.58±1.97
LaBraM-Base
61.73±1.22
49.12±1.92
61.77±1.41
CBraMod
64.17±0.91
52.22±1.69
64.27±1.00
EEGMamba
63.23±0.84
51.31±1.24
63.42±0.98
Table 4: Performance comparison with existing methods (multi-class).
Figure 7: Relative accuracy of the best-performing CABrain variant compared to CBraMod.
Dataset Group
CABrain(PE)
CABrain(Mask)
CABrain(Comb)
CBraMod
All datasets
65.19
66.03
67.44
64.98
Binary-class
74.91
77.53
78.97
76.46
Multi-class
58.72
58.36
59.75
57.32
Table 5: Average balanced accuracy across all, binary, and multi-class datasets.
Figure 8: Class-wise EEG topographies (Mumtaz2016 and BCIC-IV-2a).
Dataset
Node Degree
1
2
3
4
5
MentalArithmetic
64.65
75.00
73.47
69.72
71.25
Mumtaz2016
86.07
87.40
88.72
87.90
87.55
SHU-MI
61.31
61.29
62.82
61.84
60.30
PhysioNet-MI
62.83
62.70
63.26
62.16
62.05
BCIC-IV-2a
57.93
54.77
55.40
54.60
54.58
Table 6: Balanced accuracy across different node degrees.
Figure 9: Effect of node degree on classification accuracy.
Dataset
Masking ratio
30%
40%
50%
60%
70%
MentalArithmetic
69.44
70.63
77.71
70.21
68.54
Mumtaz2016
81.56
90.37
96.55
88.82
84.81
SHU-MI
61.14
61.83
63.93
61.65
60.50
PhysioNet-MI
62.62
63.22
64.33
62.98
62.29
BCIC-IV-2a
50.38
51.93
54.24
53.28
53.09
Table 7: Balanced accuracy across different masking ratios.
Figure 10: Effect of masking ratio on classification accuracy.
Dataset
Kernel bandwidth
0.1
0.3
0.5
0.7
1
MentalArithmetic
69.72
70.49
77.71
72.92
69.24
Mumtaz2016
90.10
96.49
96.55
89.25
85.31
SHU-MI
61.31
61.76
63.93
62.48
62.51
PhysioNet-MI
62.75
62.63
64.33
63.21
62.52
BCIC-IV-2a
52.62
53.32
54.24
54.18
50.61
Table 8: Balanced accuracy across different kernel bandwidths.
Figure 11: Effect of kernel bandwidth on classification accuracy.
Dataset
Mask library size
5K
10K
50K
100K
MentalArithmetic
64.23
75.63
77.71
78.13
Mumtaz2016
82.38
95.78
96.55
95.55
SHU-MI
59.45
62.82
63.93
63.41
PhysioNet-MI
63.39
64.08
64.33
62.86
BCIC-IV-2a
55.30
54.13
54.24
56.91
Table 9: Balanced accuracy under different mask library sizes.
Figure 12: Effect of mask library size on classification accuracy.
Dataset
Masking strategies
CH
Time
PTS(30–70)
PTS(10–90)
RND
Proposed
MentalArithmetic
64.31
72.29
73.61
76.67
72.56
77.71
Mumtaz2016
89.25
89.79
88.30
89.82
95.60
96.55
SHU-MI
61.22
61.07
61.26
61.32
63.70
63.93
PhysioNet-MI
62.75
65.05
61.79
63.67
64.17
64.33
BCIC-IV-2a
53.73
55.50
56.16
55.47
51.38
54.24
Table 10: Balanced accuracy under different masking strategies.
Figure 13: Comparison of masking patterns generated by different masking strategies. White cells correspond to masked patches.
Dataset
GCN Integration Strategy
GCN-only
GCN-Feature
CABrain(PE)
MentalArithmetic
56.11
73.40
73.47
Mumtaz2016
90.55
90.36
88.72
SHU-MI
56.40
61.67
62.82
PhysioNet-MI
58.22
62.05
63.26
BCIC-IV-2a
44.48
53.68
55.40
Table 11: Comparison of balanced accuracies of alternative GCN architectures.
Figure 14: Pretraining loss curve.
Figure 15: Comparison of patch-level loss depending on masking scheme.
Figure 16: UMAP visualization of feature representations on Mumtaz2016. Left: raw EEG signals; Right: CABrain representations.
Figure 17: UMAP visualization of feature representations on SHU-MI. Left: raw EEG signals; Right: CABrain representations.
Figure 18: UMAP visualization of feature representations on PhysioNet-MI. Left: raw EEG signals; Right: CABrain representations.
Electroencephalography (EEG) foundation models learn reusable representations of brain signals for transfer across people, tasks, and recording setups.
Electroencephalography (EEG) is a widely used non-invasive technique for measuring brain activity in brain-computer interface (BCI) applications. Supervised EEG decoding models often struggle to generalize across tasks, subjects, and datasets, motivating transformer-based EEG foundation models trained with self-supervised learning. Since transformers are permutation-invariant, they require explicit positional information. Unlike textual tokens, EEG electrodes are spatially distributed across the scalp, raising the question of how electrode positions should be encoded in transformer-based EEG models. In this study, we benchmark five positional encoding strategies within the CBraMod backbone and evaluate them under linear probing and fine-tuning protocols on motor imagery classification and emotion recognition. Our results show that no single strategy consistently outperforms across tasks. Spherical Positional Encoding (SPE) yields strong representations for motor imagery but underperforms on emotion recognition, while Asymmetric Conditional Positional Encoding (ACPE) demonstrates more consistent performance across tasks. These findings suggest that the optimal positional encoding strategy is task-dependent, with no universal solution across EEG decoding scenarios.
Ayse Betul Yuce, Sebastian Stober
Department of Computer Science, Otto von Guericke University, Magdeburg, Germany
EEG foundation models hold promise for scalable brain-signal decoding across clinical and cognitive neuroscience applications, yet their pre-training pipelines remain poorly understood. Among design choices, the masking strategy is particularly critical: it determines what the network must predict and from which context. Yet it has never been ablated in isolation, as each new model bundles a new masking strategy with a new backbone and objective. In this paper, we formalize the design choices for spatio-temporal masking strategies and train various models with a single pipeline under varying masking configurations across two SSL frameworks (MAE and JEPA). We then systematically evaluate the resulting 58 pre-trained models on the 12 datasets of OpenEEGBench under a linear probe. Both frameworks agree on an optimal masking configuration and on shared failure modes. Outside these, performance is robust: 11 MAE and 9 JEPA configurations are statistically indistinguishable from the best. We further identify a novel JEPA-specific failure mode, tagged bias-inflation collapse, invisible to standard detectors. With a well-chosen mask, our pipeline reaches REVE-level downstream performance at a fraction of REVE's pre-training compute.
Pierre Guetschel, Bruno Aristimunha, Yassine El Ouahidi +3
Donders Institute for Brain, Cognition and Behaviour Radboud University Nijmegen, The Netherlands · Yneuro, University of California San Diego, Paris, France · Lab-STICC, IMT Atlantique Brest, France +2
Foundation models pre-trained through masked reconstruction on large-scale EEG data have emerged as a promising paradigm for learning generalizable neural representations across diverse brain-computer interface applications. However, a critical yet overlooked challenge is that EEG encoders must learn representations invariant to incomplete observations-when different masked views of the same signal have minimal overlap, existing methods fail to constrain them to a consistent latent subspace, leading to degraded transferability. To address this, we propose DARE-EEG, a self-supervised foundation model that explicitly enforces the mask-invariance property through dual-aligned representation learning during pre-training. Specifically, we introduce mask alignment that constrains representations from multiple masked views of the same EEG sample via contrastive learning, complementing anchor alignment that aligns masked representations to momentum-updated complete features for semantic stability. Additionally, we propose conv-linear-probing, a parameter-efficient strategy that adapts pre-trained representations to heterogeneous electrode configurations and sampling rates through decoupled spectro-spatial projections. Extensive experiments across diverse EEG benchmarks demonstrate that DARE-EEG consistently achieves state-of-the-art in accuracy performance while maintaining relatively low parameter complexity and superior cross-dataset portability compared to existing methods. Furthermore, DARE-EEG contributes to effectively discovering and utilizing the rich potential representations in EEG.
Yang Shao, Peiliang Gong, Qun Dai +1
College of Artificial Intelligence, Nanjing University of Aeronautics and Astronautics Nanjing, Jiangsu, China