Manuscript Offprint

arXiv:2610.35246

NOMAD-EEG: Native Omni-Montage Adaptive Diffusion

Abdulkader Helwan, Khadidja Henni, Lina Abou-Abbas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Purpose. Electroencephalography (EEG) montages, channel counts and recording lengths vary widely, but most EEG foundation models are bound to the channel set and input length they were trained on. We aimed to build a generative EEG foundation model independent of the number, identity and order of electrodes and of the input length.

Methods. NOMAD-EEG is a 12.0 M-parameter diffusion model that alternates state-space layers along time, without patches, with attention across electrodes identified only by their 3D scalp position. It was pre-trained on 147 h of unlabelled EEG from a single corpus and evaluated with frozen linear probes on ten datasets with 1 to 64 electrodes against seven foundation models run under one protocol, and on two unseen populations.

Results. Despite its small size (12.0 M parameters against 69 M for REVE) and single pre-training corpus, NOMAD-EEG outperformed all seven foundation models on EEGMMIDB motor imagery (balanced accuracy 0.442), Siena seizure detection (macro F1 0.622) and Bonn seizure detection (AUROC 0.999), had the highest accuracy of the seven compared models on TUEP epilepsy diagnosis (0.640) and, after fine-tuning, the highest κ\kappa (0.635) and weighted F1 (0.814) on TUEV event classification. It was the best of five models on P300 detection in autism with an unseen eight-electrode montage (AUROC 0.718). With only 5 of 19 electrodes, its mean AUROC fell only from 0.942 to 0.891.

Conclusion. Identifying electrodes by position and modelling time without patches let one small model, pre-trained on one corpus, outperform much larger EEG foundation models on seizure detection, epileptiform event classification, epilepsy diagnosis and motor imagery.

Keywords: EEG foundation model; Diffusion model; Montage-agnostic; State-space model; Self-supervised learning; Seizure detection

1 Introduction

Electroencephalography (EEG) is recorded with very different hardware and conventions. A clinical epilepsy study may use the 19–21 electrodes of the international 10–20 system, often re-referenced into a bipolar montage; a motor-imagery study may use a 64-electrode 10–10 cap; a sleep study may record only two bipolar derivations; and some archives hold a single intracranial or scalp channel. Recording lengths vary just as widely, from 4 s trials in brain–computer interfaces to the 30 s epochs of sleep scoring. At the same time, the events clinicians care about are brief: a spike lasts 20–70 ms and a sharp wave 70–200 ms [1]. An EEG foundation model is only broadly useful if one set of pretrained weights can read all of these inputs, at the temporal resolution the events require.

Most EEG foundation models are, however, bound to the format they were trained on. Some identify each channel by a learned embedding looked up in a fixed vocabulary of electrode names or slots, so channels outside that vocabulary cannot be represented (LaBraM [2], EEGPT [3], BIOT [4]). Others mix channels with convolutions along the channel index, so the result depends on the order in which channels are listed (CBraMod [5], EEGMamba [6]). Most tokenise time into non-overlapping patches of about one second, and some cap the number of patches, which fixes a maximum input length.

Generative pre-training has recently emerged as a strong alternative to masked reconstruction for EEG. Denoising diffusion [7] was used by our earlier DiffEEG model [8]; EEGDM [9] combined diffusion with a structured state-space backbone; and B[FM] 2^{2} [10] showed that flow matching [11] on the raw waveform reaches state-of-the-art accuracy on seven of nine downstream tasks while pre-training on only about 307 h of EEG. Yet each of these generative models inherits a fixed input format. DiffEEG maps its input into a fixed 22-channel layout, EEGDM conditions a single-channel network on one of 22 bipolar channel identities, and B[FM] 2^{2} convolves along the electrode index of what it describes as a small, fixed set of electrodes.

Montage-agnostic models do exist, but they take the opposite design choices. REVE [12], LUNA [13] and BrainOmni [14] place every channel by its 3D sensor position and so accept arbitrary electrode sets. All three are trained with masked or tokenised reconstruction objectives on transformers that operate on temporal patches or windows, which trades temporal resolution for tractable attention. No existing model, to our knowledge, combines a generative objective, position-based montage independence and patch-free temporal modelling (Table 1).

We introduce NOMAD-EEG (Native Omni-Montage Adaptive Diffusion), a diffusion foundation model whose architecture has no parameter tied to the number, identity or order of electrodes, and none tied to the input length (Fig. 1). Every block of the network factorises spatio-temporal mixing into two operations. A bidirectional diagonal state-space layer (S4D) [15] mixes information along time within each electrode, at a fixed 20 ms resolution and with a convolution kernel generated for whatever length the input has. Multi-head attention then mixes information across electrodes within each time step, where each electrode is identified only by Fourier features [16] of its 3D scalp coordinate. The network is trained to denoise EEG under a cosine noise schedule [17], and its gated intermediate activations are read out as representations.

Our contributions are:

• A montage- and length-agnostic generative backbone. NOMAD-EEG is, among the models we review, the only EEG foundation model that is simultaneously diffusion-pretrained, places electrodes by 3D position in every block, and models time without patches at 20 ms resolution with no maximum length, pre-trained on 30 s windows (1,500 steps per electrode) with a receptive field spanning the whole input. We show that its outputs are permutation-equivariant in the electrodes and that its parameter count is independent of the number of electrodes and samples (Section 2.4).

• Task heads that keep this independence. We define a frozen feature extractor (windowed mean and standard deviation of gate activations) and a token-based fine-tuning head whose output size does not depend on the montage or the recording length (Section 2.5).

• A controlled comparison of diffusion and flow matching. Because the objective is a single switch in our implementation, we pre-train two models that differ only in the objective and compare them on every downstream task.

• A single-protocol benchmark. We re-run seven published EEG foundation models from their released weights on eight datasets under one evaluation protocol, rather than quoting results obtained under different splits, and add transfer to two populations unseen in pre-training (P300 detection in autism and Parkinson's disease diagnosis).

• Ablations and a scaling study. We measure what pre-training adds over random weights, test electrode-order invariance and missing electrodes, and train a 5.6-times larger model on 47 times more data to test whether scale helps.

Pre-trained on 147 h of unlabelled TUEV recordings, NOMAD-EEG reads datasets with one to 64 electrodes with a single set of weights. Across eight benchmarks it is never ranked below fourth among eight foundation models and is first on Bonn and EEGMMIDB, and it is the best of five models on P300 detection with an eight-electrode montage it never saw. A larger model trained on far more data was not significantly better on any benchmark.

References (44)