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.
翻译:流匹配和扩散模型等深度生成模型在学习复杂分布和动力学系统方面展现出巨大潜力,但通常作为黑箱运行,忽略了底层物理规律。相比之下,基于物理的仿真模型(由常微分方程/偏微分方程描述)虽保持可解释性,但可能存在缺失项或未知项,无法完整描述实际观测数据。我们提出一种新颖的灰盒方法弥合这一鸿沟,将不完整的物理模型直接整合到生成模型中。该方法仅从观测轨迹中学习动力学,无需真实物理参数,采用免仿真方式避免了神经常微分方程的可扩展性与稳定性问题。本方法的核心在于通过两种潜在编码,在流匹配框架内建立结构化变分分布:一种用于建模缺失的随机性与多模态速度,另一种将物理参数编码为具有物理信息先验的潜变量。此外,我们提出了该框架处理二阶动力学的适配方案。在典型常微分方程/偏微分方程问题上的实验表明,本方法性能与完全数据驱动方法及先前灰盒基线相当或更优,同时保持了物理模型的可解释性。代码发布于 https://github.com/DMML-Geneva/VGB-DM。