EEG Decoding in Context: A Framework for Tuning-Free EEG Foundation Models

TL;DR Decodes EEG without any training on the target task. A frozen tabular in-context predictor (TabPFN-2.5) labels new trials from labeled example trials, and a rule computed from those examples picks the feature representation for each task. Across ten datasets it reaches 0.699 mean balanced accuracy, versus 0.671 for the best fine-tuned EEG foundation model.
What they do
Applying an EEG decoder or EEG foundation model to a new task still means training a task-specific head, fine-tuning with gradients and picking checkpoints on validation data. This paper treats decoding as in-context learning instead. Labeled trials from the target task are given as context to a frozen, general-purpose tabular predictor (TabPFN-2.5, pretrained without EEG), which then labels new trials. Flattened raw EEG works poorly in this setup, so the contribution is how the context is built and how a representation is chosen for each task.
How it works
- Context operators. Each trial becomes one feature type: raw waveform, per-trial normalized waveform, windowed FFT magnitudes, or covariance mapped to a Riemannian tangent space. Optional extras are regional pseudo-channels pooled over anatomical channel groups, or temporal windows whose predictions are averaged.
- Support handling. The support set is always class-balanced by subsampling. Tasks with many classes can optionally be split into one-vs-rest predictions.
- Metric route. Using only the labeled support trials, it scores four small descriptor groups (band power, channel correlation, temporal, amplitude) by between- versus within-class spread. A fixed mapping then turns the winning group into a context choice. It never uses validation data or query labels.
- Optional calibration. A threshold chosen from out-of-fold support predictions trades specificity for recall.
Results
- Ten public datasets cover seven paradigms: motor imagery, imagined speech, emotion, mental arithmetic, seizure detection, sleep staging and depression. Mean balanced accuracy is 0.699, versus 0.671 for CSBrain, the best of eleven specialized and fine-tuned baselines. EEGNet gets 0.540.
- Raw context averages 0.479. The Metric route improves every dataset and comes within 0.004 of an oracle that picks each dataset’s best context using test results.
- After Holm correction, the gains over raw context (10/10 datasets) and EEGNet (9/10) are significant. The difference from CSBrain is not (5 wins, 5 losses).
- In a seizure-detection case study (Siena), the support-chosen threshold raises test recall from 0.749 to 0.872 and balanced accuracy from 0.853 to 0.881.
Limitations
Each method-dataset cell is a single run, so seed variance is not reported. CSBrain stays clearly ahead on some datasets, e.g. FACED emotion recognition (0.554 vs 0.351). Only ISRUC uses subject-disjoint splits. Wide waveform contexts, multi-window views and one-vs-rest predictions raise memory and compute. All evaluation is offline on recorded datasets, and code is promised after acceptance.
Figures



Abstract
Electroencephalography (EEG) decoding is a central route toward brain-computer interfaces for communication, rehabilitation, cognitive assessment, and neurological monitoring. Recent EEG foundation models have substantially advanced reusable signal representations, but their downstream use still typically requires a task-specific decoder, gradient-based adaptation, and validation-driven model selection. We investigate a complementary foundation-model paradigm based on in-context learning: labeled EEG recordings define the decoding task as context, and new recordings are predicted without updating model parameters. We first pair raw EEG features with a pretrained general-purpose in-context predictor. This direct formulation provides a promising starting point, but its performance remains limited and unstable and does not generalize reliably across EEG paradigms. We find that suitable context construction can address these limitations by improving the effective signal-to-noise ratio and exposing temporal and spatial structure. Building on this insight, we introduce a general framework that combines EEG-specific context construction with a frozen in-context predictor and a metric-based context adaptation mechanism, which matches each downstream task to an appropriate context representation without relying on validation data. Across ten datasets spanning seven EEG decoding paradigms, our method achieves the highest mean BAcc among eleven specialized and fine-tuned EEG baselines, without task-specific parameter updates or validation-based model selection. This framework provides a practical path toward tuning-free EEG foundation models in which adaptation is expressed through context rather than parameter updates.
Summaries are written automatically from each paper's text. Figures and videos come from the paper and its project page; all credit goes to the authors.
