Disentangling ODE parameters from dynamics in VAEs

Stathi Fotiadis, Mario Lino, Chris D. Cantwell, Anil A. Bharath

Abstract

Predicting the long-term evolution of complex dynamical systems remains a significant challenge due to error accumulation and the entanglement of system parameters with state dynamics. We present the Supervised Disentangled Variational Autoencoder (SD-VAE), a model designed to explicitly separate physical parameters from the underlying dynamics. By incorporating ground-truth parameters as a supervisory signal during training, SD-VAE achieves superior long-term prediction accuracy and demonstrates robust generalization to out-of-distribution (OOD) scenarios.

Introduction

Accurate forecasting of systems such as weather patterns, mechanical oscillations, or celestial mechanics is vital across science and engineering. While deep learning models have shown promise in mimicking these dynamics, they often suffer from two primary issues: error accumulation and factor entanglement. In standard models, the identity of a system (e.g., a pendulum's length) is often conflated with its motion. Consequently, a model trained on a specific range of parameters may fail when encountering novel configurations, such as a shorter, faster-swinging pendulum.

The SD-VAE addresses these hurdles by forcing the model to disentangle the system's governing parameters from its state dynamics, leading to more robust and generalizable predictors.

Methodology

The SD-VAE extends the standard Variational Autoencoder (VAE) framework by introducing supervised disentanglement. While a traditional VAE compresses data into an unsupervised latent space, the SD-VAE modifies the Evidence Lower Bound (ELBO) objective with an additional regression loss. This loss compels a specific subset of latent variables to align with known physical parameters, such as mass or gravity.

The SD-VAE architecture incorporates supervised disentanglement by mapping specific latent variables to known physical parameters.

For temporal forecasting, the model operates autoregressively, utilizing its own predictions at time $t+1$ as inputs for subsequent steps. This approach was further extended to the Recurrent State Space Model (RSSM) to handle high-dimensional image sequences, resulting in the SD-RSSM.

Experimental Setup

The performance of SD-VAE was evaluated on three classic dynamical systems:

  1. Simple Pendulum: Tested in both phase-space (numerical states) and observation-space (pixel sequences).
  2. Lotka-Volterra: A predator-prey biological model.
  3. Planar 3-Body System: A complex gravitational system of three orbiting masses.

To test generalization, the researchers created Out-of-Distribution (OOD) datasets. For instance, in the pendulum task, the model was trained on lengths between 1.0 and 1.5 meters but tested on an "OOD-Hard" set featuring a 0.9-meter pendulum—a configuration with significantly different dynamics.

Results and Discussion

The SD-VAE demonstrated significant improvements in both accuracy and stability. In the pendulum system, it achieved a reduction in prediction error of over 30% compared to standard VAE baselines.

Normalized MAE difference across three systems, showing SD-VAE's superior performance on test and OOD sets.

Key findings include:

  • OOD Robustness: SD-VAE consistently outperformed baselines on "Hard" OOD data, successfully adapting its physical understanding to unseen parameters.
  • Stability: Unlike traditional LSTMs, which often diverged in the Lotka-Volterra system, SD-VAE remained physically plausible over long horizons.
  • Disentanglement Quality: Metrics such as the Attribute Predictability Score (SAP) confirmed near-perfect disentanglement in SD-VAE (scores near 1.0), whereas standard VAEs showed minimal separation.
  • Latent Linearity: The supervised latents exhibited a highly linear relationship with physical parameters, allowing for a "traversable" latent space where one can mathematically adjust parameters to generate valid predictions for new system configurations.

Conclusion

The SD-VAE provides a powerful framework for modeling dynamical systems by explicitly disentangling parameters from state dynamics. While the current approach relies on ground-truth labels during training—a potential bottleneck for real-world applications—it sets a strong foundation for future semi-supervised methods. Such advancements could enable the application of these robust predictors to complex, unlabeled engineering data.

Summary updated

BibTeX
@inproceedings{fotiadis2021disentangling,
  author = {Stathi Fotiadis and Mario Lino and Chris D. Cantwell and Anil A. Bharath},
  title = {{Disentangling ODE parameters from dynamics in VAEs}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=vpiOnyOBTzQ},
}
Figure