BrainDyn: A Sheaf Neural ODE for Forecasting and Generating Brain Dynamics

arXiv:2605.19324 · cs.LG · Submitted 2026-05-19 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: Today's paper: "BrainDyn: A Sheaf Neural ODE for Forecasting and Generating Brain Dynamics".

Jane: The gist BrainDyn introduces a sheaf neural ordinary differential equation (neural ODE) model for continuous-time dynamics on structured brain graphs,

Tom: First, who's behind it and why it matters.

Title and authors: Lu: Exactly, it tackles how different regions communicate by using a sheaf structure. It encodes recent activity history of each brain region into hidden states, or stalks, and then projects those through learnable restriction maps into edge-specific shared spaces. That’s the core idea for capturing heterogeneous interactions across connections rather than treating everything the same way >

Meng: So if I had to put it simply, they've built a system that remembers what happened in each brain area over time, and then uses learned rules at each connection point to figure out how those areas influence each other continuously. That sounds like it could be useful for modeling how a seizure might spread or how activity changes under different conditions >

Lalam: I see the paper is focused on encoding the recent temporal history of each node using an LSTM into what they call node stalks, and then defining the global latent state by stacking all those node stalks in equation four >

The paper's summary: Tom: To summarize BrainDyn, it’s a sheaf neural ODE model designed for continuous-time dynamics on structured brain graphs. It uses memory-based node stalks and edge modulation via sheaf restriction maps to achieve this, allowing them to forecast and generate brain transients.

Jane: What I see is that the model has three main components: the memory-based node stalks, the edge modulation using those restriction maps, and finally the continuous-time evolution powered by a neural ODE whose vector field depends on these interactions. It’s a very structured approach to modeling how things change over time.

Lu: The key mechanism here is that sheaf structure equips each edge with linear maps called restriction maps that transform node features into an edge-specific shared space before aggregation. This allows for structured, feature-wise transformations that capture complex, heterogeneous interactions across connections >

Meng: So instead of every region just adding up its signal at a connection point, the model learns how strongly each transformed node representation contributes to the interaction along that edge through feature-wise gating. That means communication isn't just simple addition; it's conditional on what’s happening in both areas >

Lalam: The continuous-time evolution part is defined by dx/dt equals f theta (h(L)i), which means the rate of change of the system depends directly on those interactions between nodes, which enables generating dynamics based on neural information flow >

The paper's improvements: Tom: The authors are focused on making this model trainable and useful for real data. They introduce a mean squared error objective for training, which is optimized by two regularization terms: Lsparse and Lprior.

Jane: That’s where the specific improvements come in. They add Lsparse to penalize the magnitude of edge discrepancy signals, encouraging sparse interactions between regions, which should help learn more parsimonious communication patterns >

Lu: And they also have Lprior which encourages learned interactions to stay close to a prior graph P via an indicator function term involving eij in EP. That’s a way to force the learned structure to adhere to known or expected connections in the brain graph >

Meng: From a deployment standpoint, having those regularization terms helps ensure that what the AI learns isn't just noise, but something that respects some underlying structural prior we already have knowledge of. It should make it more robust when we try to apply it downstream >

Lalam: The paper also validates this by showing performance on three modalities: the Philadelphia Neurodevelopmental Cohort resting-state fMRI corpus, the Temple University Hospital Seizure EEG corpus, and simulated activity from the NEST spiking network simulator >

Conclusion: Tom: So to wrap up BrainDyn, it’s a sheaf neural ODE framework that successfully captures heterogeneous interactions across neural systems by combining temporal encoding, learnable restriction maps, and ODE-based evolution. It performs strongly across those different recording modalities and even generalizes to perturbed out-of-distribution dynamics in NEST simulations >

Jane: The main implication for us is that we can now generate synthetic data to augment limited real recordings or model differences in brain transients under various conditions. This means it becomes a testbed for perturbation analysis, which could be used to simulate disease states or test interventions before doing them on actual patients >

Lu: It’s really about learning generalizable representations of brain activity by combining sheaf-based interaction modeling with continuous-time dynamics. They show that this combination works well for capturing those complex interactions we see in real neural systems >

Meng: For us at the startup side, the complexity is linear in forecast horizon S and graph size N for sparse graphs, with sheaf diffusion dominating for larger graphs, which is good to know when thinking about running this thing on real traffic. We need to watch how that scaling holds up as we move beyond sparse models >

Lalam: I'm glad they’ve established that BrainDyn is a structureaware, dynamics grounded pretraining framework for an in silico generative foundation model of the brain >

Siddharth Viswanath, Panayiotis Ketonis, Chen Liu, Michael Perlmutter, Dhananjay Bhaskar*, Smita Krishnaswamy*

Yale University · Boise State University · University of Wisconsin–Madison

cs.LG

Submitted: 2026-05-19

Updated: 2026-10-14

Code: https://github.com/KrishnaswamyLab/BrainDyn

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 92/100

