🤖 AI Summary
Generative models often produce infeasible samples by ignoring physical or task-specific hard constraints. Existing projection-based methods distort the underlying data distribution, while multi-stage deferred projection introduces error accumulation and implementation complexity. This paper proposes Chance-constrained Flow Matching (CCFM), a training-free method that— for the first time—incorporates chance constraints directly into the flow matching framework. CCFM enforces constraints during stochastic differential equation (SDE) sampling by operating on intermediate noise states. Theoretically, it is equivalent to a single optimal projection onto the feasible set for clean samples, thereby avoiding both iterative projection distortion and multi-stage error propagation. By unifying flow matching, SDE-based sampling, and stochastic optimization, CCFM jointly ensures constraint satisfaction and high-fidelity generation. Experiments on partial differential equation solving and molecular docking demonstrate that CCFM significantly outperforms state-of-the-art methods, achieving simultaneous improvements in feasibility and sample quality.
📝 Abstract
Generative models excel at synthesizing high-fidelity samples from complex data distributions, but they often violate hard constraints arising from physical laws or task specifications. A common remedy is to project intermediate samples onto the feasible set; however, repeated projection can distort the learned distribution and induce a mismatch with the data manifold. Thus, recent multi-stage procedures attempt to defer projection to clean samples during sampling, but they increase algorithmic complexity and accumulate errors across steps. This paper addresses these challenges by proposing a novel training-free method, Chance-constrained Flow Matching (CCFM), that integrates stochastic optimization into the sampling process, enabling effective enforcement of hard constraints while maintaining high-fidelity sample generation. Importantly, CCFM guarantees feasibility in the same manner as conventional repeated projection, yet, despite operating directly on noisy intermediate samples, it is theoretically equivalent to projecting onto the feasible set defined by clean samples. This yields a sampler that mitigates distributional distortion. Empirical experiments show that CCFM outperforms current state-of-the-art constrained generative models in modeling complex physical systems governed by partial differential equations and molecular docking problems, delivering higher feasibility and fidelity.