Modulated Neural ODEs

Ilze Amanda Auzina, Cagatay Yildiz, Sara Magliacane, Matthias Bethge, Efstratios Gavves

TL;DR

Neural Ordinary Differential Equations (NODEs) typically force all trajectory variations into a single initial state, struggling with sequences that have distinct static properties (like a pendulum's length or a subject's clothing). This paper introduces Modulated Neural ODEs (MoNODEs), augmenting the latent space with time-invariant "modulator" variables that explicitly separate core dynamics from static factors. This simple but powerful architectural tweak drastically improves long-horizon forecasting and generalization across multiple state-of-the-art NODE variants.

The Problem with Standard NODEs

Neural ODEs are fantastic for modeling continuous-time dynamics from data. However, standard NODEs assume a single, global differential function and a single decoder for all data. If you are modeling human walking trajectories, the core motion (walking) is shared, but there are trajectory-specific variations: some affect the physics (e.g., leg length), while others affect the appearance (e.g., shirt color).

Because standard NODEs lack a mechanism to represent these time-invariant parameters, they are forced to cram all of this static information into the time-evolving latent ODE state. This entanglement leads to overfitting. When the model tries to extrapolate into the future or generalize to a system with slightly different parameters, it fails because it hasn't actually learned the underlying physics—it just memorized the specific trajectories.

The MoNODE Framework

To solve this entanglement, the authors introduce the MoNODE framework, which extracts time-invariant modulator variables from the data using amortized inference.

MoNODE Architecture

They define two distinct types of modulators to handle different sources of variation:

  1. Dynamics Modulator: This captures static factors that alter the physics of the system (e.g., the mass of a bouncing ball). It is inferred by passing a short window of observations through an RNN. This modulator is then concatenated with the latent state and fed directly into the ODE's differential function, effectively parameterizing the physics engine on the fly.
  2. Static Modulator: This captures factors that alter the observation's appearance but not its physics (e.g., the background color or the identity of a rotating digit). It is inferred by averaging CNN embeddings of individual frames over time. This variable bypasses the ODE entirely and is fed straight into the decoder.

Crucially, MoNODE is not a standalone model but a "plug-and-play" framework. The authors successfully integrated these modulators into standard NODEs, Second-Order NODEs (SONODE), and Heavy Ball NODEs (HBNODE).

Key Insights and Ideas

  • Disentanglement creates interpretable latent spaces: By explicitly separating "what is moving" (latent state) from "how it moves" (dynamics modulator) and "what it looks like" (static modulator), MoNODE creates highly structured latent spaces.
NODE vs MoNODE Latent Space and Forecasting

As seen above, varying amplitudes form clean concentric circles in MoNODE's latent space, whereas standard NODE latent spaces look tangled and unstructured. This structure directly translates to better forecasting.

  • Modulators capture ground truth: The learned modulator variables aren't just mathematical tricks; they highly correlate with the actual, hidden generative parameters (Factors of Variation). The network naturally learns to isolate the true physics parameters without explicit supervision.
  • A rising tide lifts all boats: The modulation concept acts as a structural prior that fixes the forecasting failures of almost any existing latent ODE model, proving that architecture design regarding what variables should be time-invariant is just as important as the ODE solver itself.

Experimental Results

The authors evaluated their framework on a mix of simulated physics, video, and real-world datasets (including Sinusoidal waves, Lotka-Volterra population dynamics, Bouncing Balls with friction, Rotating MNIST, and CMU MoCap).

  • Massive Forecasting Improvements: Across all experiments, adding the MoNODE framework led to an average 55.25% improvement in test Mean Squared Error (MSE) for long-horizon forecasting.
  • Rescuing Baselines: On the Predator-Prey dataset ($T=300$ forecasting), standard NODE achieved an MSE of 23.81, while MoNODE slashed it to 4.33. Even more dramatically, the state-of-the-art Heavy Ball NODE (HBNODE) failed with an MSE of 3346.62, but adding modulators (MoHBNODE) dropped the error to 10.21.
  • High Informativeness: When regressing the learned latent variables against the true underlying factors of variation, MoNODE achieved vastly superior $R^2$ scores (e.g., 0.58 vs -0.29 for standard NODE on the Bouncing Ball dataset), proving it successfully disentangled the variables.
  • Real-World Efficacy: On the CMU MoCap dataset, MoNODE reduced forecasting MSE from 72.2 to 57.7 compared to the baseline.

Limitations and Future Work

The authors note a few limitations. First, the current framework relies on point estimates for the modulators, meaning it cannot account for epistemic uncertainty and struggles to generalize to completely out-of-distribution modulators. Second, the experiments primarily focus on deterministic, periodic systems.

For future work, they suggest extending the framework to stochastic dynamical systems (like Gaussian Process-based ODEs) and moving to a fully Bayesian framework by inferring modulators via marginal likelihood. They also propose using self-supervised contrastive losses to explicitly enforce the separation of dynamic and static factors, or extending the concept to object-centric dynamic modeling.

Summary updated

BibTeX
@inproceedings{auzina2023modulated,
  author = {Ilze Amanda Auzina and Cagatay Yildiz 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