Can a lightweight EEG foundation model over discrete neural codes match larger models?

BrainCodes, a 1.9M-parameter EEG foundation model, matches or beats larger models across 14 benchmarks and sparse wearable montages.

Direct answer

Yes, within the benchmarks this paper tests. BrainCodes reaches the highest mean performance among the compared models across 14 downstream tasks in both linear probing and full fine-tuning, while its backbone holds 1.9M trainable parameters — up to 97% fewer than comparable architectures — and it keeps about 91% of full-montage performance when reduced to 4 electrodes.

1sources cited

This article was generated with WisPaper-powered search and paper analysis.

Why waveform reconstruction can miss narrowband rhythms

Most EEG foundation models learn by reconstructing masked patches of the signal or its spectrum, an objective inherited from language and vision. The paper argues this objective is poorly matched to EEG. Because EEG power spectra fall off roughly as f^-alpha, a squared-error loss in the frequency domain is dominated by high-power broadband content, so a model can lower reconstruction error by fitting the aperiodic background while preserving little rhythmic structure.

Spatial reconstruction has a parallel problem. Scalp potentials are linear mixtures of underlying sources, and neighboring electrodes carry redundant mixtures, so a masked channel can be approximated from its neighbors — even spherical spline interpolation recovers missing signals with high fidelity. A model can therefore solve masked-channel reconstruction through interpolation without encoding physiologically informative spatial dynamics. The authors treat this as an empirical question that downstream accuracy alone answers only partially, which motivates both their objective and their representation probes.

Predicting discrete codes instead of waveforms

BrainCodes is pretrained to predict a finite set of discrete latent codes produced by a vector-quantized tokenizer, rather than to regress waveform values. The tokenizer allocates capacity through a rate–distortion trade-off, concentrating representational capacity on distinctions between samples; because the prediction target is categorical, its weighting is not directly governed by absolute signal power. In the released setup the model reads codes from a frozen BioCodec tokenizer with six residual quantization stages of 256 codewords at 20.8 frames per second, and the tokenizer's 3.15M parameters stay frozen, so the stored encoder alone is 7.19 MiB.

Two design choices target the properties reconstruction tends to lose. Channel positional encoding uses relative electrode distances, so the positional part of channel attention depends only on inter-electrode displacement — the geometric quantity most directly tied to volume conduction at the scalp. An auxiliary objective injects localized narrowband perturbations during training to encourage sensitivity to oscillations. The backbone is compact: width 128, 8 attention heads, and three blocks of two time-attention layers plus one channel-attention layer, with crops drawn from 2 to 30 seconds and random subsets of 16 to 64 channels so that short windows and sparse montages appear during pretraining.

Matching larger models on 14 benchmarks

The headline comparison is a parameter-efficiency result. Across 14 downstream benchmarks, BrainCodes records the highest mean performance among compared models in both linear probing and full fine-tuning with 1.9M backbone parameters. In the reported table, BrainCodes reaches 0.7720 balanced accuracy, 0.7697 Cohen's kappa, and 0.8857 weighted F1, ahead of REVE-Base at 69M parameters (0.7660, 0.7470, 0.8450) and well ahead of CBraMod at 4.0M (0.7256, 0.6267, 0.7905). The abstract summarizes the gap as up to 97% fewer trainable parameters than comparable architectures.

The low-resource sleep staging table shows a wider margin. On EESM23 six-class sleep staging, BrainCodes reaches 0.5254 balanced accuracy, 0.4847 kappa, and 0.5908 weighted F1, against 0.4176, 0.3698, and 0.4905 for REVE-Base and 0.4148, 0.3883, and 0.5174 for the 1.9M-parameter TFM-Tokenizer. These are benchmark numbers on curated retrospective datasets, and the authors state they are not evidence of fitness for clinical deployment.

Transfer to four-electrode consumer devices