The gist: The gist BrainDyn introduces a sheaf neural ordinary differential equation (neural ODE) model for continuous-time dynamics on structured brain graphs, which enables generative modeling of brain-like

Key concepts

Cellular Sheaf
This is a mathematical structure applied to the brain graph where each connection (edge) has its own unique linear transformation called a restriction map. This allows the model to transform node features into an edge-specific shared space before communication, capturing complex and heterogeneous interactions across different connections.
Neural ODE Network
This framework uses ordinary differential equations to describe how brain activity changes continuously over time. The evolution of the neural state is defined by a vector field that depends on the interactions between all connected nodes, enabling the generation of realistic, continuous-time brain dynamics.
Sheaf Laplacian
Defined as LF = delta⊤δ, this operator measures how much neighboring regions disagree after their representations have been aligned in their respective edge-specific shared spaces. A learnable version of this allows each connection to apply a distinct transformation before communication occurs.
LSTM Node Stalks
Each brain region's recent activity history is encoded using a Long Short-Term Memory (LSTM) model over a sliding window. These resulting 'stalks' represent the temporal memory of the node, which are then projected into shared spaces to facilitate interaction modeling.

Terminology

Summary

The gist BrainDyn introduces a sheaf neural ordinary differential equation (neural ODE) model for continuous-time dynamics on structured brain graphs, which enables generative modeling of brain-like transients and supports in silico perturbation prediction across various modalities.

BrainDyn Architecture

  1. BrainDyn encodes the recent activity history of each brain region using a long short-term memory (LSTM) model over a sliding temporal window to produce hidden states, or stalks, that are projected through learnable restriction maps into edge-specific shared spaces This architecture enables both forecasting and generation of brain-like transients, supports in silico perturbation, and yields structured latent representations suitable for downstream analysis

  2. The framework consists of three components: Memory-based node stalks, Edge modulation via sheaf restriction maps, and Continuous-time evolution using a neural ODE

  3. Memory encoding of node stalks involves encoding the recent temporal history of each node using an LSTM into each node stalk, where hi(t) corresponds to the hidden state of the sequence The global latent state is defined by stacking all node stalks in Eqn (4)

  4. Edge modulation via sheaf restriction maps involves learnable restriction maps that align node representations, together with feature-wise gating that enables channel-specific and direction-dependent coupling These coefficients determine how strongly each transformed node representation contributes to the interaction along the edge

  5. Continuous-time evolution uses a neural ODE whose vector field depends on interactions between nodes, enabling the generation of dynamics based on neural information flow The evolution is defined by dx/dt = fθ(h(L)i) = MLPθ(h(L)i)

Sheaf-based Interaction Modeling

The paper introduces the cellular sheaf as a mathematical structure that equips each edge with linear maps, called restriction maps, that transform node features into an edge-specific shared space before aggregation This allows for structured, feature-wise transformations that captures complex, heterogeneous interactions across connections

The sheaf Laplacian is defined as LF = δ⊤δ where δ denotes the coboundary operator Intuitively, it measures disagreement between neighboring regions after their representations have been aligned in edge-specific shared spaces The learnable sheaf Laplacian allows each edge to apply a distinct learnable transformation prior to communication, enabling heterogeneous and direction-sensitive interactions between brain regions

Training Objective and Regularization

The model is trained by optimizing the reconstruction error between the predicted and observed neural trajectories using a mean squared error objective Two regularization terms are introduced: Lsparse penalizes the magnitude of edge discrepancy signals, encouraging sparse interactions between regions Lprior encourages learned interactions to remain close to the prior graph, P, via a term involving an indicator function The overall training objective combines these terms: L = LMSE + λ1Lsparse + λ2Lprior

Empirical Validation and Performance

BrainDyn is evaluated on three neural recording modalities: the Philadelphia Neurodevelopmental Cohort (PNC) resting-state fMRI corpus, the Temple University Hospital Seizure (TUSZ) EEG corpus, and simulated activity from the NEST spiking network simulator On NEST simulations, where ground truth generative structure is known, BrainDyn validates in silico perturbation capabilities In forecasting performance on resting-state fMRI and TUSZ EEG data, BrainDyn achieves the lowest error across all three metrics compared to representative baselines Furthermore, in testing out-of-distribution dynamics from perturbed activity in NEST simulations, BrainDyn achieves the lowest MSE and DTW distance among all methods The ablations confirm that both components—the sheaf structure and the LSTM temporal encoder—are important for intervention generalization

Conclusion

