Disentangled Generative Models for Robust Prediction of System Dynamics

Stathi Fotiadis, Mario Lino Valencia, Shunlong Hu, Stef Garasto, Chris D Cantwell, Anil Anthony BharathICML 2023

By explicitly supervising the latent space of generative models with ground-truth physical parameters (like mass or length), researchers have developed a way to "disentangle" the underlying laws of motion from the specific properties of a system. This approach, called SD-VAE (Supervised Disentanglement Variational Autoencoder), significantly improves long-term prediction accuracy and allows models to generalize to "out-of-distribution" scenarios they never encountered during training.

The Challenge of Modeling System Dynamics

Predicting how a dynamical system—such as a swinging pendulum or a predator-prey population—evolves over time is a cornerstone of engineering and science. While deep learning has become increasingly popular for these tasks, it faces two major hurdles:

  1. Long-term Drift: Small errors in prediction accumulate over time, causing the model's forecast to diverge wildly from reality in the long run.
  2. Out-of-Distribution (OOD) Generalization: Most models are "brittle." If you train a model on a pendulum of length 1 meter, it often fails to predict the motion of a 1.5-meter pendulum. This happens because the model has "entangled" the general laws of gravity with the specific length of the training example.

The core issue is that current models fail to distinguish between the universal dynamics (the rules of motion) and the system parameters (the specific constants governing a particular instance).

Introducing Supervised Disentanglement (SD)

To address this, the authors introduce Supervised Disentanglement (SD) applied to Variational Autoencoders (VAEs) and Recurrent State Space Models (RSSMs).

In a standard VAE, the "latent space" (the compressed representation of data) is often a black box where different features are mixed together. The authors modify the training objective by adding a supervised regression loss.

Architecture of the SD-VAE model with supervised disentanglement.

They force specific dimensions of the latent vector to match the ground-truth physical parameters ($\xi$) of the system during training. For example, if a pendulum has a specific length, the model is penalized if a designated part of its latent space doesn't accurately represent that length. The model uses an encoder to map a sequence of observations to this disentangled latent space, and a decoder to project those latents back into future states. This can be done in phase-space (raw coordinates) or observation-space (predicting future video frames).

Experimental Setup

The researchers evaluated their approach on three classic dynamical systems, creating specific "Easy" and "Hard" Out-of-Distribution (OOD) test sets where parameters were outside the training range:

  1. Simple Pendulum: Varying the length ($\ell$).
  2. Lotka-Volterra: A biological model of prey and predator populations governed by four interaction parameters.
  3. Planar 3-Body System: A complex gravitational dance of three masses, involving parameters for mass and gravity.
  4. Image-based Pendulum: A high-dimensional dataset where the model must predict future 64x64 pixel video frames of a swinging pendulum.

Key Insights and Results

Usually, "disentanglement" is studied in computer vision to separate features like shape from color. Here, it serves as a powerful inductive bias for physics. By separating "what the system is" from "how it moves," the model learns a more robust representation of the underlying differential equations.

Normalized Mean Absolute Error (MAE) difference over time for various systems.

The experimental results highlight several major advantages of this approach:

  • Superior Accuracy: The SD-VAE reduced prediction error by over 30% in the pendulum system compared to standard VAEs.
  • Long-term Robustness: While standard models (and even traditional LSTMs) often diverged or failed after a few timesteps, the SD-VAE maintained high accuracy for up to 800 timesteps—20 times longer than the input window.
  • OOD Performance: In the "OOD-Hard" sets, where the system parameters were entirely new to the model, the disentangled models consistently outperformed all baselines. This proves they learned the underlying "rules" rather than just memorizing the training data.
  • Probabilistic Stability: The authors found that probabilistic models (VAEs) were significantly more stable than deterministic ones (Autoencoders), which often diverged when predicting long-term OOD trajectories.
  • Linearity of Latents: Even though the dynamics are non-linear, the relationship between the supervised latents and the physical parameters turned out to be highly linear, making the latent space incredibly interpretable.

Limitations and Future Work

The primary limitation of this method is the labeling burden: it requires knowing the ground-truth physical parameters during training. In many real-world scenarios, such as complex weather patterns, these values might be unknown or unmeasurable.

To overcome this, the authors suggest that future work should explore a semi-supervised approach—using a small amount of labeled data to "anchor" the latent space and then training on large amounts of unlabeled data. Additionally, while the 3-body problem is chaotic and difficult, testing this methodology on more complex, high-dimensional physical systems like fluid dynamics or robotics is the next logical step.

Summary updated

BibTeX
@inproceedings{fotiadis2023disentangled,
  author = {Stathi Fotiadis and Mario Lino Valencia and Shunlong Hu and Stef Garasto and Chris D Cantwell and Anil Anthony Bharath},
  title = {{Disentangled Generative Models for Robust Prediction of System Dynamics}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=PePBaTdFhc},
}
Figure