Source-linked AI summary

REVE: A Foundation Model for EEG -- Adapting to Any Setup with Large-Scale Pretraining on 25,000 Subjects

Yassine El Ouahidi, Jonathan Lys, Philipp Thölke, Nicolas Farrugia, Bastien Pasdeloup, Vincent Gripon, Karim Jerbi, Giulia Lioi

arXiv:2510.21585v1cs.LGq-bio.NC

TL;DR

EEG foundation models have struggled to transfer across heterogeneous devices, montages, and recording setups. REVE combines flexible 4D positional encoding with masked autoencoding over a large multi-dataset corpus, achieving state-of-the-art results across downstream benchmarks and strong linear-probing performance. Its main scope limitation is limited demographic diversity in the predominantly North American and European pretraining data.

  • Problem

    EEG foundation models have limited generalization across heterogeneous electrode configurations, recording conditions, and datasets, particularly under linear probing.

  • Method

    REVE uses 4D positional encoding and masked autoencoding to pretrain EEG representations on 61,415 hours from 92 sources and 24,274 subjects.

  • Results

    Across 10 downstream benchmarks, REVE achieves state-of-the-art performance, averaging 2.5% balanced-accuracy gain over CBraMod and up to 17% higher linear-probing performance.

  • Takeaways & Limitations

    REVE generalizes to unseen or bipolar electrode montages and longer inputs than used during pretraining, while providing open-source code, weights, and tutorials.

  • Takeaways & Limitations

    The pretraining corpus has limited demographic diversity because most public EEG data originates from North America and Europe.

Abstract

from arXiv · show

Foundation models have transformed AI by reducing reliance on task-specific data through large-scale pretraining. While successful in language and vision, their adoption in EEG has lagged due to the heterogeneity of public datasets, which are collected under varying protocols, devices, and electrode configurations. Existing EEG foundation models struggle to generalize across these variations, often restricting pretraining to a single setup, resulting in suboptimal performance, in particular under linear probing. We present REVE (Representation for EEG with Versatile Embeddings), a pretrained model explicitly designed to generalize across diverse EEG signals. REVE introduces a novel 4D positional encoding scheme that enables it to process signals of arbitrary length and electrode arrangement. Using a masked autoencoding objective, we pretrain REVE on over 60,000 hours of EEG data from 92 datasets spanning 25,000 subjects, representing the largest EEG pretraining effort to date. REVE achieves state-of-the-art results on 10 downstream EEG tasks, including motor imagery classification, seizure detection, sleep staging, cognitive load estimation, and emotion recognition. With little to no fine-tuning, it demonstrates strong generalization, and nuanced spatio-temporal modeling. We release code, pretrained weights, and tutorials to support standardized EEG research and accelerate progress in clinical neuroscience.

1 Introduction

EEG foundation models face heterogeneous electrode layouts, recording conditions, and datasets that limit transfer across subjects and setups. REVE addresses this gap with flexible positional encoding and large-scale pretraining, achieving strong benchmark performance and releasing resources for adoption.

  • Motivation: EEG varies across electrode configurations, recording conditions, and subject-specific factors, making transfer across settings difficult.
  • Motivation: Existing EEG foundation models often train on fixed 19- or 21-channel montages and fail to generalize to different electrode layouts or recording setups.
  • Contributions: REVE introduces a 4D positional encoding scheme that supports varying temporal lengths and electrode configurations without fixed montages or fine-tuned positional priors.
  • Contributions: The pretraining corpus contains over 60,000 hours from 92 datasets and 25,000 subjects across clinical, BCI, and research domains.
  • Results and support: REVE achieves state-of-the-art performance across BCI and clinical benchmarks while outperforming prior EEG foundation models.

2 Methods

REVE combines patch-based EEG representation, flexible 4D spatio-temporal encoding, structured masking, and masked reconstruction to learn generalizable representations. A secondary global-token reconstruction task further encourages information to be distributed across encoder layers.

  • EEG representation: REVE represents each channel as overlapping temporal patches, linearly embeds them, and processes the resulting tokens with a transformer encoder-decoder.
  • Block masking: The framework applies contiguous block masking across spatial and temporal dimensions to simulate structured EEG disruptions during pretraining.
  • 4D position encoding: The 4D positional encoding derives representations from electrode 3D coordinates and temporal patch indices, enabling arbitrary electrode configurations and sequence lengths.
  • 4D position encoding: Fourier features are combined with a learned linear positional component, while computational cost scales linearly with the number of input tokens.
  • Masked reconstruction: The decoder reconstructs masked EEG patches from visible embeddings, using a primary L1 loss and a secondary attention-pooled global representation loss.
  • Masked reconstruction: The secondary loss encourages useful information to be distributed across encoder layers, mitigating over-specialization in the final layer.

3 Experiments

