BrainDyn: A Sheaf Neural ODE for Generative Brain Dynamics

Siddharth Viswanath, Panayiotis Ketonis, Chen Liu, Michael Perlmutter, Dhananjay Bhaskar, Smita KrishnaswamyarXiv 2026

TL;DR

BrainDyn is a novel generative framework that models continuous-time brain dynamics by combining cellular sheaves with neural ordinary differential equations (neural ODEs). By mapping regional brain activity into edge-specific shared spaces, it captures complex, heterogeneous interactions across the brain's anatomical network while avoiding the "oversmoothing" trap of standard graph neural networks.

What Problem Does This Paper Address?

Modeling the brain's spatiotemporal activity is crucial for understanding cognition, behavior, and neurological diseases. However, existing deep learning approaches fall into two distinct traps:

  1. Sequence models (like RNNs and Transformers) excel at capturing temporal dependencies but completely ignore anatomical structure. Their predictions cannot be mapped back to specific interacting brain regions.
  2. Graph Neural Networks (GNNs) naturally respect brain anatomy (treating regions or EEG channels as nodes), but they assume all nodes communicate within a single, homogeneous feature space. They aggregate information using simple scalar summation or averaging, which quickly leads to oversmoothing—homogenizing regional activity and erasing the complex, heterogeneous dynamics that define neural computation.

Furthermore, brain activity is inherently continuous, whereas most standard architectures operate in discrete time steps. To bridge this gap, the authors introduce BrainDyn, a framework designed to capture continuous-time neural dynamics while preserving the unique representational geometry of different brain regions.

Methods

BrainDyn achieves its expressiveness through a three-stage architecture:

  1. Memory-Based Node Stalks: The recent temporal history of each brain region (node) is encoded using a Long Short-Term Memory (LSTM) network. This hidden state represents the local "stalk" of the cellular sheaf, compressing complex temporal patterns like oscillations and delays.
  2. Learnable Sheaf Laplacians: Instead of directly summing neighboring node features, BrainDyn utilizes a cellular sheaf. Each connection (edge) is equipped with learnable linear transformations called restriction maps. These maps project node features into an edge-specific shared space where discrepancies are measured. Learnable attention weights further modulate these signals, allowing the network to dynamically prioritize or suppress specific communication pathways.
  3. Continuous-Time Evolution via Neural ODEs: The resulting sheaf Laplacian—which aggregates these aligned discrepancies—is embedded directly within a neural ODE. A numerical solver (like RK4) then continuously evolves the brain's latent states forward in time to predict future activity.
Figure 1: BrainDyn encodes each region’s temporal history with an LSTM, and then uses learnable sheaf restriction maps to align and modulate interactions across brain regions. The resulting spatially encoded latent state is evolved with a neural ODE to predict future brain dynamics.

To guide training, the authors construct an initial prior graph using Granger causality from the input context window, regularizing the model to favor known or statistical pathways of information flow.

Datasets

The authors evaluated BrainDyn across three distinct modalities spanning different spatial and temporal scales:

  • Resting-state fMRI (PNC Dataset): Data from 1,188 healthy subjects scanned at rest, parcellated into 400 cortical regions. This captures slow hemodynamic fluctuations.
  • Scalp EEG with Focal Epilepsy (TUSZ Dataset): Continuous recordings from 315 patients across 19 channels, capturing fast electrophysiological activity during seizure and non-seizure windows.
  • NEST Simulations: Synthetic neuronal activity generated from a simulated network of 100 integrate-and-fire neurons. This dataset was specifically used to evaluate the model's ability to forecast perturbed (out-of-distribution) dynamics by silencing a single neuron during the simulation.

Key Insights and Ideas

  • Communication as Transformation, Not Just Summation: The core philosophical shift in BrainDyn is that brain regions don't just broadcast raw signals to their neighbors; communication involves a geometric transformation unique to each connection. Cellular sheaves mathematically formalize this intuition.
  • Breaking Modality Specialization: Traditionally, models are highly specialized—what works for slow fMRI signals fails on fast, oscillatory EEG signals. By framing the problem as continuous-time diffusion over a sheaf, BrainDyn acts as a general-purpose architecture that excels at both.
  • Zero-Shot Perturbation Generalization: Because BrainDyn learns the underlying relational rules of the network rather than just memorizing trajectories, it can successfully predict how a localized disruption (like silencing a neuron) propagates through the system, even if it was only trained on unperturbed data.

Key Results

BrainDyn consistently outperformed both general sequence models and specialized graph neural ODE baselines across all datasets.

Figure 2: BrainDyn outperforms modality-specialized models.
  • fMRI Forecasting: On the PNC dataset, BrainDyn reduced Mean Squared Error (MSE) by 22% and Dynamic Time Warping (DTW) distance by 17% relative to the strongest baseline (ODEBRAIN).
  • EEG Forecasting: On the TUSZ dataset, it similarly outperformed specialized biosignal transformers (BIOT) and graph ODEs, showing superior capability in tracking fast electrophysiological transients.
  • Ablation Studies: Removing either the LSTM temporal encoder or the sheaf structure (reducing it to a standard graph) caused a massive drop in performance, proving that both temporal memory and edge-specific spatial transformations are vital.
  • Perturbation Generalization: On the synthetic NEST dataset, BrainDyn achieved the lowest MSE (0.671) and DTW (0.289) when predicting the network's reaction to an unseen neural silencing intervention.

Limitations and Future Work

While powerful, BrainDyn currently focuses on modeling resting or self-sustaining dynamics (i.e., brains with little to no external sensory input). The authors note that extending the model to handle strong, stimulus-driven dynamics—such as a subject watching a movie or listening to audio—would require training the model in more complex environments where multiple neural units are simultaneously perturbed by external inputs.

Summary updated

BibTeX
@misc{viswanath2026braindyn,
  author = {Siddharth Viswanath and Panayiotis Ketonis and Chen Liu and Michael Perlmutter and Dhananjay Bhaskar and Smita Krishnaswamy},
  title = {{BrainDyn: A Sheaf Neural ODE for Generative Brain Dynamics}},
  year = {2026},
  eprint = {2605.19324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.19324},
}
Figure