Paper deep dive
MontageFlow: Physically Valid High Fidelity EEG Generation
Sudarshan Regmi, Nabaraj Subedi, Arvind Pillai, Yu Yvonne Wu, Yuliang Chen, Michael V. Heinz, Lisa Marsch, Nicholas C. Jacobson, Andrew Campbell
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract: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$\times$ over the closest rival while ensuring validity.
Tags
Links
- Source: https://arxiv.org/abs/2610.14507v1
- Canonical: https://arxiv.org/abs/2610.14507v1
Trouble viewing inline? Open PDF directly →
Full Text
58,355 characters extracted from source content.
Expand or collapse full text
MontageFlow: Physically Valid High Fidelity EEG Generation Sudarshan Regmi Nabaraj Subedi Arvind Pillai Yu Yvonne Wu Yuliang Chen Affiliation: Michael V. Heinz, Lisa Marsch, Nicholas C. Jacobson, Andrew Campbell Affiliation: Dartmouth College Affiliation: Correspondence: sudarshan.regmi.gr@dartmouth.edu Abstract 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. †footnotetext: Code is available at https://github.com/sudarshanregmi/montageflow. 1 Introduction Clinical electroencephalography (EEG) data are difficult to collect at scale. Recordings with clinically meaningful labels require expert review, and privacy constraints limit data sharing. Generative models offer a way to relieve this bottleneck, synthesizing data where labeled recordings are scarce or cannot be shared. Yet EEG generation remains relatively underexplored despite recent advances in diffusion and flow-based modeling (Ho et al., 2020; Lipman et al., 2023; Peebles & Xie, 2023). The few existing approaches adapt generative adversarial networks (Hartmann et al., 2018), diffusion models (Shu et al., 2025) and flow matching models (Wang et al., 2026), typically treating EEG as a generic multichannel time series. This treatment overlooks a defining property of clinical EEG: its channels are structurally constrained by how they are recorded. Clinical EEG is acquired from scalp electrodes, but read as potential differences between pairs of them. The chosen set of pairs, called a montage, links electrodes into chains. Summing the differences along a chain cancels the intermediate electrodes and leaves only the difference between its endpoints. Two chains with the same endpoints must therefore sum to the same value at every timepoint. The montage used across our benchmarks contains sixteen electrode pairs and two independent loops. These impose two independent linear constraints, restricting the sixteen channel values at each timepoint to a fourteen-dimensional subspace. Real recordings satisfy these identities exactly, but samples synthesized by current generators do not. This failure has remained hidden because standard evaluation metrics do not explicitly measure montage violations. More importantly, improved distributional fidelity does not guarantee physical validity. We therefore enforce these identities by construction rather than by penalizing violations. Specifically, we parameterize the model output within the subspace permitted by the montage. Invalid signals are thus excluded without introducing an additional tuning hyperparameter. Enforcing the montage identities guarantees physical validity, but does not by itself ensure fidelity to real EEG. Capturing dominant low-frequency activity while preserving low-energy transients and heavy-tailed amplitudes remains challenging. JET (Wang et al., 2026) addresses waveform fidelity through explicitly specified auxiliary temporal, spectral, and statistical objectives. We instead use learned window-level conditioning to help preserve these characteristics. Specifically, we encode each multichannel EEG window into a single physiological state vector and condition the flow-matching decoder on it. This vector provides the decoder with window-specific context to guide generation. At sampling time, the vector is drawn from a prior fitted in the encoder’s latent space. In summary, we propose MontageFlow, a flow-matching framework for physically valid, high-fidelity EEG generation that combines montage-constrained outputs with learned window-level conditioning. Across TUSZ, TUEV, and TUAB, MontageFlow improves TS-FID by 1.61.6–3.6×3.6× over the strongest baseline while satisfying the montage identities. Our contributions are summarized below: • Physically valid EEG generation. We show that state-of-the-art generators synthesize physically invalid EEG signals and introduce the montage index to measure this (00 = perfectly valid). MontageFlow restricts its output to the subspace of valid signals (Section 3). • Conditioning mitigates oversmoothing and validity improves fidelity. We observe that latent conditioning mitigates oversmoothing of EEG. Additionally, we find that enforcing validity improves fidelity, lowering TS-FID on all six splits by 77 to 5151 points (Section 6). • State-of-the-art results. Across TUSZ, TUEV and TUAB, MontageFlow improves TS-FID by 1.61.6–3.6×3.6× over the strongest baseline, with a montage index of exactly 00 (Section 5). 2 Preliminaries We first derive the exact linear constraints imposed by the bipolar EEG montage, then show that standard flow matching does not guarantee that generated outputs satisfy them. Bipolar montage geometry. Let X=[(τ1),…,(τL)]∈ℝC×LX=[x( _1),…,x( _L)] ^C× L denote an EEG window with C=16C=16 channels and L physical time points. A bipolar montage represents channel i as the potential difference between an ordered pair of electrodes: xi(τ)=vai(τ)−vbi(τ),i=1,…,C.x_i(τ)=v_a_i(τ)-v_b_i(τ), i=1,…,C. (1) As illustrated in Figure 1(a), summing channels along a directed path cancels the potentials at intermediate electrodes, leaving only the difference between the path endpoints. The montage contains two pairs of paths with common endpoints. On the left hemisphere, channels 11–44 and 99–1212 both connect Fp1Fp1 to O1O1. On the right hemisphere, channels 55–88 and 1313–1616 both connect Fp2Fp2 to O2O2. 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. Consequently, the following equalities hold at every physical time point τ: x1(τ)+x2(τ)+x3(τ)+x4(τ) x_1(τ)+x_2(τ)+x_3(τ)+x_4(τ) =x9(τ)+x10(τ)+x11(τ)+x12(τ), =x_9(τ)+x_10(τ)+x_11(τ)+x_12(τ), (2) x5(τ)+x6(τ)+x7(τ)+x8(τ) x_5(τ)+x_6(τ)+x_7(τ)+x_8(τ) =x13(τ)+x14(τ)+x15(τ)+x16(τ). =x_13(τ)+x_14(τ)+x_15(τ)+x_16(τ). (3) Figure 1(b) verifies Eq. 2 on a representative TUSZ window. Montage constraint. Let 41_4 and 40_4 denote four-dimensional vectors of ones and zeros, respectively. The two path equalities can be encoded by the constraint matrix A=[4⊤4⊤−4⊤4⊤4⊤4⊤4⊤−4⊤]∈ℝ2×16,A= bmatrix1_4 &0_4 &-1_4 &0_4 \\ 0_4 &1_4 &0_4 &-1_4 bmatrix ^2× 16, (4) where the four column groups correspond to channels 11–44, 55–88, 99–1212, and 1313–1616, respectively. Thus, A(τ)=0Ax(τ)=0 at every physical time point. Since A acts along the channel dimension, the corresponding window-level constraint is AX=02×L.AX=0_2× L. (5) The set of montage-valid channel vectors is therefore kerA=∈ℝ16:A=0. A=\u ^16:Au=0\. Since the two rows of A are linearly independent, rank(A)=2rank(A)=2, and kerA A is a 14-dimensional subspace of ℝ16R^16. Standard flow matching. Let E∈ℝC×LE ^C× L have i.i.d. standard Gaussian entries and t∈[0,1]t∈[0,1] denote flow time. Linear flow matching interpolates Xt=tX+(1−t)EX_t=tX+(1-t)E and trains a velocity network uθ(Xt,t)u_θ(X_t,t) to regress the target velocity X−EX-E. Generation starts from X^0=ε∼(0,I) X_0= (0,I) and integrates the learned velocity along its own trajectory X^t X_t: X^=ε+∫01uθ(X^t,t)t X= + _0^1u_θ( X_t,t)\,dt. Applying the montage constraint of Eq. 5 to this sample gives AX^=Aε+∫01Auθ(X^t,t)tA X=A + _0^1A\,u_θ( X_t,t)\,dt (6) where Aε≠0A ≠ 0 almost surely and uθu_θ is unconstrained. Nothing forces the two terms to cancel, so standard flow matching does not guarantee montage-valid EEG. 3 MontageFlow Overview. The overview of MontageFlow is shown in Figure 2. MontageFlow removes both sources of montage violation (Eq. 6) by construction: generation starts from noise projected onto kerA A, and the velocity network’s output is always projected onto kerA A. For fidelity, the velocity network is additionally conditioned on a global latent encoding of the target window. Montage projector. Projecting the noise and the velocity onto kerA A requires the same operation: given any channel vector ∈ℝ16u ^16, return a vector in kerA A. The vector A∈ℝ2Au ^2 holds the amounts by which u violates Eqs. 2 and 3 respectively. To make u valid, we cancel each violation by spreading it equally over the eight channels involved. Each of the four channels on the left-hand side of the equation is decreased by one eighth of the violation, and each of the four on the right-hand side is increased by the same amount: P=−18A⊤(A),P=I−18A⊤A.Pu=u- 18A (Au), P=I- 18A A. (7) Since each row of A has eight entries equal to ±1± 1 and the two rows share no channel, AA⊤=8I2A =8I_2. Hence, AP=A−18(AA⊤)A=0AP=A- 18(A )A=0. Applied to a window X, P acts on each column, so A(PX)=(AP)X=0A(PX)=(AP)X=0. Therefore, P maps every window to a montage-valid window. Projected velocity. With P in hand, the two projections of the overview are immediate. For the velocity, let vθ(Xt,t,y,h)∈ℝC×Lv_θ(X_t,t,y,h) ^C× L be the raw output of the velocity network, conditioned on flow time t, class label y, and a latent h introduced below. MontageFlow uses the projected velocity uθ(Xt,t,y,h)=Pvθ(Xt,t,y,h),u_θ(X_t,t,y,h)=P\,v_θ(X_t,t,y,h), (8) which satisfies Auθ=0Au_θ=0. We sample t=sigmoid(z)t=sigmoid(z), with z∼(−0.8,0.82)z (-0.8,0.8^2), and set Xt=tX+(1−t)EX_t=tX+(1-t)E. We optimize the following ℓ1 _1 velocity-matching objective: ℒMF(θ,ϕ)=X,y,E,t,η,σ[‖(X−E)−Pvθ(Xt,t,y,h~)‖1].L_MF(θ,φ)=E_X,y,E,t,η,σ [ \|(X-E)-P\,v_θ(X_t,t,y, h) \|_1 ]. (9) Here, h~=fϕ(X)+ση h=f_φ(X)+ση is the perturbed conditioning latent, defined in Eq. 12. Figure 2: Overview of MontageFlow. During training, an encoder fϕf_φ maps an EEG window X to a global latent h. The decoder receives the current flow state XtX_t, flow time t, class label y, and perturbed latent h~ h, and predicts a velocity field. After encoder-decoder training, a class-conditional rectified-flow prior pψ(h∣y)p_ψ(h y) is fitted to the encoded training latents and replaces the encoder during generation. The predicted velocity is projected onto kerA A. At inference, the Gaussian source is also projected to guarantee valid EEG. Validity by construction. The remaining source of violation is the start state, which we also project. Generation draws ε∼(0,I) (0,I), starts from X^0=Pε X_0=P , and integrates the projected velocity: X^=Pε+∫01Pvθ(X^t,t,y,h)t. X=P + _0^1P\,v_θ( X_t,t,y,h)\,dt. (10) Applying A gives AX^=APε+∫01APvθ(X^t,t,y,h)t=0A X=AP + _0^1AP\,v_θ( X_t,t,y,h)\,dt=0 since AP=0AP=0. The generated sample now satisfies Eq. 5. Latent conditioning. Clinical EEG varies widely from window to window in amplitude and rhythm. Generators trained with a regression loss can average this variety away and produce oversmoothed samples. To mitigate this, we give the velocity network a global view of the window it is generating by conditioning it on a latent physiological state vector: h=fϕ(X)∈ℝ256,h=f_φ(X) ^256, (11) computed by an encoder fϕf_φ from the clean target window X during training. At generation time, the conditioning vector is sampled from a learned latent prior rather than obtained by encoding a real window. To make the decoder robust to deviations between prior samples and encoded latents, we perturb the latent during training: h~=fϕ(X)+ση,η∼(0,I256),σ∼(0,1). h=f_φ(X)+ση, η (0,I_256), σ (0,1). (12) The velocity network receives h~ h as conditioning in Eq. 9, and the encoder is trained jointly with it. Latent prior. After jointly training the encoder and the velocity network, we replace the encoder with a learned prior. We encode the training set into a latent bank ℋ=(fϕ(Xi),yi)i=1nH=\(f_φ(X_i),y_i)\_i=1^n and fit a class-conditional rectified-flow prior pψ(h∣y)p_ψ(h y) to these pairs. Conditioning both the prior and the velocity network on y preserves the dependence between latent and label seen in training. Sampling. To generate a window, we draw a class y, a latent h∼pψ(h∣y)h p_ψ(h y), and a start state X^0=Pε X_0=P , then integrate Eq. 10 with K Euler steps. MontageDiff. Our method is objective-agnostic, so it also applies to denoising diffusion models (Ho et al., 2020). We term this variant MontageDiff (Appendix E). 4 Experimental setup Datasets. We evaluate on the three Temple University Hospital (TUH) EEG corpora used by prior work: TUAB (abnormal/normal, 2 classes), TUEV (6 event types, heavily imbalanced), and TUSZ (seizure/background, 2 classes). All three are preprocessed with the released pipeline of Wang et al. (2026) into 16channels×Llength16~channels× L~length windows. Table 1: Corpora used in our study. Windows lie on the 16-channel bipolar montage at 200 Hz. classes window train windows test windows TUSZ 2 16×100016× 1000 25,542 9,538 TUEV 6 16×100016× 1000 68,445 29,421 TUAB 2 16×200016× 2000 297,103 36,945 Metrics. Our primary fidelity metric is (a) TS-FID (lower is better): the Fréchet distance between representations of real and generated multivariate signals. It is computed from FFT magnitudes, so it sees spectral structure but is blind to physical validity. Hence, we propose the (b) montage index, which measures physical validity: 00 represents perfect validity, 11 is typical of independent channels. We also use (c) shape correlation, which compares the generated cross-channel correlation structure against the real one (higher is better, Appendix A). Baselines. EEG-GAN (Hartmann et al., 2018), vanilla diffusion (Ho et al., 2020), vanilla flow matching (Lipman et al., 2023), JET (Wang et al., 2026), and its cross-channel variant JET×. Implementation. The encoder of Section 3 is a causal Transformer (8 blocks, width 512, 8 heads). The encoder output is projected to a single 256-dimensional latent h. The decoder is a 1-D DiT-B transformer (12 blocks, width 768, 12 heads) with adaLN conditioning on the timestep, the class label and h. Each channel is split into patches of size 100100, and attention runs over the patches of all channels. Together they account for 156156M parameters, of which the decoder holds 130130M. Training runs for ∼160 160k steps at a batch of 128128. We use AdamW with a learning rate of 5×10−55× 10^-5 held constant after 2.52.5 epochs of warmup. The prior is then fit on the encoded training split for 1212k steps, and sampling (Figure 2) uses 5050 Euler steps. 5 Results Table 2: Generation quality and physical validity (bold: best, underline: second best). Method TS-FID (train) ↓ TS-FID (test) ↓ montage index (test) ↓ TUSZ TUEV TUAB TUSZ TUEV TUAB TUSZ TUEV TUAB EEG-GAN 342.3342.3 316.9316.9 394.5394.5 331.4331.4 400.9400.9 455.7455.7 0.5390.539 0.5190.519 0.5050.505 Vanilla diffusion 113.2113.2 82.482.4 120.1120.1 121.6121.6 145.8145.8 149.1149.1 0.069¯ 0.069 0.078¯ 0.078 0.071¯ 0.071 Vanilla flow matching 125.0125.0 123.9123.9 157.1157.1 137.0137.0 212.8212.8 186.0186.0 0.2830.283 0.4370.437 0.2940.294 JET 207.5207.5 212.5212.5 244.6244.6 199.1199.1 301.9301.9 285.8285.8 0.9910.991 0.9880.988 0.9860.986 JET× 203.2203.2 139.0139.0 211.5211.5 198.5198.5 221.9221.9 252.6252.6 0.1510.151 0.2170.217 0.1480.148 MontageDiff 25.225.2 27.9¯ 27.9 31.131.1 40.640.6 89.689.6 50.250.2 0.0000.000 0.0000.000 0.0000.000 MontageFlow 31.5¯ 31.5 24.624.6 41.0¯ 41.0 44.0¯ 44.0 93.1¯ 93.1 59.9¯ 59.9 0.0000.000 0.0000.000 0.0000.000 Generation quality and physical validity. Our models achieve the lowest TS-FID on both evaluation splits of all three datasets, and MontageFlow scores 1.61.6–3.6×3.6× lower than the strongest baseline in each setting (Table 2). In every setting, the strongest baseline is a vanilla diffusion or flow-matching model sharing our backbone. Vanilla flow matching differs from MontageFlow only in latent conditioning and montage projection, providing a controlled comparison of their combined contribution. Their individual effects are examined in Table 5. Only real recordings, MontageFlow and MontageDiff achieve a montage index of exactly 00. JET has an index near 0.990.99, while adding cross-channel attention (JET×) reduces it to 0.150.15–0.220.22. Vanilla diffusion achieves the lowest index among the baselines, at 0.0690.069–0.0780.078, but still violates the montage identities. Table 3: Shape correlation on the test split (↑ , bold: best, underline: second best). Method TUSZ TUEV TUAB EEG-GAN 0.4120.412 0.6740.674 0.6680.668 Vanilla diffusion 0.9280.928 0.9480.948 0.9610.961 Vanilla flow matching 0.9260.926 0.9350.935 0.9630.963 JET −0.033-0.033 0.2150.215 0.0240.024 JET× 0.9160.916 0.9080.908 0.9480.948 MontageDiff 0.948¯ 0.948 0.973¯ 0.973 0.981¯ 0.981 MontageFlow 0.9550.955 0.9770.977 0.9900.990 Channel relationship. Montage validity alone does not guarantee realistic cross-channel relationships: any projected output satisfies the montage identities, even if its remaining channel dependencies differ from those of real EEG. We therefore evaluate shape correlation (Table 3). MontageFlow is closest to the real-data reference on all three corpora, achieving 0.9550.955–0.9900.990. The vanilla models, which also use cross-channel attention, achieve 0.930.93–0.960.96 but consistently remain below MontageFlow. JET scores near 00 across all settings, indicating poor agreement with the cross-channel structure captured by this metric. Adding cross-channel attention in JET× raises the scores to 0.910.91–0.950.95, supporting the importance of explicitly modeling channel dependencies. EEG-GAN achieves substantially lower scores of 0.410.41–0.670.67. Table 4: Downstream balanced accuracy (↑ , bold: best, underline: second best). Method TUSZ TUEV TUAB Avg. Real recordings 0.8100.810 0.6270.627 0.7970.797 0.7450.745 EEG-GAN 0.4990.499 0.1970.197 0.5020.502 0.3990.399 Vanilla diffusion 0.5800.580 0.6070.607 0.7090.709 0.6320.632 Vanilla flow matching 0.5760.576 0.3960.396 0.5920.592 0.5210.521 JET 0.750¯ 0.750 0.4010.401 0.5810.581 0.5770.577 JET× 0.6630.663 0.4040.404 0.6230.623 0.5630.563 MontageDiff 0.7980.798 0.589¯ 0.589 0.7610.761 0.7160.716 MontageFlow 0.6040.604 0.5700.570 0.732¯ 0.732 0.635¯ 0.635 Downstream utility. We train the same classifier (CBraMod; Wang et al., 2025) for every method on 5,0005,000 generated windows per class and test it on real windows (Table 4). We select the best epoch on the real validation split and average over three seeds. The grey row uses real windows. Our method improves both generative families. MontageFlow outperforms vanilla flow matching on all three corpora, and MontageDiff raises the average accuracy of vanilla diffusion from 0.6320.632 to 0.7160.716. 6 Ablations and Analyses Table 5: Incremental ablation from vanilla flow matching to MontageFlow (TS-FID ↓ ). Method TUSZ TUEV TUAB train test train test train test Vanilla flow matching (x-parameterisation) 182.9182.9 180.4180.4 197.8197.8 276.1276.1 217.1217.1 246.0246.0 ++ velocity parameterisation 136.9136.9 138.2138.2 150.7150.7 233.9233.9 181.5181.5 215.2215.2 ++ cross-channel attention 125.0125.0 137.0137.0 123.9123.9 212.8212.8 157.1157.1 186.0186.0 ++ latent conditioning 60.460.4 74.674.6 46.846.8 120.6120.6 86.586.5 115.1115.1 ++ latent perturbation 49.849.8 60.860.8 31.831.8 106.3106.3 81.781.7 110.5110.5 ++ montage projection 31.531.5 44.044.0 24.624.6 93.193.1 41.041.0 59.959.9 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). 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 Incremental ablation with respect to vanilla flow matching. We present an incremental ablation in Table 5, which starts from flow matching and adds one component per row until it reaches MontageFlow. Switching from x- to velocity parameterisation lowers TS-FID by 3131–4747 on every split. Adding cross-channel attention gives the vanilla flow matching baseline of Table 2. It lowers TS-FID by 11–1212 on TUSZ and by 2121–2929 on TUEV and TUAB. Latent conditioning (row 4) lowers TS-FID by a further 6262–9292, the largest gain in the ladder. Perturbing the latent during training (row 5) lowers it by another 1111–1515 on TUSZ and TUEV and by about 55 on TUAB. Finally, the projection buys physical validity outright for every generated EEG window. Notably, it also improves distributional fidelity, lowering TS-FID by a further 77–5151 points on all six splits. Is post-hoc projection enough? The projection could instead be applied only at inference, as post-processing of the model trained without it (row 5 of Table 5). Both approaches make every generated window physically valid, but they differ sharply in fidelity. On TUAB, training with the projection outperforms post-hoc projection by 80.780.7 TS-FID points (59.959.9 vs. 140.6140.6) and is also better on all five physiological metrics (Table 6). TUSZ and TUEV show the same trend (Appendix D). We hypothesize the unconstrained model unnecessarily spends capacity representing invalid signals. Projected training noise. MontageFlow projects the initial noise at sampling time, but trains on unprojected Gaussian noise. We evaluate an alternative that also projects the training noise. This change worsens test TS-FID by 21.921.9 on TUSZ, 11.211.2 on TUEV, and 35.235.2 on TUAB. We hypothesize that unprojected noise adds regularization making the velocity network more robust. Latent conditioning mitigates oversmoothing. Figure 3 shows four channels of real EEG (left column) and of generated EEG (middle and right columns). The two generated columns differ only in latent conditioning, isolating its effect on oversmoothing. Without the latent, generated windows collapse to a flat average and keep 4242–52%52\% of the real median amplitude. With it, they keep 7878–84%84\%. Figure 3: Latent conditioning mitigates oversmoothing. Representative samples from TUAB are shown. Conditioning the prior on the label. The decoder is conditioned on both a window-level latent h and a class label y. Since the latent can encode class-related characteristics, sampling it from a marginal prior pψ(h)p_ψ(h) independently of y can produce inconsistent latent-label pairs. We instead fit pψ(h∣y)p_ψ(h y) and sample it with the same label that is passed to the decoder. On the test split, this improves TS-FID by 6.96.9 points on TUEV, which has 6 classes. The gain is trivial on TUSZ (1.11.1) and TUAB (1.51.5), which have 2 classes each. The regression loss (L1L_1 versus L2L_2). Flow matching conventionally uses squared-error velocity regression. Compared with L2L_2, L1L_1 places less emphasis on large residuals. We evaluate this choice by training MontageFlow under each loss. L1L_1 yields lower test TS-FID on all three datasets. Using L2L_2 instead raises it by 4.04.0 on TUSZ, 7.97.9 on TUEV, and 34.434.4 on TUAB. Table 7: Computational cost across methods on TUAB. 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 MontageFlow 100 156M 0.23 10.5 76 Computational cost. We report the computational cost of every method on TUAB in Table 7. Vanilla diffusion and vanilla flow matching share the backbone and cost the same. MontageFlow and MontageDiff add an encoder with 2626M parameters, which raises the time per training step by about 40%40\%. At generation time, sampling the latent from the prior adds about 22–33 ms per window, so both generate at nearly the speed of the vanilla models (7676 vs. 7474 ms). JET and JET× are cheaper because they use a coarser patch, and EEG-GAN generates fastest but trains slowest. 7 Physiological diagnostics 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. Table 8: Physiological diagnostics on the TUSZ test split (bold: best, underline: second best). 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 MontageFlow 44.0 0.221 0.580 0.551 0.302 0.069 0.345 We report five more diagnostic metrics in Table 8 (Appendix A). No method is closest to real EEG on every metric, but MontageFlow is closest on average, at 0.350.35 against 0.560.56 for the next best, MontageDiff. Furthermore, we qualitatively examine whether the generated signals behave like EEG by studying Figure 4. (1) Power spectrum: The top row shows the power at each frequency. Real EEG has most of its power at the lowest frequencies and falls off with frequency, with an alpha peak near 88–99 Hz on TUAB and TUEV. Below about 1212 Hz, our spectrum follows the real shape and reproduces the alpha peak at the same frequency. Vanilla flow matching has less power at almost every frequency, and on TUEV it exaggerates the alpha peak. Above 1212 Hz, our spectrum falls below the real one, most visibly on TUAB. However, real windows have much higher variance at these frequencies, and our median stays within the real shading throughout. (2) Amplitude over time: The middle row tracks signal amplitude across the window. Real EEG keeps a flat median envelope with no drift, and so does MontageFlow. Our envelope sits slightly below the real one, at 8282–91%91\% of its level, and its spread across windows is similar. Vanilla flow matching has about half the real amplitude. On TUEV, the real envelope rises near 2.52.5 s. MontageFlow reproduces this rise, while vanilla flow matching barely shows it. (3) Heavy-tailed distributions: The amplitude distribution of clinical EEG is heavy-tailed. A generator that collapses towards average behaviour loses the extremes, where transient events such as spikes live (bottom row). Our density follows the real curve from the sharp central peak down through the tails. Vanilla flow matching is too narrow everywhere, and its tails vanish by 1000μ1000\, . Above 100μ100\, , our samples keep 6060–70%70\% of the real probability mass, against 33–12%12\% for vanilla flow matching. 8 Related works EEG models. EEG is routinely used to monitor brain activity and is essential for epilepsy diagnosis (Tatum et al., 2018). Deep EEG models are predominantly discriminative and task-specific. For instance, EEGNet uses a compact CNN for EEG classification (Lawhern et al., 2018), while EEG Conformer combines convolution with self-attention to capture long-range temporal dependencies (Song et al., 2023). Gemein et al. (2020) compare deep and feature-based decoders for distinguishing pathological from normal recordings on TUAB, while Tang et al. (2022) and REST (Afzal et al., 2024) use graph neural networks for seizure detection and classification on TUSZ. Even pretrained EEG foundation models (Kostas et al., 2021; Yang et al., 2023; Jiang et al., 2024; Wang et al., 2025; El Ouahidi et al., 2025) typically require fine-tuning or linear probing on labelled data for downstream tasks (Jiang et al., 2024; Wang et al., 2025; El Ouahidi et al., 2025). However, achieving expert-level detection requires large expert-annotated datasets (Jing et al., 2023). Annotation typically relies on certified neurologists, whose expertise is in short supply (Shah et al., 2018). Moreover, clinically significant target events are rare: seizures account for less than 0.1% of the TUH EEG archive (Shah et al., 2018). Data access is also constrained by patient privacy: even TUH, the largest public EEG corpus, required HIPAA de-identification before release (Obeid & Picone, 2016). Hand-crafted augmentation can expand training data, but its effectiveness is task-dependent, and some transformations may alter the underlying semantics (Rommel et al., 2022). Per-channel augmentation may also violate montage identities (Eq. 5). Alternatively, synthetic seizure EEG can substitute for real seizures in detector training, yielding comparable performance with lower re-identification risk (Pascual et al., 2021). Despite extensive research on EEG-based predictive modelling, EEG generation remains comparatively underexplored. Generative modeling. Generative modeling has advanced rapidly, driven largely by vision. GANs enabled high-fidelity, high-resolution image synthesis (Goodfellow et al., 2014; Karras et al., 2019), but adversarial training can be unstable and prone to mode collapse (Arjovsky et al., 2017; Gulrajani et al., 2017). Diffusion models (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2021b) use a stable, non-adversarial training objective and have surpassed GANs in image quality (Dhariwal & Nichol, 2021). Closely related to diffusion, flow matching offers an alternative approach to generative modeling by learning a velocity field from noise to data (Lipman et al., 2023; Liu et al., 2023b). With Gaussian noise, the two differ mainly in how they weight noise levels (Kingma & Gao, 2023). Architectures for both diffusion and flow-matching models have evolved from U-Nets (Ronneberger et al., 2015; Ho et al., 2020) to transformers operating on latent patches (Peebles & Xie, 2023) and, more recently, on raw pixels while predicting the clean signal (Li & He, 2026). For time series, GAN- and diffusion-based generators (Yoon et al., 2019; Yuan & Qiao, 2024) use generic inductive biases without encoding domain-specific physical constraints. Constrained generative models handle general or inequality-defined feasible sets by intervening during sampling (Christopher et al., 2024) or by modifying the diffusion process (Lou & Ermon, 2023; Liu et al., 2023a). In contrast, the montage constraint is a linear equality with a fixed, closed-form projector applied during both training and sampling. Among EEG generators, EEG-GAN (Hartmann et al., 2018) uses progressive training with a modified WGAN-GP objective. Beyond GANs, Shu et al. (2025) use a diffusion model to synthesize preictal EEG for seizure prediction. Furthermore, JET (Wang et al., 2026) trains a flow-matching transformer with hand-engineered auxiliary temporal and statistical losses. However, EEG-GAN synthesizes low-fidelity samples, as seen in Table 2, and is slow to train (Table 7). JET needs its auxiliary-loss weights tuned for each dataset. None of them generates physically valid EEG. In contrast, MontageFlow synthesizes high-fidelity EEG that is also physically valid. 9 Conclusion We show that current EEG generators synthesize physically invalid signals. MontageFlow rules out such signals by restricting its output to the subspace of valid signals. MontageFlow further conditions the flow matching decoder on a physiological state vector. With latent conditioning, enforcing validity during training also improves fidelity. Across three publicly available large-scale EEG corpora, MontageFlow improves TS-FID by 1.61.6–3.6×3.6× over the strongest baseline with perfect physical validity. MontageFlow is applicable to other electrical recordings such as ECG though we restrict the scope of our study to EEG. More broadly, our results suggest that validity and fidelity need not trade off when known physical laws are built into the generator. Limitations Although MontageFlow projects the initial noise at sampling time, it trains on unprojected Gaussian noise. This choice is empirical: unprojected training noise yields better scores on TS-FID and the physiological metrics than projected noise. We offer no theoretical account of why this mismatch between training and sampling benefits generation. AI use statement In this work, we used generative AI tools for AI-assisted coding, drawing the diagrams and polishing the writing. Additionally, we used generative AI tools for finding related works and writing the latex code. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI. Acknowledgments The authors acknowledge support for this research from Evergreen: A Generative AI & Behavioral Sensing Digital Ecosystem to Promote Student Wellness and Flourishing. This work is made possible through philanthropic gifts to Dartmouth College dedicated to advancing AI-supported well-being and flourishing of college students. References Afzal et al. (2024) Arshia Afzal, Grigorios Chrysos, Volkan Cevher, and Mahsa Shoaran. REST: Efficient and accelerated EEG seizure analysis through residual state updates. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, p. 271–290. PMLR, 2024. URL https://proceedings.mlr.press/v235/afzal24a.html. Arjovsky et al. (2017) Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, p. 214–223. PMLR, 2017. URL https://proceedings.mlr.press/v70/arjovsky17a.html. Christopher et al. (2024) Jacob K. Christopher, Stephen Baek, and Ferdinando Fioretto. Constrained synthesis with projected diffusion models. In Advances in Neural Information Processing Systems, volume 37, p. 89307–89333, 2024. doi: 10.52202/079017-2834. URL https://proceedings.neurips.c/paper_files/paper/2024/hash/a28af221f2f70be183afc16797a56b91-Abstract-Conference.html. Dhariwal & Nichol (2021) Prafulla Dhariwal and Alexander Nichol. Diffusion models beat GANs on image synthesis. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P. S. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, p. 8780–8794. Curran Associates, Inc., 2021. URL https://proceedings.neurips.c/paper_files/paper/2021/hash/49ad23d1ec9fa4bd8d77d02681df5cfa-Abstract.html. El Ouahidi et al. (2025) Yassine El Ouahidi, Jonathan Lys, Philipp Thölke, Nicolas Farrugia, Bastien Pasdeloup, Vincent Gripon, Karim Jerbi, and Giulia Lioi. REVE: A foundation model for EEG - adapting to any setup with large-scale pretraining on 25,000 subjects. In Advances in Neural Information Processing Systems, 2025. URL https://openreview.net/forum?id=ZeFMtRBy4Z. Gemein et al. (2020) Lukas A. W. Gemein, Robin T. Schirrmeister, Patryk Chrabaszcz, Daniel Wilson, Joschka Boedecker, Andreas Schulze-Bonhage, Frank Hutter, and Tonio Ball. Machine-learning-based diagnostics of EEG pathology. NeuroImage, 220:117021, October 2020. doi: 10.1016/j.neuroimage.2020.117021. URL https://doi.org/10.1016/j.neuroimage.2020.117021. Goodfellow et al. (2014) Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K. Weinberger (eds.), Advances in Neural Information Processing Systems, volume 27. Curran Associates, Inc., 2014. URL https://proceedings.neurips.c/paper_files/paper/2014/file/f033ed80deb0234979a61f95710dbe25-Paper.pdf. Gulrajani et al. (2017) Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of Wasserstein GANs. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.c/paper_files/paper/2017/file/892c3b1c6dccd52936e27cbd0f683d6-Paper.pdf. Hartmann et al. (2018) Kay Gregor Hartmann, Robin Tibor Schirrmeister, and Tonio Ball. EEG-GAN: Generative adversarial networks for electroencephalograhic (EEG) brain signals, 2018. URL https://arxiv.org/abs/1806.01875. Ho et al. (2020) Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, p. 6840–6851. Curran Associates, Inc., 2020. URL https://proceedings.neurips.c/paper_files/paper/2020/file/4c5bcfec8584af0d967f1ab10179ca4b-Paper.pdf. Jiang et al. (2024) Wei-Bang Jiang, Li-Ming Zhao, and Bao-Liang Lu. Large brain model for learning generic representations with tremendous EEG data in BCI. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=QzTpTRVtrP. Jing et al. (2023) Jin Jing, Wendong Ge, Shenda Hong, Marta Bento Fernandes, Zhen Lin, Chaoqi Yang, Sungtae An, Aaron F. Struck, Aline Herlopian, Ioannis Karakis, Jonathan J. Halford, Marcus C. Ng, Emily L. Johnson, Brian L. Appavu, Rani A. Sarkis, Gamaleldin Osman, Peter W. Kaplan, Monica B. Dhakar, Lakshman Arcot Jayagopal, Zubeda Sheikh, Olga Taraschenko, Sarah Schmitt, Hiba A. Haider, Jennifer A. Kim, Christa B. Swisher, Nicolas Gaspard, Mackenzie C. Cervenka, Andres A. Rodriguez Ruiz, Jong Woo Lee, Mohammad Tabaeizadeh, Emily J. Gilmore, Kristy Nordstrom, Ji Yeoun Yoo, Manisha G. Holmes, Susan T. Herman, Jennifer A. Williams, Jay Pathmanathan, Fábio A. Nascimento, Ziwei Fan, Samaneh Nasiri, Mouhsin M. Shafi, Sydney S. Cash, Daniel B. Hoch, Andrew J. Cole, Eric S. Rosenthal, Sahar F. Zafar, Jimeng Sun, and M. Brandon Westover. Development of expert-level classification of seizures and rhythmic and periodic patterns during EEG interpretation. Neurology, 100(17):e1750–e1762, 2023. doi: 10.1212/WNL.0000000000207127. URL https://doi.org/10.1212/WNL.0000000000207127. Karras et al. (2019) Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 4396–4405. IEEE, 2019. doi: 10.1109/CVPR.2019.00453. URL http://dx.doi.org/10.1109/CVPR.2019.00453. Kingma & Gao (2023) Diederik P. Kingma and Ruiqi Gao. Understanding diffusion objectives as the ELBO with simple data augmentation. In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), Advances in Neural Information Processing Systems, volume 36, p. 65484–65516. Curran Associates, Inc., 2023. doi: 10.52202/075280-2858. URL https://proceedings.neurips.c/paper_files/paper/2023/hash/ce79fbf9baef726645bc2337abb0ade2-Abstract-Conference.html. Kostas et al. (2021) Demetres Kostas, Stéphane Aroca-Ouellette, and Frank Rudzicz. BENDR: Using transformers and a contrastive self-supervised learning task to learn from massive amounts of EEG data. Frontiers in Human Neuroscience, 15:653659, June 2021. ISSN 1662-5161. doi: 10.3389/fnhum.2021.653659. URL http://dx.doi.org/10.3389/fnhum.2021.653659. Lawhern et al. (2018) Vernon J. Lawhern, Amelia J. Solon, Nicholas R. Waytowich, Stephen M. Gordon, Chou P. Hung, and Brent J. Lance. EEGNet: a compact convolutional neural network for EEG-based brain–computer interfaces. Journal of Neural Engineering, 15(5):056013, 2018. doi: 10.1088/1741-2552/aace8c. URL https://doi.org/10.1088/1741-2552/aace8c. Li & He (2026) Tianhong Li and Kaiming He. Back to basics: Let denoising generative models denoise. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), p. 36115–36125, June 2026. URL https://openaccess.thecvf.com/content/CVPR2026/html/Li_Back_to_Basics_Let_Denoising_Generative_Models_Denoise_CVPR_2026_paper.html. Lipman et al. (2023) Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=PqvMRDCJT9t. Liu et al. (2023a) Guan-Horng Liu, Tianrong Chen, Evangelos Theodorou, and Molei Tao. Mirror diffusion models for constrained and watermarked generation. In Advances in Neural Information Processing Systems, volume 36, p. 42898–42917, 2023a. doi: 10.52202/075280-1858. URL https://proceedings.neurips.c/paper_files/paper/2023/hash/85f5c7372625d1e0df0e3996f85062d6-Abstract-Conference.html. Liu et al. (2023b) Xingchao Liu, Chengyue Gong, and Qiang Liu. Flow straight and fast: Learning to generate and transfer data with rectified flow. In The Eleventh International Conference on Learning Representations, 2023b. URL https://openreview.net/forum?id=XVjTT1nw5z. Lou & Ermon (2023) Aaron Lou and Stefano Ermon. Reflected diffusion models. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, p. 22675–22701. PMLR, 2023. URL https://proceedings.mlr.press/v202/lou23a.html. Obeid & Picone (2016) Iyad Obeid and Joseph Picone. The Temple University Hospital EEG data corpus. Frontiers in Neuroscience, 10:196, May 2016. doi: 10.3389/fnins.2016.00196. URL https://doi.org/10.3389/fnins.2016.00196. Pascual et al. (2021) Damian Pascual, Alireza Amirshahi, Amir Aminifar, David Atienza, Philippe Ryvlin, and Roger Wattenhofer. EpilepsyGAN: Synthetic epileptic brain activities with privacy preservation. IEEE Transactions on Biomedical Engineering, 68(8):2435–2446, August 2021. ISSN 1558-2531. doi: 10.1109/TBME.2020.3042574. URL https://doi.org/10.1109/TBME.2020.3042574. Peebles & Xie (2023) William Peebles and Saining Xie. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), p. 4195–4205, October 2023. Rommel et al. (2022) Cédric Rommel, Joseph Paillard, Thomas Moreau, and Alexandre Gramfort. Data augmentation for learning predictive models on EEG: a systematic comparison. Journal of Neural Engineering, 19(6):066020, November 2022. doi: 10.1088/1741-2552/aca220. URL https://doi.org/10.1088/1741-2552/aca220. Ronneberger et al. (2015) Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi (eds.), Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, volume 9351 of Lecture Notes in Computer Science, p. 234–241. Springer International Publishing, 2015. doi: 10.1007/978-3-319-24574-4_28. URL https://doi.org/10.1007/978-3-319-24574-4_28. Shah et al. (2018) Vinit Shah, Eva von Weltin, Silvia Lopez, James Riley McHugh, Lillian Veloso, Meysam Golmohammadi, Iyad Obeid, and Joseph Picone. The Temple University Hospital seizure detection corpus. Frontiers in Neuroinformatics, 12:83, November 2018. doi: 10.3389/fninf.2018.00083. URL https://doi.org/10.3389/fninf.2018.00083. Shu et al. (2025) Kai Shu, Le Wu, Yuchang Zhao, Aiping Liu, Ruobing Qian, and Xun Chen. Data augmentation for seizure prediction with generative diffusion model. IEEE Transactions on Cognitive and Developmental Systems, 17(3):577–591, June 2025. ISSN 2379-8939. doi: 10.1109/tcds.2024.3489357. URL http://dx.doi.org/10.1109/TCDS.2024.3489357. Sohl-Dickstein et al. (2015) Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In Francis Bach and David Blei (eds.), Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, p. 2256–2265, Lille, France, 2015. PMLR. URL https://proceedings.mlr.press/v37/sohl-dickstein15.html. Song et al. (2021a) Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021a. Song et al. (2021b) Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021b. URL https://openreview.net/forum?id=PxTIG12RRHS. Song et al. (2023) Yonghao Song, Qingqing Zheng, Bingchuan Liu, and Xiaorong Gao. EEG Conformer: Convolutional transformer for EEG decoding and visualization. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31:710–719, 2023. doi: 10.1109/TNSRE.2022.3230250. URL https://doi.org/10.1109/TNSRE.2022.3230250. Tang et al. (2022) Siyi Tang, Jared Dunnmon, Khaled Saab, Xuan Zhang, Qianying Huang, Florian Dubost, Daniel Rubin, and Christopher Lee-Messer. Self-supervised graph neural networks for improved electroencephalographic seizure analysis. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=k9bx1EfHI_-. Tatum et al. (2018) W. O. Tatum, G. Rubboli, P. W. Kaplan, S. M. Mirsattari, K. Radhakrishnan, D. Gloss, L. O. Caboclo, F. W. Drislane, M. Koutroumanidis, D. L. Schomer, D. Kasteleijn-Nolst Trenite, Mark Cook, and S. Beniczky. Clinical utility of EEG in diagnosing and monitoring epilepsy in adults. Clinical Neurophysiology, 129(5):1056–1082, May 2018. doi: 10.1016/j.clinph.2018.01.019. URL https://doi.org/10.1016/j.clinph.2018.01.019. Wang et al. (2025) Jiquan Wang, Sha Zhao, Zhiling Luo, Yangxuan Zhou, Haiteng Jiang, Shijian Li, Tao Li, and Gang Pan. CBraMod: A criss-cross brain foundation model for EEG decoding. In The Thirteenth International Conference on Learning Representations (ICLR), 2025. URL https://openreview.net/forum?id=NPNUHgHF2w. Wang et al. (2026) Yifan Wang, Yijia Ma, Wen Li, and Chenyu You. Let EEG models learn EEG. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=TP8OuKKmsf. Yang et al. (2023) Chaoqi Yang, M. Brandon Westover, and Jimeng Sun. BIOT: Biosignal transformer for cross-data learning in the wild. In Advances in Neural Information Processing Systems, volume 36, p. 78240–78260, 2023. doi: 10.52202/075280-3420. URL https://proceedings.neurips.c/paper_files/paper/2023/hash/f6b30f3e2d9cb53bbf2024402d02295-Abstract-Conference.html. Yoon et al. (2019) Jinsung Yoon, Daniel Jarrett, and Mihaela van der Schaar. Time-series generative adversarial networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.c/paper_files/paper/2019/file/c9efe5f26cd17ba6216bbe2a7d26d490-Paper.pdf. Yuan & Qiao (2024) Xinyu Yuan and Yan Qiao. Diffusion-TS: Interpretable diffusion for general time series generation. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=4h1apFjO99. Appendix Appendix A Metric definitions TS-FID, shape correlation and the physiological metrics compare the whole split with one generated window per real window. The montage index uses only the generated windows. Real recordings score 00. TS-FID. The Fréchet distance between Gaussians fitted to the features ϕ(X)φ(X) of real and generated windows, TS-FID=∥μr−μg∥22+Tr(Σr+Σg−2(ΣrΣg)1/2),TS -FID= _r- _g _2^2+Tr\! ( _r+ _g-2( _r _g)^1/2 ), with (μ,Σ)(μ, ) the mean and covariance of the features over all windows of the split. Following Wang et al. (2026), ϕφ takes the magnitude of the discrete Fourier transform along time and keeps the lower half of the frequency bins. It average-pools frequency to at most 256256 bins and channels to 44 groups, applies log(1+⋅) (1+·), and standardises within the window. Montage index. Each constraint in Eqs. 2–3 says that two chains of channels between the same pair of electrodes must sum to the same signal. The residual is the difference between the two sums. Within each window, we average its absolute value over time and divide by the root-mean-square of the m=8m=8 channels involved. We average this over windows and both constraints, then divide by 2m/π≈2.257 2m/π≈ 2.257, its value for independent Gaussian channels. So 00 is physically valid and 11 is typical of independent channels. Shape correlation. We average the 16×1616× 16 per-window Pearson correlation matrix of the channels over windows. Shape correlation is the Pearson correlation between the off-diagonal entries of this matrix for generated and for real windows. It asks whether the same channel pairs are coupled. Physiological metrics. Each metric in Table 8 is a per-window scalar g(X)g(X). Its distributions over generated and real windows are compared by the 11-Wasserstein distance, divided by the interquartile range of the real values (lower is better), d(g)=W1(Pggen,Pgreal)/IQR(Pgreal).d(g)=W_1 (P^gen_g,\,P^real_g )\,/\,IQR (P^real_g ). PSD slope. The exponent χ of a least-squares fit log10S(f)≈a−χlog10f _10S(f)≈ a-χ _10f to each channel’s Welch spectrum over 11–4040 Hz, averaged over channels. A signal that is too smooth has a steeper slope. Envelope. The log10 _10 RMS over time of e(t)=(1C∑cxc(t)2)1/2e(t)= ( 1C _cx_c(t)^2 )^1/2. It measures how much energy a window carries. Hjorth activity. 1C∑clog10var(xc) 1C _c _10var(x_c), the per-channel counterpart of the envelope. Hjorth mobility. 1C∑cvar(x˙c)/var(xc) 1C _c var( x_c)/var(x_c), with x˙c x_c the first difference. It is scale-free, so it reflects frequency content rather than amplitude. Drift. The least-squares slope of e(t)e(t) across the window, multiplied by L and divided by the mean of e(t)e(t). It detects windows whose amplitude ramps up or decays. Appendix B Qualitative samples Real EEG mixes an ongoing background rhythm with brief sharp events. MontageFlow reproduces the rhythm on all three corpora. On TUSZ its traces are visibly smoother than real. This is the time-domain form of the high-frequency attenuation seen in Figure 4. The baselines fail differently. Vanilla diffusion and vanilla flow matching are far too quiet. JET’s traces are over-regular: they rise and fall with a fixed rhythm. 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,0002,000 samples). Appendix C Channel-wise analysis Figure 4 averages over the sixteen channels. Figures 6, 7 and 8 show the same three analyses for each channel separately, so an error on a few channels cannot hide in the average. Each curve is a median over the 2,0002,000 windows of that channel. (1) Power spectrum: Figure 6 shows the power spectrum of each channel. Real EEG has the most alpha power on P3–O1 and P4–O2 and the weakest alpha peak on Fp1–F7, Fp2–F8, Fp1–F3 and Fp2–F4. MontageFlow shows the same pattern on all three corpora. Vanilla flow matching has less power at almost every frequency, and on TUEV it exaggerates the alpha peak on every channel. Above 1212 Hz, our spectrum generally falls below the real one but stays within the real shading. Figure 6: Channel-wise power spectrum. Median over windows for each channel, with shading from the 10th to the 90th percentile. (2) Amplitude over time: Figure 7 tracks the amplitude of each channel across the window. Every envelope is flat, for real EEG and for MontageFlow, so no channel drifts. Real EEG has the largest amplitude on Fp1–F7, Fp2–F8, Fp1–F3 and Fp2–F4 and smallest on T6–O2, C3–P3 and C4–P4. MontageFlow ranks the channels the same way on all three corpora, at 8181–95%95\% of the real level. Vanilla flow matching stays at 4444–72%72\%. Figure 7: Channel-wise amplitude over time. Absolute amplitude of each channel, median over windows, with shading over the middle half of windows. (3) Heavy-tailed distributions: Figure 8 shows the amplitude distribution of each channel. Our density follows the real curve from the sharp central peak down through the tails on every channel. On TUAB and TUEV, real EEG and MontageFlow both have their heaviest tails on Fp1–F7, Fp2–F8, Fp1–F3 and Fp2–F4. Above 100μ100\, , our samples keep 4343–94%94\% of the real probability mass per channel, against at most 18%18\% for vanilla flow matching. Figure 8: Channel-wise amplitude distribution. Distribution of sample amplitudes for each channel (log density). Appendix D Post-hoc projection on all corpora Table 9 extends Table 6 to all three corpora (test split). Training through the projector wins every cell. Table 9: Post-hoc projection vs. projection in training on all three corpora, test split (bold: best per corpus). 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 E MontageDiff MontageDiff applies our two components, montage projection and latent conditioning, to a denoising diffusion model (Ho et al., 2020) instead of flow matching. We use the standard linear noise schedule with T=1000T=1000 steps, where α¯t α_t is the fraction of signal variance kept at step t. The network ϵθ _θ predicts the noise that was added to a clean window. As in MontageFlow, we project this prediction with P (Eq. 7) and train with an ℓ1 _1 loss: ℒMD=X,y,E,t,η,σ[∥E−Pϵθ(Xt,t,y,h~)∥1],Xt=α¯tX+1−α¯tE.L_MD=E_X,y,E,t,η,σ [ E-P\, _θ(X_t,t,y, h) _1 ], X_t= α_t\,X+ 1- α_t\,E. (13) To generate a window, we start from X^T=Pε X_T=P and take 5050 deterministic DDIM steps (Song et al., 2021a). Each step goes from t to the next timestep s<ts<t: X^s=α¯sX^t−1−α¯tE^tα¯t+1−α¯sE^t,E^t=Pϵθ(X^t,t,y,h). X_s= α_s\, X_t- 1- α_t\, E_t α_t+ 1- α_s\, E_t, E_t=P\, _θ( X_t,t,y,h). (14) This is a linear combination of X^t X_t and E^t E_t, which both lie in kerA A, so the sample never leaves kerA A and the final window is valid by construction. Everything else is shared with MontageFlow: the backbone, the encoder, the latent prior and the training settings.