REVE is pretrained and evaluated through a scalable pipeline built for diverse EEG data, with structured fine-tuning intended to improve robustness on small, noisy downstream datasets.

  • 3.1 Dataset Collection & Preprocessing: 61,415 hours from 92 sources and 24,274 subjects form the pretraining corpus, which is reduced from 19 TB of raw data to 6 TB after preprocessing.The corpus includes clinical, cognitive, and BCI-related recordings in multiple EEG systems and formats.
  • 3.1 Dataset Collection & Preprocessing: Signals are resampled to 200 Hz, band-pass filtered from 0.5–99.5 Hz, converted to float32, session-normalized, and clipped above 15 standard deviations.Recordings shorter than 10 seconds and recordings used in downstream tasks are removed.
  • 3.2 Training and Scaling Strategy: REVE training scales model depth, width, and attention heads while maintaining a fixed FFN ratio and adapting learning rates according to a power law.Data parallelism maintains a constant batch size by reducing per-GPU loads for larger models.
  • 3.3 Downstream tasks: The evaluation covers 10 diverse EEG tasks spanning sleep staging, emotion and event classification, stress, and mental-disorder detection.The datasets include PhysioNet-MI, BCIC-IV-2a, TUEV, TUAB, HMC, ISRUC, FACED, Mumtaz, MAT, and BCI2020-IV-3.
  • 3.3 Downstream tasks: Results use prior train/validation/test splits and baseline preprocessing to support direct comparisons, with a correction to an ISRUC baseline-code bug.The protocols follow CBraMod, LaBraM, and BIOT.
  • Finetuning: A two-step fine-tuning strategy first trains a linear probe with the encoder frozen, then unfreezes the encoder for task-specific adaptation.Training uses warmup followed by Reduce-on-Plateau cooldown, while experiments also examine data augmentation, LoRA, and model souping.
  • Finetuning: Model souping averages weights across fine-tuning runs to reduce variance, and experiments report improved generalization and more stable performance across diverse EEG tasks.The approach is motivated by stochasticity and noise in EEG datasets.

4 Results and Discussion

REVE is compared with non-foundation and foundation-model baselines across downstream EEG tasks using balanced accuracy and matched evaluation protocols. It achieves broad gains, particularly with pretraining, larger models, and linear probing, while souping is less reliable for small models.

  • 4 Results and Discussion: REVE achieves state-of-the-art performance with a 2.5% average gain over CBraMod, the highest-performing baseline, across the downstream tasks.Balanced accuracy is reported for each dataset, with additional metrics in the appendix.
  • 4 Results and Discussion: REVE generalizes beyond 10-second pretraining segments to 30-second inputs on ISRUC and HMC and to unseen bipolar electrode configurations on TUEV.These results highlight the positional encoding method’s support for temporal and electrode-layout variation.
  • 4 Results and Discussion: The Large model produces richer embeddings and improves linear probing performance compared with the Base model across downstream tasks.The comparison is reported in Table 4.
  • 4 Results and Discussion: Without pretraining, CBraMod outperforms REVE by at least 8%, whereas pretraining improves REVE-Base by 11% and CBraMod by 2%.The passage attributes the differing gains to REVE benefiting more from learned representations and other models relying more on architecture.
  • 4 Results and Discussion: Under linear probing, REVE consistently outperforms CBraMod across downstream tasks and model sizes, with REVE-Large achieving nearly 17% higher performance.The results are presented as evidence that REVE produces high-quality latent spaces without heavy fine-tuning.

5 Limitations and Future Work

REVE’s current limitations concern input-length constraints, corpus curation, demographic diversity, and the scope of evaluated tasks. Future work proposes selective data curation, broader populations, advanced methods, and zero-/few-shot evaluation.

  • Input constraints: Signals must be at least one second long and have durations that are multiples of one second.Padding with causal masking is proposed as a possible remedy.
  • Data curation: The pretraining corpus could be curated more selectively by removing low-quality recordings, balancing distributions, and identifying representative subsets.This is motivated by the inherently noisy nature of EEG signals.
  • Data diversity: Most public EEG data originates from North America and Europe, limiting demographic diversity and motivating broader, more equitable data collection.The corpus aggregates 92 datasets and over 25,000 subjects, but geographic imbalance remains.
  • Future work: Future work includes zero-/few-shot evaluation, more advanced self-supervised learning techniques and architectures, and precise scaling laws.The scaling laws would relate model size, data volume, and downstream performance.

6 Conclusion

