← Pierre Guetschel

Preprint · 2026

What Masking Geometry Works Best for EEG Foundation Models?

We describe EEG masking strategies with three parameters, then pre-train 58 foundation models that differ only in their mask and pretext. One mask works best for both MAE and JEPA.

(L, r, ρ)
three parameters that cover the masks of the EEG literature
58
models, one pipeline: only the mask and the pretext change
L = 2 s, r = 9 cm
best mask, for both MAE and JEPA

One formalism for EEG masks

Most EEG foundation models learn by hiding part of the signal and predicting it. Each one hides it differently, and changes the architecture, data and objective at the same time, so the effect of the mask has never been isolated.

We describe any EEG mask with three parameters: blocks of radius r on the scalp and length L in time, added until a fraction ρ of the signal is hidden.

0.55
2 tokens
9 cm
30 s
K
– blocks
Masked
–

Cursor

Loading 3-D view…

3-D view unavailable (WebGL is disabled in this browser).

Drag to rotate · scroll to zoom · hover an electrode or a signal for its name · click an electrode to find its signal · click the signals to move the cursor electrode (colour = position on the scalp) masked at the cursor time extent of a block active at the cursor time masked token (0.9 s) time cursor = the moment shown in the frame

Try it: L = 1, r = one gives random patch masking; r = all hides whole time segments; L = 33 (the whole 30 s window) hides whole channels. Everything in between is a spatio-temporal block mask.

The study: pre-train, then evaluate

We use this formalism to run a controlled sweep. All models share one pipeline and one training budget; only the mask and the training target change. MAE reconstructs the raw EEG of the hidden tokens; JEPA predicts how a teacher network encodes them. After pre-training, every model is scored the same way, on the 12 datasets of the OpenEEGBench benchmark. Switch views and hover the blocks for details.

The network fills in the hidden parts of the EEG signal itself: it must output the missing raw samples.

Everything outside the coloured box is shared. Switching between MAE and JEPA only swaps the training target.

The network predicts an abstract representation of the hidden parts, as computed by a teacher network, rather than the raw signal.

Everything outside the coloured box is shared. Switching between MAE and JEPA only swaps the training target.

The mask, decoder and teacher are gone. The frozen encoder turns a new EEG recording into features, and a linear model predicts the label from them. The same protocol is used for all 58 models on the 12 OpenEEGBench datasets.

Only the tokeniser and the encoder are kept from pre-training, and they stay frozen.

MAE-only Show the MAE branch JEPA-only Show the JEPA branch EEG Mask Decoder outputs JEPA predictions Linear Transformer Encoder Transformer Decoder remove masked tokens Maskingstrategy(L, r) MAE targets MAE predictions Linear remove unmasked signal patches L2 MAE JEPA targets Transformer Encoder (Teacher) remove unmasked tokens EMA gradient stop L2 JEPA Linear Transformer Encoder Random proj. Ridge regression flattened 5,000-d ŷ prediction linear probe
Hover or tap a block for details · the grids are toy examples token (a real pre-training window: 32 channels × 33 patches) hidden by the mask mask pattern (not data)

29 mask geometries (ρ fixed at 0.55) × 2 pretexts = 58 models

What we found

Each cell is one pre-trained model. Colour = its score relative to REVE, averaged over the 12 datasets. Slide through the pre-training epochs, switch to ranks, or hover a cell to see how it learns.

JEPA

JEPA: downstream performance per mask (radius r in rows, length L in columns)
12481633
one −0.03 +0.02 −0.01 −0.02 −0.02 −0.07
6 cm +0.07 +0.03 +0.07 +0.02 −0.05 −0.04
9 cm +0.07 +0.10 +0.06 −0.01 −0.03 −0.04
12 cm −0.07 +0.04 +0.06 −0.18 −0.27 +0.02
all −0.41 −0.67 −0.37 −0.36 −0.31 not trained

MAE

MAE: downstream performance per mask (radius r in rows, length L in columns)
12481633
one −0.02 −0.01 +0.02 +0.04 +0.02 −0.00
6 cm −0.02 +0.06 +0.07 +0.02 −0.13 +0.04
9 cm +0.01 +0.07 +0.05 +0.03 −0.16 +0.07
12 cm +0.01 +0.03 +0.02 +0.03 −0.10 +0.05
all −0.05 −0.08 −0.10 −0.14 −0.25 not trained
10 · final · 5 probe seeds

Mean normalised score over the 12 OpenEEGBench datasets and the probe seeds, minus that of the public REVE-Base checkpoint (0 = REVE; linear probe on frozen features). Bold: the best mask of each pretext.

Mean rank (1 = best) of each mask among the 29 of its pretext, under a hierarchical bootstrap over datasets and probe seeds (10,000 replicates). Bold: the best mean rank.

Hover a cell to compare the two pretexts and see its training curve · empty cell: r = all with L = 33 would hide the whole window (not trained) · epochs 1–9: 3 probe seeds (a few evaluations missing), epoch 10: 5 seeds, as in the paper

Why does the mask matter?

EEG is highly redundant across neighbouring electrodes, and much less across time. A good mask hides enough neighbours to make the task non-trivial, but leaves enough context to solve it. That is why the winner sits at a moderate radius and a short length.

Same channel, time-shifted

0 0.2 0.4 0.6 0.8 1 0 5 10 15 time lag (s) R² L = 2 s R² ≈ 0.13

Same time, different channels

0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 distance between the electrodes (cm) R² r = 9 cm R² ≈ 0.33
Squared correlation R² of the EEG signal (0.5–99.5 Hz) on 908 random 30 s windows of the pre-training corpus. Lines: mean; shading: spread over windows (left) and over electrode pairs (right). Dashed: the block size of the best mask.

Use the models

All 58 checkpoints are public. For most uses, take the best mask; the other 56 are there to study how masking shapes representations.

Pick a checkpoint

At the best mask, MAE and JEPA both score above REVE: either is a good starting point.

Pretext

Length L

Radius r

PierreGtch/eeg-fm-masking

mae-L2-r9cm

+0.07 vs REVE · rank 8.6 of 29 · best mask

Open on Hugging Face ↗

What the encoder expects

  • EEG resampled to 200 Hz
  • 3D electrode positions for every channel (any montage: the model reads positions, not channel names)
  • Any channel count and window length: pre-trained on 32 channels × 30 s, evaluated on 6 to 64 channels and 1 to 30 s windows
  • Each window normalised on its own, as in pre-training (robust scaling, clipped at 15 SD)
  • Output: one 512-dim embedding per channel per 1 s token

Minimal example

from eeg_fm_masking import load_encoder

encoder = load_encoder(framework="mae", L=2, r=9)
tokens = encoder(x, positions)  # x: (batch, channels, times) at 200 Hz

Evaluate on OpenEEGBench

Our encoders plug into OpenEEGBench, so you can compare yours against all 58 under the exact same protocol.

Reproduce or extend

  • Re-plot without training: every score on this page comes from the CSVs in results/.
  • Pre-train your own: one run takes ~14 H100-hours on the open part of the REVE corpus (4.4 TB). Any (L, r) can be set in the config.

Citation

@article{guetschel2026masking,
  title   = {What Masking Geometry Works Best for {EEG} Foundation Models?},
  author  = {Guetschel, Pierre and Aristimunha, Bruno and El Ouahidi, Yassine and
             Delorme, Arnaud and Moreau, Thomas and Tangermann, Michael},
  journal = {arXiv preprint arXiv:0000.00000},
  year    = {2026}
}