Generative modeling offers a promising solution to the scarcity of labeled clinical electroencephalography (EEG) data under strict privacy constraints. Although recent generative models report substantial improvements in generation fidelity, we show that these gains conceal a categorical failure. EEG is not an arbitrary multichannel signal: each channel records the voltage difference between two scalp electrodes. So, real recordings satisfy exact linear identities among their channels. Current generators invariably violate these identities, yet this has gone unnoticed. We therefore propose MontageFlow, a flow-matching model that enforces these identities by restricting its output to signals that satisfy them. We find that ensuring validity improves fidelity too. Furthermore, to retain the EEG characteristics that oversmoothing washes out, we also condition the model on a physiological state vector encoded from the whole EEG window. For generation, this vector is drawn from a prior fitted in latent space. Across 3 large-scale benchmarks, our model improves TS-FID by 1.6-3.6× over the closest rival while ensuring validity.
Figures & tables
Figure 1: The bipolar montage induces two exact linear constraints. (a) Each channel is an oriented difference between two electrode potentials. Channels 1–4 and 9–12 form two paths from Fp1 to O1, and channels 5–8 and 13–16 do the same from Fp2 to O2. Either path sums to the potential difference between its endpoints. (b) The two left path sums overlap on a real TUSZ window, and (c) their difference is numerically zero.
Figure 2: Overview of MontageFlow. During training, an encoder fϕ maps an EEG window X to a global latent h . The decoder receives the current flow state Xt , flow time t , class label y , and perturbed latent h , and predicts a velocity field. After encoder-decoder training, a class-conditional rectified-flow prior pψ(h∣y) is fitted to the encoded training latents and replaces the encoder during generation. The predicted velocity is projected onto kerA . At inference, the Gaussian source is also projected to guarantee valid EEG.
classes
window
train windows
test windows
TUSZ
2
16×1000
25,542
9,538
TUEV
6
16×1000
68,445
29,421
TUAB
2
16×2000
297,103
36,945
Table 1: Corpora used in our study. Windows lie on the 16-channel bipolar montage at 200 Hz.
Method
TS-FID (train) ↓
TS-FID (test) ↓
montage index (test) ↓
TUSZ
TUEV
TUAB
TUSZ
TUEV
TUAB
TUSZ
TUEV
TUAB
EEG-GAN
342.3
316.9
394.5
331.4
400.9
455.7
0.539
0.519
0.505
Vanilla diffusion
113.2
82.4
120.1
121.6
145.8
149.1
0.069
0.078
0.071
Vanilla flow matching
125.0
123.9
157.1
137.0
212.8
186.0
0.283
0.437
0.294
JET
207.5
212.5
244.6
199.1
301.9
285.8
0.991
0.988
0.986
JET ×
203.2
139.0
211.5
198.5
221.9
252.6
0.151
0.217
0.148
Table 2: Generation quality and physical validity ( bold : best, underline : second best).
Method
TUSZ
TUEV
TUAB
EEG-GAN
0.412
0.674
0.668
Vanilla diffusion
0.928
0.948
0.961
Vanilla flow matching
0.926
0.935
0.963
JET
−0.033
0.215
0.024
JET ×
0.916
0.908
0.948
MontageDiff
0.948
0.973
0.981
Table 3: Shape correlation on the test split ( ↑ , bold : best, underline : second best).
Table 5: Incremental ablation from vanilla flow matching to MontageFlow (TS-FID ↓ ).
Projection
TS-FID ↓
PSD slope ↓
Envelope ↓
Hj. act. ↓
Hj. mob. ↓
Drift ↓
Inference only
140.6
0.629
0.244
0.256
0.366
0.097
Training + inference
59.9
0.400
0.164
0.215
0.232
0.092
Table 6: Is post-hoc projection enough? TUAB test split (all corpora: Table 9 ). Inference only projects the model of row 5 of Table 5 at sampling time, and training + inference is MontageFlow ( bold : best).
Figure 3: Latent conditioning mitigates oversmoothing. Representative samples from TUAB are shown.
Method
Patch
Params
s/step
GPU-h
ms/window
EEG-GAN
–
130M
2.40
36.0
2
Vanilla diffusion
100
130M
0.17
7.5
73
Vanilla flow matching
100
130M
0.17
7.5
74
JET
200
130M
0.11
5.0
40
JET ×
200
130M
0.08
3.7
37
MontageDiff
100
156M
0.23
10.6
76
Table 7: Computational cost across methods on TUAB.
Figure 4: Physiological diagnostics. Top: power spectrum, median over windows, with shading from the 10th to the 90th percentile. Middle: amplitude over time (root-mean-square across channels), median over windows, with shading over the middle half of windows. Bottom: distribution of sample amplitudes (log density). Windows are 10 s on TUAB and 5 s on TUEV and TUSZ.
Method
TS-FID ↓
PSD slope ↓
Envelope ↓
Hj. act. ↓
Hj. mob. ↓
Drift ↓
Avg. ↓
EEG-GAN
331.4
1.846
1.216
1.362
0.831
0.712
1.193
Vanilla diffusion
121.6
0.684
1.679
1.652
0.571
0.204
0.958
Vanilla flow matching
137.0
0.199
1.651
1.585
0.391
0.102
0.786
JET
199.1
0.862
0.615
0.506
0.673
0.410
0.613
JET ×
198.5
0.897
0.518
0.467
0.694
0.282
0.571
MontageDiff
40.6
1.141
0.515
0.587
0.480
0.065
0.557
Table 8: Physiological diagnostics on the TUSZ test split ( bold : best, underline : second best).
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Generated and real windows. First four channels of the bipolar montage, five seconds, one window per corpus and method (the median-amplitude window among 2,000 samples).
Figure 6: Channel-wise power spectrum. Median over windows for each channel, with shading from the 10th to the 90th percentile.
Figure 7: Channel-wise amplitude over time. Absolute amplitude of each channel, median over windows, with shading over the middle half of windows.
Figure 8: Channel-wise amplitude distribution. Distribution of sample amplitudes for each channel (log density).
Corpus
Projection
TS-FID ↓
PSD slope ↓
Envelope ↓
Hj. act. ↓
Hj. mob. ↓
Drift ↓
Inference only
63.1
0.257
0.639
0.584
0.471
0.089
TUSZ
Training + inference
44.0
0.221
0.580
0.551
0.302
0.069
Inference only
107.6
0.268
0.267
0.280
0.217
0.129
TUEV
Training + inference
93.1
0.230
0.261
0.278
0.210
0.121
Inference only
140.6
0.629
0.244
0.256
0.366
0.097
TUAB
Training + inference
59.9
0.400
0.164
0.215
0.232
0.092
Appendix
Table 9: Post-hoc projection vs. projection in training on all three corpora, test split ( bold : best per corpus).