REVE addresses the lack of robust cross-device, cross-montage, and cross-task EEG transfer by combining flexible positional encoding with masked autoencoding. Across 10 benchmarks, it reports state-of-the-art performance and stronger linear-probing gains while releasing resources for adoption.

  • Conclusion: REVE was trained on 60,000 hours from 92 datasets and 25,000 subjects for broad EEG transfer.The conclusion positions this scale as part of addressing limited robust transfer across devices, montages, and tasks.
  • Conclusion: Its 4D Fourier positional encoding supports arbitrary electrode layouts and sequence lengths.The model also uses spatio-temporal block masking and a global-token secondary loss within masked autoencoding.
  • Conclusion: Across 10 benchmarks, REVE sets a new state of the art with average +2.5% balanced accuracy over prior foundation models.The cited result is an average comparison across the benchmark suite.
  • Conclusion: REVE delivers up to 17% gains in linear probing and generalizes to unseen or bipolar montages and longer inputs than used in pretraining.These are reported transfer properties in the conclusion.
  • Conclusion: The release includes code, weights, arbitrary-3D-coordinate loaders, and training and evaluation recipes.The resources are intended to support further use and extension of REVE.

B Pretraining dataset

The pretraining dataset section documents a large corpus assembled from numerous public or request-accessible EEG sources. It provides dataset listings and licensing information alongside aggregate coverage statistics.

  • Dataset overview: The final dataset contains 61,415 hours of recordings from 92 datasets encompassing 24,274 subjects.The dataset overview groups composition by category, platform of origin, and number of channels.
  • Dataset overview: Table 7 provides a detailed overview of the pretraining datasets.The supplied passage identifies the table’s scope but not its individual entries.
  • Sources and licensing: The paper provides an exhaustive list of pretraining datasets together with their respective licenses.The list includes sources such as MOABB, Physionet, OpenNeuro, and other repositories.
  • Sources and licensing: MOABB contributes datasets including AlexMI, BNCI2014004, BNCI2015001, BNCI2015004, Cho2017, Lee2019MI, Liu2024, Ofner2017, Shin2017A, and Weibo2014.The passage continues with additional MOABB datasets beyond those listed here.
  • Sources and licensing: Physionet includes Siena and ICARE, with the passage specifying Creative Commons licensing for both sources.Siena is listed under CC BY 4.0, while ICARE is listed under CC BY-NC-SA 4.0.
  • Sources and licensing: OpenNeuro contributes numerous datasets, and the passage states that OpenNeuro uses the Creative Commons CC0 license.The listed dataset identifiers include ds004706, ds004582, ds004356, ds004817, and others.

C Detailed results

The detailed-results section introduces downstream EEG evaluations across emotion recognition, mental-disorder diagnosis, and mental-stress detection. The supplied passages specify dataset characteristics and identify tables reporting method comparisons.

  • Emotion recognition: FACED contains 32-channel EEG from 123 subjects across nine emotion classes, segmented into 10,332 ten-second samples.Signals were resampled from 250 Hz to 200 Hz, with subjects 1–80 for training, 81–100 for validation, and 101–123 for testing.
  • Emotion recognition: Table 8 reports results of different methods on emotion recognition using FACED in a 9-class setting.The supplied table passage provides the task and dataset but no numerical results.
  • Mental-disorder diagnosis: Mumtaz2016 includes 34 individuals with major depressive disorder and 30 healthy controls recorded from 19 electrodes.The supplied passage describes eyes-open and eyes-closed sessions and preprocessing, but its split description is truncated.
  • Mental-disorder diagnosis: Table 9 reports results of different methods on mental-disorder diagnosis using Mumtaz2016 in a 2-class setting.The supplied table passage provides the task and dataset but no numerical results.
  • Mental-stress detection: MentalArithmetic records EEG from 36 subjects labeled with or without mental stress during a mental-arithmetic task.Signals were recorded from 20 electrodes at 500 Hz, resampled to 200 Hz, and segmented into 1,707 five-second samples.
  • Mental-stress detection: Table 10 reports results of different methods on mental-stress detection using MAT in a 2-class setting.The supplied table passage provides the task and dataset but no numerical results.

C.4 Imagined Speech

The evaluation covers imagined speech, motor imagery, sleep staging, event-type classification, and abnormal EEG detection across datasets with varied subjects, channels, sampling rates, and task protocols.

  • Imagined Speech: BCIC2020-3 evaluates five-class imagined speech from 15 subjects using 64-channel, 256 Hz recordings and 6,000 three-second samples.Each phrase has 80 trials per subject, with official 60/10/10 train-validation-test splits per class.
  • Motor Imagery: PhysioNet-MI evaluates four-class motor imagery using 64-channel, 160 Hz recordings and 9,837 four-second samples.The protocol assigns subjects 1–70 to training, 71–89 to validation, and 90–109 to testing.
  • Motor Imagery: BCIC-IV-2a evaluates four motor-imagery classes from nine subjects recorded across two sessions with 22 electrodes at 250 Hz.Trials are windowed from 2–6 seconds, filtered, resampled to 200 Hz, and Euclidean-aligned.
  • Sleep Staging: ISRUC and HMC provide five-class sleep-staging evaluations using 30-second epochs from six-channel EEG and full-night polysomnography, respectively.ISRUC contains 89,240 labeled epochs from 100 subjects, while HMC contains 151 full-night recordings.
  • Clinical EEG Classification: TUEV tests six-class event classification with 112,491 five-second samples, while TUAB tests binary abnormal-EEG detection using 409,455 ten-second samples.TUEV uses 16 common bipolar montage channels after preprocessing; TUAB uses all 23 channels and their positions.

