Physics-Constrained Fine-Tuning of Flow-Matching Models for Generation and Inverse Problems
Jan Tauberschmidt, Sophie Fellenz, Sebastian J. Vollmer, Andrew B. Duncan
TL;DR
This work addresses the challenge of generating physically plausible solutions from flow-based generative models while enabling inference of latent physical parameters for ill-posed inverse problems. It introduces a differentiable, post-training fine-tuning procedure based on weak-form PDE residuals and augments the model with a latent parameter predictor to allow joint generation of states and parameters. The approach uses an adjoint-matching stochastic control framework with a memoryless noise schedule to steer the distribution toward PDE-consistent samples, achieving improved PDE residuals and accurate latent-parameter recovery across multiple PDE families and a cross-domain image recoloring task. The method offers data-efficient, physics-aware generative modelling with potential for simulation-augmented discovery and uncertainty-aware inference in complex physical systems.
Abstract
We present a framework for fine-tuning flow-matching generative models to enforce physical constraints and solve inverse problems in scientific systems. Starting from a model trained on low-fidelity or observational data, we apply a differentiable post-training procedure that minimizes weak-form residuals of governing partial differential equations (PDEs), promoting physical consistency and adherence to boundary conditions without distorting the underlying learned distribution. To infer unknown physical inputs, such as source terms, material parameters, or boundary data, we augment the generative process with a learnable latent parameter predictor and propose a joint optimization strategy. The resulting model produces physically valid field solutions alongside plausible estimates of hidden parameters, effectively addressing ill-posed inverse problems in a data-driven yet physicsaware manner. We validate our method on canonical PDE benchmarks, demonstrating improved satisfaction of PDE constraints and accurate recovery of latent coefficients. Our approach bridges generative modelling and scientific inference, opening new avenues for simulation-augmented discovery and data-efficient modelling of physical systems.
