Universal differential equations as a unifying modeling language for neuroscience

Ahmed El-Gazzar, Marcel van GervenFrontiers Comput. Neurosci 2025

Introduction

Neuroscience is currently navigating a tension between two modeling paradigms. On one hand, mechanistic models, such as the Hodgkin-Huxley model, offer high interpretability and biological grounding but struggle to scale to large-scale neural networks or capture the full complexity of real-world data. On the other hand, data-driven models, particularly deep Recurrent Neural Networks (RNNs), excel at predicting complex dynamics from massive datasets but function as "black boxes," often ignoring established biological theory and failing to generalize outside their training data.

As the field enters the era of big data—recording from thousands of neurons simultaneously—there is an urgent need for a mathematical language that bridges these extremes. This paper proposes Universal Differential Equations (UDEs) as a unifying framework that allows researchers to embed neural networks within differential equations, combining the strengths of prior biological knowledge with the expressive power of modern machine learning.

The UDE Framework

In the UDE framework, a differential equation is treated as a parameterizable, differentiable object. The authors specifically advocate for the use of Stochastic Differential Equations (SDEs), which are well-suited for modeling the inherent randomness of neural systems. In a UDE, the deterministic "drift" and the stochastic "diffusion" terms do not need to be fully specified. Instead, unknown or complex components of the system can be represented by universal function approximators, such as neural networks.

To apply this to neuroscience, the authors outline a four-part architecture:

  1. Stimulus Encoder: Converts high-dimensional sensory inputs (e.g., video or audio) into a continuous latent representation.
  2. Recognition Model: Infers the initial hidden state of the neural system from observed data.
  3. Process Model: The core UDE that simulates latent neural dynamics over time.
  4. Observation Model: Maps these latent dynamics back to measurable outputs, such as spike trains or fMRI BOLD signals.

Training these models involves embedding the UDE within a differentiable computational graph. Numerical solvers simulate the system, and errors are backpropagated using techniques like the adjoint method to update the neural network's weights.

Key Insights: A Continuum of Modeling

Universal Differential Equations provide a sliding scale between interpretable white-box models and flexible black-box models. Source, p. 4

Universal Differential Equations provide a sliding scale between interpretable white-box models and flexible black-box models.

A primary advantage of UDEs is their flexibility across a modeling continuum. Researchers can design a mostly "white-box" model where a neural network only learns a few unknown parameters, or a fully "black-box" Neural ODE where the entire system dynamics are learned from scratch. This allows for residual learning, where a neural network is used to augment a classic mechanistic model (like the Kuramoto model for oscillations) by capturing the complex, unmodeled heterogeneities that the original equations miss.

Furthermore, UDEs provide a native way to handle neural noise. Unlike standard RNNs that often rely on simple additive noise, UDEs built on SDEs can model complex, state-dependent (multiplicative) noise. This framework also opens the door to automated scientific discovery: by applying symbolic regression to a trained UDE, researchers may be able to extract new, interpretable algebraic laws of brain function directly from data.

Potential Applications

As a theoretical perspective, the paper maps UDEs to four critical areas of neuroscience:

  • Explaining Cognitive Functions: Identifying interpretable, multi-scale latent dynamics underlying complex behaviors.
  • Neural Control: Developing differentiable models of the brain to enable model-based, closed-loop control for neurostimulation and brain-computer interfaces (BCIs).
  • Neural Decoding: Reconstructing natural stimuli from brain activity through control-theoretic optimization.
  • Normative Modeling: Characterizing baseline brain dynamics to better diagnose and stratify psychiatric disorders based on how individual dynamics deviate from UDE predictions.

Limitations and Future Directions

Despite their promise, UDEs face several hurdles. Training continuous-time models is computationally demanding and memory-intensive, as it requires backpropagating through numerical solvers. Current implementations often rely on simplifying assumptions about noise (e.g., standard Brownian motion) and may lack a fully rigorous Bayesian treatment of uncertainty.

The authors suggest that future progress will depend on the adoption of faster, algebraically reversible solvers and stochastic automatic differentiation. Additionally, "symbolic distillation" remains a key frontier for turning trained neural networks back into readable mathematical expressions that can advance our fundamental understanding of the brain.

Summary updated

BibTeX
@article{elgazzar2025universal,
  author = {Ahmed El-Gazzar and Marcel van Gerven},
  title = {{Universal differential equations as a unifying modeling language for neuroscience}},
  journal = {Frontiers Comput. Neurosci},
  year = {2025},
  doi = {10.3389/fncom.2025.1677930},
}
Figure