Disentangled generative models for robust dynamical system prediction

Stathi Fotiadis, Shunlong Hu, Mario Lino Valencia, Chris D Cantwell, Anil Anthony Bharath

Abstract: Deep neural networks have become increasingly of interest in dynamical system prediction, but out-of-distribution generalization and long-term stability still remains challenging. In this work, we treat the domain parameters of dynamical systems as factors of variation of the data generating process. By leveraging ideas from supervised disentanglement and causal factorization, we aim to separate the domain parameters from the dynamics in the latent space of generative models. In our experiments we model dynamics both in phase space and in video sequences and conduct rigorous OOD evaluations. Results indicate that disentangled VAEs adapt better to domain parameters spaces that were not present in the training data. At the same time, disentanglement can improve the long-term and out-of-distribution predictions of state-of-the-art models in video sequences.

Introduction

Predicting the behavior of dynamical systems—ranging from simple pendulums to complex multi-body gravitational interactions—is a fundamental challenge in science and engineering. While deep learning models have shown promise in capturing complex dynamics, they frequently struggle with two critical issues: long-term instability and poor out-of-distribution (OOD) generalization. Standard models often "entangle" the underlying physical laws with specific environmental parameters (like mass or gravity), leading to catastrophic failure when encountering settings outside their training distribution.

This research, presented at ICML 2023, proposes that explicit causal factorization is the key to robust prediction. By forcing a model to distinguish between the invariant rules of motion and the varying parameters of the environment, we can achieve more stable and generalizable long-term forecasts.

Methodology: The SD-VAE

The authors introduce the Supervised Disentangled Variational Autoencoder (SD-VAE). Unlike standard VAEs where the latent space is an uninterpretable "black box," the SD-VAE employs supervised disentanglement.

Architecture of the SD-VAE, where specific latent variables (z1...zk) are supervised to match ground-truth physical parameters (ξ1...ξk).

As shown in the architecture above, a specific subset of the latent variables is forced to match known physical parameters during training via an additional loss term. This ensures that the model's internal representation separates the static environment parameters from the evolving state of the system. This approach was applied to both phase-space models (raw coordinates) and observation-space models (SD-RSSM) for high-dimensional video sequences. For forecasting, the model operates autoregressively, using its own previous predictions to roll out future trajectories.

Experimental Setup

The framework was evaluated across several classic dynamical systems:

  • Simple Pendulum: A basic periodic system.
  • Lotka-Volterra: Non-linear predator-prey population dynamics.
  • Planar 3-Body System: A chaotic system of three interacting masses.
  • Video Pendulum: $64 \times 64$ pixel image sequences to test performance on visual data.

To test robustness, the researchers created OOD-Easy and OOD-Hard benchmarks where physical parameters (e.g., pendulum length or gravity) were shifted entirely outside the ranges seen during training.

Results and Discussion

The inclusion of supervised disentanglement led to significant performance gains across all benchmarks. The SD-VAE consistently outperformed standard LSTMs, MLPs, and vanilla VAEs, particularly in long-term rollouts where standard models often diverge.

Normalized MAE difference showing that SD-VAE significantly reduces error compared to baselines across different systems and OOD settings.

As illustrated in the performance plots, the SD-VAE achieved a reduction in Mean Absolute Error (MAE) of over 30% for the pendulum system. Notably, the model remained stable in the Lotka-Volterra system where standard LSTMs failed to complete rollouts. In video sequences, the disentangled approach (SD-RSSM) maintained high Structural Similarity (SSIM) for significantly longer durations than the state-of-the-art RSSM when faced with OOD parameters.

Conclusion and Future Work

By explicitly labeling the factors of variation, the SD-VAE learns a more truthful causal structure of the physical world. This inductive bias proves highly effective for OOD generalization and long-term stability.

However, the current reliance on ground-truth parameters during training is a limitation. Future research will explore semi-supervised or unsupervised disentanglement to handle real-world scenarios where physical constants are unknown. Additionally, scaling these methods to high-dimensional fluid dynamics or climate modeling remains a promising frontier for robust dynamical system prediction.

Summary updated

Abstract

Deep neural networks have become increasingly of interest in dynamical system prediction, but out-of-distribution generalization and long-term stability still remains challenging. In this work, we treat the domain parameters of dynamical systems as factors of variation of the data generating process. By leveraging ideas from supervised disentanglement and causal factorization, we aim to separate the domain parameters from the dynamics in the latent space of generative models. In our experiments we model dynamics both in phase space and in video sequences and conduct rigorous OOD evaluations. Results indicate that disentangled models adapt better to domain parameters spaces that were not present in the training data while, at the same time, provide better long-term predictions in video sequences.
BibTeX
@inproceedings{fotiadis2021disentangled,
  author = {Stathi Fotiadis and Shunlong Hu and Mario Lino Valencia and Chris D Cantwell and Anil Anthony Bharath},
  title = {{Disentangled generative models for robust dynamical system prediction}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=vpiOnyOBTzQ},
}
Figure