arXiv:2610.08355cs.LGOct 2026

Manuscript Offprint

arXiv:2610.08355

Sensor Geometry as a Flow-Matching Prior for Multi-Channel Brain Signals

Jaedong Hwang

ABSTRACT

Flow-matching models start from an isotropic Gaussian source, the standard choice when the correlation structure of the data is unknown in advance. For multi-channel brain recordings, however, part of this structure is known in advance. Electrodes sit at fixed positions on the head, and volume conduction through the skull and scalp makes nearby electrodes co-vary in a way that is shared across subjects. Existing EEG generative models nonetheless leave the network to learn this from scratch. We put this structure into the source instead. From the sensor coordinates alone, we build a k-nearest-neighbor graph and take a graph-Matérn function of its Laplacian as the source covariance, so the flow starts from spatially coherent patterns rather than channel-independent noise. The change adds no learned parameters, works with any coupling and any drift network, and uses the same three hyperparameters on every dataset. Across eight EEG datasets and four flow-matching methods, the graph-Matérn source lowers the spectral discrepancy between generated and real signals in the five clinical bands (PSD-KL) on most datasets. PSD-KL falls by 12% to 17% in geometric mean over datasets depending on the method and by up to 40% on PhysioNet-MI, the densest montage. We show that the improvement stems from the spatial eigenvectors of the local graph of sensor positions, since randomizing the eigenvectors while preserving the eigenvalue spectrum eliminates the gain. Furthermore, a prior fitted directly to the empirical data covariance performs worse than isotropic noise. The same construction applies unchanged to MEG, intracranial EEG with patient-specific grids, and a traffic-sensor network, lowering PSD-KL for every method on each 1^{1}.

1 INTRODUCTION

Flow-matching generative models (Lipman et al., 2023; Albergo et al., 2025; Liu et al., 2023; Tong et al., 2024a;b) start from an isotropic Gaussian, x0∼N(0,I)x_0 \sim \mathcal{N}(0, \mathbf{I}), and learn a drift that transports it to the data. For natural images this is the standard choice, since the correlation structure of the data is not known in advance. In multi-channel brain recordings, however, electrodes sit at fixed positions on the head, and volume conduction through skull and scalp makes nearby electrodes co-vary in a way that is shared across subjects (Nunez & Srinivasan, 2006). This structure is known before any data are seen, yet existing EEG generators, adversarial (Hartmann et al., 2018) and diffusion-based (Klein et al., 2024) alike, start from unstructured Gaussian noise and leave the sensor layout unused, so the network has to learn this structure from scratch.

We build this structure into the source instead, so that the flow starts from spatially coherent patterns and the drift does not have to learn the spatial correlations from scratch. Concretely, we connect each sensor to its k nearest neighbors, form the normalized Laplacian of that graph, and give each of its eigenvectors a variance set by a Matérn density of its eigenvalue (Borovitskiy et al., 2021) (see Figure 1). The resulting graph-Matérn prior puts most of its variance on spatial patterns that vary slowly across the scalp and little on patterns that flip sign between neighboring electrodes, so its samples are spatially coherent rather than channel-independent noise. This modification affects only the source distribution. It adds no learned parameters, works with any coupling and any drift network, and its three hyperparameters are fixed across all datasets.

1^{1}https://jd730.github.io/projects/GraphPrior

Sensor positions (TUAB, C = 16)

Adjacency W

Laplacian L

Matérn density

Prior covariance Σ0\Sigma_{0}

Figure

Wij=exp⁡(−∥pi−pj∥2/h2)W_{ij} = \exp(-\|p_i - p_j\|^2/h^2)

L=I−D−1/2WD−1/2\mathbf{L} = \mathbf{I} - \mathbf{D}^{-1/2} \mathbf{W} \mathbf{D}^{-1/2}

ϕ(λk)=(1+τλk)−α\phi(\lambda_k) = (1 + \tau \lambda_k)^{-\alpha}

Σ0=Udiag⁡(ϕ(Λ))U⊤\Sigma_0 = \mathbf{U} \operatorname{diag}(\phi(\Lambda)) \mathbf{U}^\top

Figure 1: Building the graph-Matérn source prior from sensor positions. (i) Connect each sensor to its kk nearest neighbors, with edge weights that decay with distance, to get the adjacency matrix W\mathbf{W}. (ii) Form the normalized graph Laplacian L\mathbf{L}, whose eigenvectors are spatial patterns over the sensors ordered from smooth to rough. (iii) Weight each pattern by the Matérn density ϕ(λm)=(1+τλm)−α\phi(\lambda_m) = (1 + \tau \lambda_m)^{-\alpha}, which gives smooth patterns more variance and rough ones less. (iv) Assemble the resulting covariance Σ0\Sigma_0, from which the flow's source samples x0x_0 are drawn in Eq. (2). Every step uses only the sensor coordinates and never the recorded signals.

We test the prior with four flow-matching methods, SF2M (Tong et al., 2024b), SI (Albergo et al., 2025), OT-CFM (Tong et al., 2024a), and RF (Liu et al., 2023), which cover the standard coupling choices, on eight EEG datasets, and measure how well generated signals reproduce the power spectrum of real signals in the five clinical frequency bands (PSD-KL; lower is better). We also apply it to MEG, to intracranial EEG with patient-specific electrode grids (van Blooijis et al., 2023), and to the PEMS-BAY traffic-sensor network (Li et al., 2018), to show that the prior is not specific to scalp EEG. Replacing the prior's eigenvectors, spectrum, or graph while keeping the other two fixed shows that the gain in PSD-KL comes from the eigenvectors of the local graph of sensor positions.

Our contributions are as follows.

• We propose a source prior for flow matching computed from sensor coordinates alone—a graph-Matérn covariance on the Laplacian of the graph of sensor positions—which replaces the standard isotropic source without adding learned parameters or modifying the drift network and coupling.

• We show that the prior lowers the spectral discrepancy (PSD-KL) for four flow-matching methods on most of the eight EEG datasets, by up to 40% on the densest montage, and that the same construction applies unchanged to MEG, intracranial EEG with patient-specific grids, and a traffic-sensor network.

• On TUAB, we show that the improvement stems from the spatial eigenvectors of the local position graph, and that a prior fitted directly to the empirical data covariance performs worse than isotropic noise.

References (65)