D Ablation on the SSL Method

The ablations examine pretraining losses, masking strategies, positional encodings, transformer components, and sparse-input robustness across downstream EEG tasks.

  • Pretraining Loss: The secondary pretraining loss improves performance across nearly all eight evaluated datasets in both linear-probing and fine-tuning settings.Removing it causes a substantial performance drop, indicating its importance for producing strong embeddings.
  • Masking Strategy: A 55% block-masking ratio yields the best overall performance across frozen and fine-tuned settings on eight downstream tasks.Random masking favors 25% ratios but creates redundant inputs that make reconstruction artificially easier.
  • Positional Encoding: Learnable positional embeddings are limited to electrode and temporal configurations observed during pretraining, unlike REVE’s 4D positional encoding.The learnable variant does not generalize to longer sequences or unseen electrode layouts.
  • Activation and Normalization: GEGLU + RMSNorm achieves the best average performance at 0.596, outperforming the alternatives on BCIC-IV-2a and TUEV.GEGLU + LayerNorm consistently underperforms, while GELU + RMSNorm leads only on PhysioNetMI.
  • Sparse Inputs: With sparse inputs, PhysioNetMI accuracy declines from 0.824 with 64 channels to 0.660 with one channel, whereas imagined speech declines to 0.209 with one channel.The sparse-input comparison covers progressively reduced channel counts for both tasks.

E.2 Few-shot experiments

Few-shot experiments test whether REVE embeddings support motor-imagery classification with limited labeled data, both directly after pretraining and after cross-dataset adaptation.

  • Experimental Setup: Few-shot evaluation uses two-class Left–Right motor imagery from BCI IV-2a, repeatedly sampling N labeled examples per class within each session.Remaining samples from both sessions are used for evaluation, and each configuration is repeated 20 times per subject.
  • Model Configurations: REVE-Base is evaluated directly after self-supervised pretraining and after cross-dataset fine-tuning across diverse Left–Right motor-imagery datasets.Its 4D positional encoding enables joint training across electrode configurations without channel alignment or selection.
  • Results: Cross-dataset fine-tuning improves performance consistently across all shot counts, reaching a +10% gain at 20 shots.The directly pretrained model also achieves competitive accuracy without supervised adaptation.

F.1 Compute resources

The compute analysis estimates the resources required for REVE-Base pretraining on GPU-accelerated infrastructure and documents the implementation environment.

  • Infrastructure: The documented nodes use NVIDIA A100 GPUs, 40-core Intel Cascade Lake SP 6248 CPUs, 192 GB memory, shared flash storage, and Slurm.Implementation uses Python with PyTorch, NumPy, scikit-learn, Pandas, and Hugging Face Accelerate.
  • FLOPs Estimation: The FLOPs estimate uses 60k hours of EEG, 68 average channels, 17 epochs, 72M parameters, 23 encoder-decoder layers, and 8 attention heads.The formulation also uses 64-dimensional attention heads and 68 × 11 average tokens per sequence.
  • Hardware Assumptions: The throughput assumptions are P = 312 TFLOPs at half precision on A100 GPUs and η = 0.5 model FLOPs utilization.These values parameterize the training-time estimate.
  • Training Cost: REVE-Base pretraining is estimated to require 260 A100 GPU hours for one run.The estimate can be adapted to other model sizes or hardware configurations.

NeurIPS Paper Checklist

The checklist finds that REVE’s claims, reproducibility materials, statistical reporting, and societal-impact discussion are adequately addressed, while limitations are explicitly discussed.

  • Claims and scope: The paper’s abstract and introduction accurately state REVE’s goal of generalization across datasets, durations, and electrode configurations.
  • Limitations: The paper reports a dedicated limitations discussion covering fixed input duration, positional encoding, dataset curation, and unresolved scaling laws.
  • Reproducibility and access: The paper provides architecture, training, fine-tuning, and hyperparameter details, alongside code access and reproduction instructions.
  • Statistical reporting: Balanced accuracy is reported with mean and standard deviation, providing variability information and a 68% confidence interval under a normality assumption.
  • Societal impact: The paper discusses both healthcare benefits and privacy risks from potential raw-EEG reconstruction, withholding the decoder to reduce misuse.
Loading 2510.21585v1…