Physics-Integrated Variational Autoencoders for Robust and Interpretable Generative Modeling

Naoya Takeishi, Alexandros Kalousis

Overview

Deep learning models are exceptionally good at interpolation—finding patterns within the range of data they’ve already seen. However, they notoriously struggle with extrapolation (predicting what happens outside that range) and interpretability (explaining why they generated a specific output). Conversely, physics-based models are robust and interpretable but are often "incomplete"—they might simplify complex real-world friction, ignore minor external forces, or use idealized equations.

This paper introduces Physics-Integrated Variational Autoencoders (PI-VAEs), a framework that embeds incomplete or simplified physics models directly into the latent space of a generative model. By employing novel regularization techniques to prevent neural networks from "overpowering" the physics components, the authors create models that are inherently interpretable, robust, and capable of extrapolating far beyond their training data.

The PI-VAE Architecture

The challenge in "gray-box" or hybrid modeling is that when you combine a rigid physics model with a highly flexible neural network, the neural network often "cheats." It learns to ignore the physics constraints entirely to minimize loss, resulting in a model that is just as black-box and fragile as a standard VAE.

To solve this, the authors propose an architecture where the latent space is split into two parts:

  1. $z_P$ (Physics-grounded): Latent variables that correspond directly to physical parameters (e.g., the angular velocity of a pendulum or the diffusion coefficient of a fluid).
  2. $z_A$ (Auxiliary/Data-driven): Standard latent variables that capture the "residuals"—everything the physics model can't explain.
PI-VAE Architecture

To ensure the model actually uses the physics part, they introduce two key regularizers:

  • Regularized Posterior Predictive Check (RPPC): This penalizes the discrepancy between the full hybrid model and a "physics-only" version. It essentially forces the neural network to act as a supplement to the physics, rather than a replacement.
  • Physics-based Data Augmentation (RDA): This uses the physics model to generate synthetic data during training. It "teaches" the encoder how to map raw inputs back to the correct physical parameters ($z_P$) in a self-supervised way.

One of the most elegant ideas in this architecture is the two-stage "cleansing" encoder. The first stage cleanses noisy real-world data into a virtual "physics-only" signal, which the second stage then uses to estimate physical parameters. This allows the model to find the signal of the physics even when the data is messy.

Key Capabilities and Results

The researchers evaluated PI-VAEs across four distinct domains: a forced damped pendulum (ODEs), an advection-diffusion system (PDEs), Galaxy10 images, and human gait biomechanics.

Superior Extrapolation

Extrapolation is the true litmus test for physical understanding. While standard VAEs can reconstruct a pendulum's swing within the training time window, PI-VAEs can predict the swing after the window ends because they have captured the underlying law of motion, not just the visual pattern. In the advection-diffusion task, PI-VAEs were the only models able to accurately predict the system's state beyond the training time limit, whereas standard VAEs produced unnatural artifacts.

Extrapolation and Counterfactual Generation

Counterfactual Generation and Parameter Inference

Because $z_P$ is semantically grounded, users can manually tweak it to generate counterfactuals. For example, you can take a sequence of a pendulum and "generate" what it would look like if the gravity were doubled or the friction were removed, simply by shifting the $z_P$ value. Furthermore, PI-VAEs achieved significantly lower Mean Absolute Error (MAE) in inferring physical constants compared to baselines.

Real-World Fidelity

On the Galaxy10 dataset, the PI-VAE consistently generated realistic, galaxy-like images, whereas standard VAEs often produced blurry or non-realistic blobs. In human locomotion, the regularized PI-VAE ensured that the physics solver did the "heavy lifting," resulting in more biomechanically plausible reconstructions.

Limitations and Future Work

While powerful, the PI-VAE framework has a few constraints:

  • Differentiability Requirement: The current framework assumes the physics model (or its numerical solver) is differentiable. Handling non-differentiable "black-box" simulators remains a significant open challenge.
  • Prior Knowledge Dependency: The model requires a human to provide the "incomplete" physics equations; it does not yet "discover" the physics from scratch.
  • Computational Cost: Integrating complex PDE solvers into the training loop of a VAE can be computationally expensive compared to pure neural network approaches.

Future directions include extending this framework to even more complex observation processes, such as generating high-dimensional video directly from low-dimensional physical laws.

Summary updated

BibTeX
@inproceedings{takeishi2021physics,
  author = {Naoya Takeishi and Alexandros Kalousis},
  title = {{Physics-Integrated Variational Autoencoders for Robust and Interpretable Generative Modeling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=xYPQHvuW3y},
}
Figure