Manuscript Offprint

arXiv:2609.37934

GRFBrain: Graph-Structured Rectified Flows for EEG Dynamic Modeling

Haohui Jia, Zheng Chen, Jathurshan Pradeepkumar, Xu Cao, Yasuko Matsubara, Yasushi Sakurai, Takashi Matsubara

ABSTRACT

Forecasting time-varying functional connectivity from electroencephalography (EEG) requires modeling both history-dependent trends and structured variability across channels. Conditional flow matching provides a framework for distributional forecasting, yet it remains unclear whether graph-informed source distributions offer practical advantages over isotropic noise and strong deterministic predictors. We introduce a graph-structured residual flow framework that separates conditional mean prediction from stochastic residual transport. A history-only predictor estimates the future connectivity graph, while a graph Gaussian source encodes dependencies derived from past connectivity through a Laplacian-based covariance. A conditional velocity field transports source samples to future graph residuals, with transport time explicitly distinguished from physical EEG time. Our study identifies the conditions and controls needed to distinguish useful residual transport from improvements attributable to deterministic prediction, learned representations, and sampling effects. Our code is available at https://github.com/HHJIAnmo/GRFBrain.

1 INTRODUCTION

Learning informative representations of electroencephalography (EEG) is central to clinical settings such as seizure detection (Pradeepkumar et al., 2026). What makes this difficult is that the relevant information is not located in a single channel. A seizure, for instance, is characterized less by abnormal activity at one electrode than by the emergence, spread, and dissolution of synchrony across electrodes. Representations must therefore encode two coupled aspects of brain dynamics: how channel-wise activity evolves, and how the functional relationships among channels over time.

Predictive learning offers a route to EEG representation learning by requiring a model to infer future activity from its history. Existing graph-based methods pursue this idea through next-window prediction, evolving graph convolutions, or continuous-time spectral dynamics (Tang et al., 2022; Kotoge et al., 2025; Jia et al., 2026). However, these objectives are deterministic: regression maps each history to a single future, encouraging representations of the conditional mean while suppressing structured uncertainty. This is particularly limiting near transitions, where similar histories may lead to different futures and discriminative cues can lie in deviations from the average trajectory.

Distributional objectives model multiple plausible futures rather than a single point estimate. Flow matching (FM) realizes this by learning a history-conditioned velocity field that transports a simple source distribution toward future states (Lipman et al., 2023), encouraging representations to capture both predictable trends and residual variability. In EEG, however, this variability is structured across channels and reflected in recent functional connectivity, whereas standard FM starts from isotropic Gaussian noise that treats channels and channel pairs as exchangeable, leaving the velocity field to recover these dependencies during transport. The central question is therefore not whether isotropic noise is sufficiently expressive, but whether a history-informed source defines a more informative predictive task for representation learning.

Table 1: Comparison of representative methods for modeling EEG dynamics.

ModelFormulationContinuousGraphicalStochastic
CNN-LSTMSpatial-temporal encoding✕✕✕
BIOT (Yang et al., 2023)Biosignal Transformer✕✕✕
EvolveGCN (Pareja et al., 2020)Evolving graph convolution✕✓✕
DCRNNDiffusion-graph convolutional RNN✕✓✕
neural ODElatent dynamics✓✕✕
neural SDEStochastic latent dynamics✓✕✓
ODEBrain (Jia et al., 2026)Temporal-spatial latent dynamics✓✓✕
Flow MatchingIsotropic latent transport✓✕✓
GRFBrainConditioned joint graph flow✓✓✓

√ denotes that the property is implemented; ✕ denotes that it is absent from the evaluated formulation.

This observation suggests that the source is not merely a sampling convenience but part of the learning task, and hence an inductive bias on the learned representation, as shown in Figure1. We therefore ask: can the channel dependencies observed in the history define the stochastic prediction task itself, rather than serving only as conditioning input to the encoder?

In this paper, we answer this question with GRFBrain, a graph-structured residual flow framework for predictive EEG representation learning. GRFBrain first decomposes the future EEG state into a history-derived reference and a residual, allowing the flow objective to focus on the variation that remains beyond the predictable trend. It then constructs a history-conditioned Gaussian source whose covariance is derived from the recent functional graph, so that source perturbations reflect the channel dependencies observed in each sample. The source energy is normalized to match that of an IID Gaussian control, so that their comparison isolates the role of relational structure from that of noise magnitude. Finally, a joint node–edge velocity network transports node and edge residuals in a shared state space, so that their bidirectional interactions shape the learned representation. For downstream prediction, the velocity network is evaluated once at the history-derived reference state, which corresponds to zero in residual coordinates. This readout requires neither source sampling nor numerical integration. As summarized in Table 1, existing methods are typically either graph-aware but deterministic, or stochastic without adaptive graph structure. Our contributions are threefold:

  • We formulate predictive EEG representation learning as conditional transport in a joint node–edge residual space, separating the history-predictable component of the future from its remaining structured variability.

  • We introduce a history-conditioned graph Gaussian source with energy matched to an IID baseline, together with a coupled node–edge velocity network that models interactions between channel activity and functional connectivity.

  • We evaluate GSRF on seizure detection and conduct controlled studies of source geometry, node–edge coupling, transport targets, and forecasting horizon. GSRF improves F1 over deterministic graph-dynamics and standard flow-matching baselines, while the ablations isolate the benefit of history-adaptive source structure.

References (35)