Table of Contents
Fetching ...

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.

Physics-Constrained Fine-Tuning of Flow-Matching Models for Generation and Inverse Problems

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.

Paper Structure

This paper contains 78 sections, 1 theorem, 84 equations, 20 figures, 9 tables, 3 algorithms.

Key Result

Lemma 1

Consider a generative process as in eq:generative_process with $\beta_t = t$ and $\gamma_t = 1-t$. For $0 \leq \kappa < 1$, the schedule $\sigma^2(t)=(1-\kappa)\ 2\eta_t$ is memoryless.

Figures (20)

  • Figure 1: Visual depiction of proposed method. Starting at state $x_t^\text{base}$ or $x_t^\text{ft}$, we use the base vector field $v_{t,x}^\text{base}$ to predict the final sample [$a)$]. Through the inverse predictor $\varphi$, we recover the corresponding predicted parameters $\hat{\alpha}_1^\text{base}$ and $\hat{\alpha}_1^\text{ft}$ [$b)$]. These estimates can be used as a target for evolving $\alpha_t^\text{base}$ [$c)$] or as a baseline for the fine-tuned evolution of $\alpha_t^\text{ft}$ [$d)$]. For purposes of regularization, we further consider $v_{t,\alpha}^\text{reg}$, pointing from the current $\alpha_t^\text{ft}$ to the predicted final parameter of the base evolution $\hat{\alpha}_1^\text{base}$ [$e)$].
  • Figure 2: Darcy denoising (qualitative). Base vs. fine-tuned outputs for a fixed seed. Regularization ($\lambda_f=1.0$) denoises while staying close to the base sample. Removing it denoises more aggressively at the cost of fidelity to the base realization. Additional non-curated samples in App. \ref{['app:supp_denoising']}. Color maps throughout this work taken from crameri2020color.
  • Figure 3: Darcy ablations. (a) Increasing $\lambda_x=\lambda_\alpha$ with $\lambda_f=0$ lowers the PDE residual but reduces diversity in the inferred parameters (reported via SSIM-based diversity). (b) Sweeping $\lambda_f$ trades PDE residuals against fidelity to the base distribution (MMD$_x$). Each point averages 256 samples with shared noise seeds across settings.
  • Figure 4: Three samples through guidance towards sparse observations (white markers in right panel) of the permeability, showing a plausible conditional distribution.
  • Figure 5: Stokes lid-driven cavity: residual–distribution trade-offs. Weak residuals $R_{\text{weak}}$ versus (a) MMD$_x$ and (b) MMD$_\alpha$. Across all variants, attainable residuals are comparable, but the joint model (green) reaches much lower parameter-distribution discrepancies (MMD$_\alpha\approx0.07\text{--}0.13$) than the Base AM (blue) and Base AM+$\varphi$ (orange) ablations, which remain around $0.22\text{--}0.28$.
  • ...and 15 more figures

Theorems & Definitions (2)

  • Lemma 1: Scaling of memoryless noise
  • proof