Modulated Neural ODEs

Ilze Amanda Auzina, Çağatay Yıldız, Sara Magliacane, Matthias Bethge, Efstratios Gavves

TL;DR

Modulated Neural ODEs (MoNODEs) enhance standard Neural Ordinary Differential Equations by explicitly separating time-evolving states from underlying static factors of variation. By introducing time-invariant "modulator" variables for both dynamics and appearance, the framework achieves an average 55% improvement in long-term forecasting and significantly better generalization to unseen system parameters.

What Problem Does This Paper Address?

Neural Ordinary Differential Equations (NODEs) are powerful tools for modeling continuous-time dynamics from data. However, they have a significant blind spot: they assume that all trajectories in a dataset are governed by the exact same global differential equation, differing only in their initial starting state.

In reality, dynamical systems often have "static" factors that vary between instances but remain constant over time. For example, in human walking trajectories, every person follows the general "dynamics" of walking, but individual factors like leg length (which affects the motion) or shirt color (which affects the appearance) are fixed for that specific trajectory. Standard NODEs try to force these static differences into the time-evolving latent state, leading to poor generalization and "drifting" predictions during long-horizon forecasting.

Methods

The authors propose MoNODE, a framework that augments the latent space of a NODE with two types of time-invariant variables:

  1. Dynamics Modulators ($d$): These variables are fed directly into the differential function $\dot{z} = f(z, d)$. They account for trajectory-specific physical parameters, like the length of a pendulum or the friction coefficient of a bouncing ball.
  2. Static Modulators ($s$): These are fed into the decoder mapping the latent state to the observation space $x = p(z, s)$. They capture non-dynamic traits like background lighting or object identity.
Figure 1: Schematic illustration of our method. Standard continuous-time latent dynamical systems such as Chen et al. [2018] assume a single ODE state z(t) transformed by a surrogate neural differential function. Our method augments the latent space with dynamics and static modulators to account for exogenous variables governing the dynamics and observation mapping (decoding).

To learn these, the authors use amortized inference. Encoder networks (like RNNs or CNNs) process a sequence of observations to predict the modulators. Crucially, these predictions are averaged over time to ensure the modulators remain strictly time-invariant for the duration of the trajectory. This framework is modular and was successfully integrated into four NODE variants: standard NODE, Second-Order NODE (SONODE), Latent SONODE, and Heavy Ball NODE (HBNODE).

Datasets

The framework was evaluated on a diverse set of benchmarks:

  • Sinusoidal Data: Oscillating waves with varying amplitudes and frequencies.
  • Predator-Prey (Lotka-Volterra): Classic biological population dynamics with varying interaction parameters.
  • Bouncing Ball with Friction: Video sequences where a ball's motion is slowed by a trajectory-specific friction constant.
  • Rotating MNIST: Images of digits rotating over time, where the "static" factor is the digit's identity.
  • CMU Mocap: Real-world human walking sequences. The authors tested both standard splits and a "MOCAP-SHIFT" split where an entire subject was held out to test generalization.

Key Insights and Ideas

  • Disentanglement is Key: By explicitly modeling static factors, the latent state $z(t)$ is freed to represent only the "core" dynamics. This leads to a much more structured and interpretable latent space. For instance, in sinusoidal data, MoNODE's latent space naturally organizes into concentric circles representing different amplitudes, whereas standard NODE latents appear chaotic.
  • Modulators Capture Physical Truth: The authors used $R^2$ scores to see if the learned modulators correlated with the actual (hidden) physical parameters used to generate the data (like friction or frequency). MoNODE achieved significantly higher scores, proving the model was actually "discovering" the underlying factors of variation.
  • Robustness to "Drift": Standard NODEs often fail in far-horizon forecasting because errors in the latent state accumulate. Because MoNODE anchors the dynamics to a constant modulator, it is much more stable over long periods.

Key Results

The quantitative improvements are striking across the board:

  • Forecasting Accuracy: MoNODE consistently outperformed base models, showing an average 55.25% reduction in Mean Squared Error (MSE) across all experiments.
  • Generalization: In the Predator-Prey task, MoNODE reduced the test MSE from 23.81 (standard NODE) to 4.33, demonstrating a vastly superior ability to handle new dynamic parameterizations.
  • Qualitative Success: In video tasks like the bouncing ball, MoNODE accurately tracks the ball's position long after the standard NODE baseline has lost track of the trajectory.
Comparison of HBNODE and MoHBNODE on Predator-Prey data. The MoHBNODE (bottom) shows a much more organized latent space and more accurate long-term reconstructions.

Limitations and Future Work

While MoNODE marks a significant step forward, the authors note several areas for growth:

  • Deterministic Focus: The current work focuses on deterministic periodic systems. Extending this to stochastic systems (e.g., via Gaussian Processes) is a logical next step.
  • Point Estimates: The modulators are currently point estimates. A fully Bayesian approach that accounts for uncertainty in these variables could improve robustness.
  • Base Model Dependency: MoNODE is a wrapper; its ultimate performance is still constrained by the underlying NODE architecture it is applied to.

Summary updated

BibTeX
@inproceedings{auzina2023modulated,
  author = {Ilze Amanda Auzina and Çağatay Yıldız and Sara Magliacane and Matthias Bethge and Efstratios Gavves},
  title = {{Modulated Neural ODEs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Op9z2QfXbC},
}
Figure