Deep generative models have been used for physical systems governed by PDEs to enable scalable simulation and uncertainty-aware inference.
Enforcing physical constraints like conservation laws and physical consistencies in generative models is challenging, often relying on soft penalties or architectural biases that do not guarantee hard constraints.
Physics-Constrained Flow Matching (PCFM) is introduced as a zero-shot inference framework that enforces arbitrary nonlinear constraints in pretrained flow-based generative models by guiding the sampling process through physics-based corrections.
Empirical results show that PCFM outperforms unconstrained and constrained baselines on various PDEs, including cases with shocks and sharp features, while ensuring exact constraint satisfaction at the final solution, providing a general framework for enforcing hard constraints in generative models.