Neural Integro-Differential Equations

Emanuele Zappala, Antonio Henrique de Oliveira Fonseca, Andrew Henry Moberly, Michael James Higley, Chadi Abdallah, Jessica Cardin, David van Dijk

TL;DR

Neural Integro-Differential Equations (NIDE) extend the popular Neural ODE framework to model non-local, history-dependent dynamical systems. By learning integral operators alongside differential ones, NIDE can accurately model complex processes like brain activity, outperforming standard models in time extrapolation and revealing hidden structures in non-Markovian dynamics.

What Problem Does This Paper Address?

In data science, we often try to model continuous systems—like a swinging pendulum or a spreading disease—using differential equations. Neural Ordinary Differential Equations (NODEs) have become a standard tool for this, but they have a fundamental limitation: they are Markovian. This means they assume the future state of a system depends only on its current state.

However, many real-world systems are non-local or non-Markovian. In these systems, history matters. For example, in neurobiology, the current firing rate of a neuron might depend on its activity over the past several milliseconds. Such systems are mathematically described by Integro-Differential Equations (IDEs), which combine derivatives (local change) with integrals (accumulated history). Until now, there hasn't been a robust deep learning framework to learn these IDE systems directly from raw data without knowing the underlying equations beforehand.

Methods

The authors introduce Neural IDEs (NIDE). The core architecture represents the change in a system state $y$ as:

$$\frac{dy}{dt} = f(t, y) + \int_{\alpha(t)}^{\beta(t)} K(t, s) F(y(s)) ds$$

Here, $f$, $K$ (the kernel), and $F$ (the integrand) are all neural networks learned during training.

Key technical innovations include:

  • A Differentiable IDE Solver: Implemented in PyTorch, it uses an iterative approach (based on Adomian decomposition) to solve the equation. This is crucial because, unlike standard ODEs, the integral term might require knowledge of the function across an entire time interval at once.
  • Adjoint State Method: The authors derived the adjoint state for NIDEs, allowing for memory-efficient backpropagation through the integral operator, similar to the original Neural ODE paper.
  • Dynamic Decomposition: The model naturally splits dynamics into a "Markovian" part ($f$) and a "non-Markovian" part (the integral), providing a new way to interpret complex signals.

Datasets

The researchers evaluated NIDE against NODEs and LSTMs across several domains:

  1. Toy 2D Spirals: Synthetic data generated by both ODEs and IDEs to test basic expressivity.
  2. 4D Synthetic Dynamics: 1000 generated trajectories used to test time extrapolation and generalization to new starting points.
  3. Wide-field Calcium Imaging: High-resolution recordings of brain activity in freely behaving mice, reduced to 10 dimensions via PCA.
  4. Human fMRI: Brain activity recordings from subjects under either a saline control or a subanesthetic dose of ketamine.

Key Insights and Ideas

  • Expressivity Beyond ODEs: Standard Neural ODEs physically cannot fit certain patterns, such as self-intersecting spirals, because they lack memory. NIDE handles these with ease (see Figure 1).
  • History as a Latent Space: The integrand $F$ acts as a latent embedding. The authors found that this NIDE latent space captures the temporal "topology" of brain activity much more accurately than standard methods like PCA or UMAP.
  • Decomposing the Brain: When applied to mouse brain data, NIDE revealed that neural inhibition is largely Markovian (driven by the current state), while excitation is driven by non-local, history-dependent dynamics.
  • Pharmacological Insights: In the ketamine fMRI study, NIDE showed that the drug primarily alters the Markovian component of brain dynamics. This suggests ketamine might induce a brain state that is more "localized in time" compared to normal waking consciousness.
Figure 1: NIDE vs NODE on ODE and IDE generated spirals. While both fit ODE data, only NIDE captures the complex IDE spiral.

Key Results

  • Superior Extrapolation: On 4D synthetic curves, NIDE consistently achieved lower Mean Squared Error (MSE) than both NODEs and LSTMs when predicting future time points (Table 3).
  • Generalization: NIDE outperformed NODEs in predicting the dynamics of brain activity from entirely new initial conditions (Figure 5).
  • Better Classification: Using the decomposed components of NIDE, the researchers could distinguish between "Ketamine" and "Saline" brain states with 89% accuracy, compared to only 73% using the raw fMRI data (Table 6).
Figure 6: UMAP embeddings of fMRI data. NIDE's instantaneous (Markovian) part shows much clearer separation between saline and ketamine conditions than the raw data.

Limitations and Future Work

The authors acknowledge a few hurdles:

  • Computational Complexity: The iterative nature of the IDE solver introduces a new hyperparameter (number of iterations) and can be more computationally demanding than standard ODE solvers.
  • Integration Efficiency: While the current implementation uses torchquad for GPU support, more advanced numerical integration methods could further improve speed and accuracy.
  • Spatial Dynamics: The current work focuses on temporal integrals. A natural next step is extending this to Partial IDEs, which would account for both spatial and temporal non-locality—a common feature in physical systems like plasma physics or fluid dynamics.

Summary updated

BibTeX
@inproceedings{zappala2023neural,
  author = {Emanuele Zappala and Antonio Henrique de Oliveira Fonseca and Andrew Henry Moberly and Michael James Higley and Chadi Abdallah and Jessica Cardin and David van Dijk},
  title = {{Neural Integro-Differential Equations}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i9.26315},
}
Figure