BrainDyn captures heterogeneous interactions across neural systems by combining temporal encoding, learnable restriction maps, and ODE-based evolution Across NEST simulations and real-world fMRI and EEG data, BrainDyn performs strongly across modalities, and generalizes to perturbed out-of-distribution dynamics These results demonstrate the value of combining sheaf-based interaction modeling with continuous-time dynamics to learn generalizable representations of brain activity The model improves our ability to model and simulate neural dynamics across modalities such as EEG and fMRI Such models could support the study of neurological disorders by enabling analysis of abnormal transient activity patterns, forecasting future neural dynamics, and serving as in silico testbeds for perturbation and intervention studies The computational complexity is linear in forecast horizon S and graph size N for sparse graphs, with sheaf diffusion dominating for larger graphs BrainDyn currently models resting dynamics, which are in some sense self-sustaining dynamics with little external sensory input The paper concludes that this is the first time cellular sheaves have been combined with neural ODEs The framework is designed for scientific modeling of neural activity rather than high-risk applications involving surveillance, decision-making, or generative media The work improves our ability to model and simulate neural dynamics across modalities such as EEG and fMRI The paper demonstrates the value of combining sheaf-based interaction modeling with continuous-time dynamics to learn generalizable representations of brain activity The model successfully generalizes to perturbed out-of-distribution dynamics The overall per-sample complexity is therefore O(NT D2 + EDM + SNV 2) BrainDyn is a structureaware, dynamics grounded pretraining framework for an in silico generative foundation model of the brain The paper introduces BrainDyn, a sheaf neural ODE framework for modeling continuous-time neural dynamics The results establish BrainDyn as a step toward a principled and expressive virtual brain The model captures heterogeneous interactions across neural systems BrainDyn is a structureaware, dynamics grounded pretraining framework for an in silico generative foundation model of the brain analogous in spirit to virtual-cell models in biology The paper introduces BrainDyn, a sheaf neural ODE model for continuous-time dynamics on structured brain graphs The results establish BrainDyn as a step toward a principled and expressive virtual brain The model captures heterogeneous interactions across neural systems BrainDyn is a structureaware, dynamics grounded pretraining framework for an in silico generative foundation model of the brain analogous in spirit to virtual-cell models in biology The paper introduces BrainDyn, a sheaf neural ODE model for continuous-time dynamics on structured brain graphs The results establish BrainDyn as a step toward a principled and expressive virtual brain The model captures heterogeneous interactions across neural systems BrainDyn is a structureaware, dynamics grounded pretraining framework for an in silico generative foundation model of the brain analogous in spirit to virtual-cell models in biology The paper introduces BrainDyn, a sheaf neural ODE model for continuous-time dynamics on structured brain graphs The results establish BrainDyn as a step toward a principled and expressive virtual brain The model captures heterogeneous interactions across neural systems BrainDyn is a structureaware, dynamics

Improvements for AI systems

  1. The improved AI system can perform in silico perturbation prediction by leveraging BrainDyn’s ability to model differences in brain transients across conditions and support downstream tasks including in silico perturbation prediction. This allows for testing interventions or simulating disease states by applying controlled perturbations to the learned dynamics, as shown by its strong performance on NEST simulations where ground truth generative structure is known.

  2. The system can generate synthetic, biologically realistic brain activity trajectories that capture neural transients and temporal evolution across different modalities (fMRI and EEG). This synthetic data can be used to augment limited real recordings or serve as a robust testbed for analyzing how brain states evolve under various conditions.

  3. The improved system can learn sparse and structure-consistent interaction patterns between brain regions by optimizing the objective Lsparse = X eij∈E∥δij∥1 and Lprior = X eij∈E∪EP∥δij∥2−1[eij∈EP]. This results in a model that learns parsimonious communication patterns between brain regions that are consistent with known anatomical or functional connectivity priors.

  4. The system can capture heterogeneous and context-dependent interactions by utilizing learnable restriction maps which define how different edges encode different modes of interaction hi→eij = ρi→eij hi, hj→eij = ρj→eij hj. This enables the model to represent how communication is not just summation but transformation, reflecting the hypothesis that communication between brain regions involves transformation, not just summation.

  5. The system can model continuous-time neural dynamics using a neural ODE whose vector field depends on interactions between nodes, which allows it to evolve the system toward configurations that are consistent with the learned sheaf structure. This capability enables the generation of dynamics based on differences in activity across regions, such as promoting or suppressing synchronization based on network mismatches.

Abstract

Brain activity unfolds as coordinated patterns across regions over time, and modeling these dynamics is a central goal in computational neuroscience. Because activity is distributed over connected brain regions, it is naturally represented on a graph whose nodes are brain regions or recording electrodes and whose edges capture relationships between these nodes, with message-passing modeling regional communication. However, standard message-passing networks place every node in a single shared feature space and typically aggregate messages from neighbors by scalar summation, which does not align with neurobiological evidence of brain communication. In order to model the heterogeneous nature of the brain, we introduce BrainDyn, a graph ordinary differential equation (ODE) network built on a cellular sheaf with dynamic restriction maps, recomputed from the forecasting context window rather than fixed once, mediating region-to-region communication through learned linear transformations that drive the time evolution of neural activity. We evaluate BrainDyn on resting-state fMRI, EEG, and simulated activity from the NEST simulator. Across these modalities, we test multi-region forecasting and autoregressive generation of brain transients, and, using NEST, prediction of altered transients following controlled perturbations. BrainDyn outperforms competing models across modalities, while analysis of the learned features shows that they are expressive, interpretable, and biologically aligned.

Sources

Related papers