Variational Grey-Box Dynamics Matching
Gurjeet Sangra Singh, Frantzeska Lavda, Giangiacomo Mercatali, Alexandros Kalousis
TL;DR
The paper tackles the challenge of learning dynamical systems when physical models are incomplete by blending physics priors with data-driven dynamics in a simulation-free framework. It introduces Variational Grey-Box Dynamics Matching (VGB-DM), which uses a structured latent space with latent variables $z$ (stochasticity) and $ heta$ (physics parameters) and a physics-informed prior to infer underlying physics while fitting trajectory data. By extending flow-matching techniques to account for incomplete physics and second-order dynamics, VGB-DM achieves state-of-the-art forecasting performance, faster convergence, and robust parameter identification across diverse ODE/PDE benchmarks and real-world ERA5 weather forecasting, all while preserving interpretability of the physics terms. The approach reduces reliance on numerical solvers during training and offers scalable, transferable modelling capabilities for complex, real-world systems. The work provides open-source code and lays groundwork for broader adoption of simulation-free grey-box dynamics in scientific and engineering domains.
Abstract
Deep generative models such as flow matching and diffusion models have shown great potential in learning complex distributions and dynamical systems, but often act as black-boxes, neglecting underlying physics. In contrast, physics-based simulation models described by ODEs/PDEs remain interpretable, but may have missing or unknown terms, unable to fully describe real-world observations. We bridge this gap with a novel grey-box method that integrates incomplete physics models directly into generative models. Our approach learns dynamics from observational trajectories alone, without ground-truth physics parameters, in a simulation-free manner that avoids scalability and stability issues of Neural ODEs. The core of our method lies in modelling a structured variational distribution within the flow matching framework, by using two latent encodings: one to model the missing stochasticity and multi-modal velocity, and a second to encode physics parameters as a latent variable with a physics-informed prior. Furthermore, we present an adaptation of the framework to handle second-order dynamics. Our experiments on representative ODE/PDE problems show that our method performs on par with or superior to fully data-driven approaches and previous grey-box baselines, while preserving the interpretability of the physics model. Our code is available at https://github.com/DMML-Geneva/VGB-DM.