The paper describes its evaluation on consumer-grade hardware as the first systematic test of EEG foundation models in that setting, using three datasets spanning in-ear EEG and the Muse headband. BrainCodes substantially outperforms the published baselines there. On the Muse tasks it reaches 0.5885 balanced accuracy on three-class motor imagery and 0.8160 on the three-class mental task, with kappa of 0.3650 and 0.7097 respectively.

A controlled sparse-montage simulation isolates how much performance depends on electrode count: with only 4 electrodes, BrainCodes retains on average 91% of its full-montage performance. That figure comes from simulated reductions of denser montages, not from the consumer devices themselves, so it bounds the expected cost of sparsity rather than measuring headband accuracy directly. The pretraining recipe is consistent with this goal, since each training crop kept a random subset of 16 to 64 channels.

Probes show retained spatial and spectral structure

Because downstream accuracy cannot show which signal properties a representation keeps, the authors add controlled probes. For the spatial probe they measure how influence decays with Euclidean electrode distance, fitting the slope of log influence against distance with coordinates scaled to a maximum electrode norm of 1. For the spectral probe they inject band-limited noise into a spatially contiguous 20–40% of channels — delta bursts of 0.5 to 4 Hz, spindle bursts of 11 to 16 Hz, and continuous mu (8 to 13 Hz, central electrodes) and beta (13 to 30 Hz) activity — with white and pink noise matched in power at 35 to 15 dB SNR, then fit standardized logistic regressions on the change in channel-averaged features under leave-one-participant-out validation.

Relative to the compared models, BrainCodes shows stronger geometry-consistent spatial locality and greater sensitivity to oscillatory components than to the aperiodic slope of the spectrum. The authors read this as evidence that its representations retain measurable spatial and spectral properties beyond what downstream scores capture. This is a probe-level result about representation geometry, not a claim that the model recovers underlying neural sources.

Where the advantage narrows

The advantage is not uniform. On the NeuroRVQ benchmark suite, BrainCodes reaches the highest mean chance-normalized accuracy at 0.579, ahead of NeuroRVQ at 0.559 and NeuroGPT at 0.484, and leads on executed movement (0.735 against 0.700 for NeuroRVQ), working memory (0.606 against 0.597 for NeuroGPT), and resting state — but ranks second on the ERP task. The authors attribute that shortfall to the task's 1-second windows, which yield only 21 latent frames in BioCodec, so the quantized representation may resolve the evoked response only coarsely.

That suite is also not directly rank-comparable with published values: the authors used 5-fold subject-disjoint cross-validation with a separate validation fold, training each model on about 60% of participants, whereas the original benchmark used 10-fold cross-validation and trained on 90%. The comparison is internally consistent but not a like-for-like reproduction of the published leaderboard.

What the parameter count does not settle

The efficiency claim needs careful reading. The 1.9M figure counts the backbone; the frozen BioCodec tokenizer adds 3.15M parameters, and with a classification head the fine-tuned model held between 1.9 and 2.5 million trainable parameters across datasets, from 1,917,510 on EESM23 to 2,520,744 on TUAB. Tables that report results mention only encoder size. So the comparison is against trainable encoder parameters, and the tokenizer is a shared frozen front end rather than a free component.

Scope is also bounded by data and population. Pretraining used more than 800 hours from over 1,000 participants, drawn from the Healthy Brain Network release, which consists of children and adolescents; the authors explicitly make no claims about clinical or diagnostic validity in that or any other population. The paper is a preprint under review, and its clinical-looking tasks are benchmark evaluations on curated retrospective datasets.

The practical priority the evidence supports is therefore specific: when the constraint is trainable encoder size and the deployment target is a sparse consumer montage, BrainCodes is the stronger choice in these comparisons, with the ERP-style short-window case and the frozen-tokenizer cost as the conditions to check first.

Sources used in this answer

1

BrainCodes: A Lightweight EEG Foundation Model over Discrete Neural Codes

BrainCodes, a 1.9M-parameter EEG foundation model pretrained on discrete tokenizer codes, matches or surpasses larger models across 14 benchmarks and retains about 91% of full-montage performance with only 4 electrodes.