Papers
Topics
Authors
Recent
Search
2000 character limit reached

Chance-Constrained Flow Matching (CCFM)

Updated 3 July 2026
  • Chance-constrained Flow Matching (CCFM) is a generative modeling framework that enforces hard constraints using time-varying chance constraints and optimal transport.
  • It utilizes a learned time-dependent velocity field within an ODE framework to transport simple priors to complex, constrained data distributions with minimal distortion.
  • CCFM has shown superior performance in tasks like molecular docking and PDE solutions, outperforming traditional penalty or projection methods in both feasibility and efficiency.

Chance-constrained Flow Matching (CCFM) is a class of generative modeling algorithms designed to synthesize high-fidelity samples while rigorously enforcing hard constraints that arise from physical, geometric, or task-specific considerations. In this paradigm, generative processes—commonly based on flow matching and optimal transport—are adapted to ensure that produced samples satisfy deterministic or probabilistic constraints, thereby addressing a critical limitation of unconstrained methods, which otherwise risk generating infeasible or invalid outputs. CCFM achieves this with minimal distortion to the underlying data distribution and provides theoretical guarantees and computationally efficient procedures for imposing feasibility, particularly under linear or quadratic constraint structures (Liang et al., 29 Sep 2025, Huan et al., 18 Aug 2025).

1. Motivation and Conceptual Foundations

Generative modeling often involves mapping a simple prior distribution pp (e.g., standard Gaussian) to a complex data distribution qq by transporting samples through a learned flow. Many real-world applications, such as molecular conformation generation or PDE solution synthesis, require that outputs strictly satisfy hard constraints—for example, physics-imposed boundary conditions or geometric restrictions like steric exclusion. Traditional methods for enforcing feasibility adopt gradient-based penalties or repeated projection steps. However:

  • Gradient penalties steer samples toward feasibility but offer no guarantee of hard satisfaction.
  • Repeated projection of intermediate states onto the constraint set enforces per-step feasibility but perturbs learned dynamics and distorts marginal distributions.
  • Multi-stage or ECI (Extrapolate–Correct–Interpolate) methods attempt to minimize distortion by projecting only extrapolated "clean" samples, yet incur significant algorithmic complexity and accumulated errors.

CCFM reframes constraint satisfaction as a time-varying chance-constrained optimization problem, exploiting the linear structure of optimal transport (OT) displacement paths. This enables consistent correction of noisy states without compromising the fidelity of the generative process, theoretically matching the effect of projection onto clean final samples (Liang et al., 29 Sep 2025).

2. Mathematical Formulation and Algorithmic Implementation

Under CCFM, the task is to learn a time-dependent velocity field uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d such that the ODE

ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,

transports x0px_0 \sim p to x1qx_1 \sim q. Under quadratic-cost OT, trajectories interpolate linearly:

Xt=(1t)X0+tX1,t[0,1].X_t = (1-t)X_0 + t X_1, \quad t \in [0,1].

The standard Conditional Flow Matching loss is

L(θ)=EX0,X1,tuθ(Xt,t)(X1X0)2.\mathcal{L}(\theta) = \mathbb{E}_{X_0, X_1, t}\left\| u_\theta(X_t, t) - (X_1 - X_0)\right\|^2.

To enforce feasibility, CCFM introduces a sample-wise chance constraint at each step: for the constraint function g(x)0g(x) \le 0 (defining feasible set C\mathcal{C}), and noisy state qq0, the final sample qq1 reconstructs as

qq2

with random perturbation qq3. The constraint qq4 translates to qq5 holding with probability at least qq6 over qq7. The projection operator at each discretized sampling step becomes

qq8

with qq9 a scheduling parameter tightening constraints as uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d0 (Liang et al., 29 Sep 2025).

For standard priors (uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d1), uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d2 is Gaussian, and closed-form deterministic surrogates are available for linear and quadratic uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d3:

  • Linear: uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d4 leads to chance constraint uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d5.
  • Quadratic: uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d6 leads to uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d7, when uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d8.

Each projection can be solved efficiently as a quadratic program or in closed form for these cases.

3. Theoretical Guarantees and Geometric Insights

A key property of CCFM is its pathwise equivalence to projection in the clean sample space. Under the OT segment, the identity

uθ:Rd×[0,1]Rdu_\theta: \mathbb{R}^d \times [0,1] \to \mathbb{R}^d9

implies that enforcing the chance constraint on ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,0 guarantees that the final ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,1 satisfies the hard constraint. At ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,2, the chance constraint reduces to standard projection onto ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,3.

The geometric structure of noisy feasible sets ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,4 underpins the "commutation of projections" theorem: projection onto ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,5 along the OT path can be achieved by projecting a mapped version onto ddtψt(x)=uθ(ψt(x),t),ψ0(x)=x,\frac{d}{dt}\psi_t(x) = u_\theta(\psi_t(x), t), \quad \psi_0(x) = x,6 and then reparametrizing, guaranteeing no cumulative distortion relative to direct clean-sample projection (Liang et al., 29 Sep 2025).

4. Empirical Performance and Benchmark Results

Molecular Docking

On the PDBBind benchmark, CCFM was evaluated for generating ligand binding poses under multiple geometric constraints. Compared to FlexDock (penalty and rejection sampling baseline), CCFM achieved PoseBusters physical-plausibility (PB Valid) rates of ≈48% with single-sample, 2-step inference, compared to ≈20% for FlexDock, with equal or better RMSD. Across computational budgets, CCFM consistently delivered higher feasibility with 5–20× fewer sample × steps and up to 12× faster runtime (Liang et al., 29 Sep 2025).

PDE Solution Generation

For generating solutions to 1D reaction–diffusion and 2D Navier–Stokes PDEs, CCFM yielded minimal constraint violations and optimal or near-optimal MMSE/SMSE (e.g., reaction–diffusion MMSE≈3.3×10⁻², zero constraint violation). It outperformed PCFM (ECI-style flow-matching with projection), DiffusionPDE (penalty-based), and unconstrained FFM (Free Flow Matching) in both feasibility and fidelity, and was also ∼30% faster than PCFM on reaction–diffusion (Liang et al., 29 Sep 2025).

Synthetic Domains and Oracle Settings

Alternative CCFM methodologies—via penalized distance (FM-DD) or randomized exploration (FM-RE)—demonstrated sub-1% empirical violation rates for various constraint types (boxes, balls, hyperplanes) with negligible impact on Sliced Wasserstein Distance to the target distribution. On MNIST with shape constraints and hard-label black-box adversarial tasks, FM-RE was able to substantially reduce violation rates (brightness constraint: ~9.1% to ~1.1%, thickness: ~23.2% to ~5.4%) and achieve visually plausible adversarial samples breaking classifier performance (Huan et al., 18 Aug 2025).

Two principal CCFM strategies have been reported:

  • Projection-based CCFM (Liang et al., 29 Sep 2025): Training-free, operates during sampling by projecting intermediate states onto chance-constrained feasible sets, with stochastically-derived surrogate constraints enabling deterministic, efficient projections and hard feasibility in the limit.
  • Penalty and Randomization-based CCFM (FM-DD, FM-RE) (Huan et al., 18 Aug 2025):
    • FM-DD uses a differentiable distance penalty to the constraint set in training, relaxing the hard constraint and achieving probabilistic feasibility via tuning of the penalty parameter.
    • FM-RE applies stochastic exploration with policy-gradient optimization, injecting noise to explore constraint-satisfying regions in the absence of analytically available barriers or distance functions.

Unlike reflection- or rejection-based methods, these CCFM strategies are compatible with both convex and nonconvex constraints (subject to tractable surrogate computation or effective exploration), and support scenarios where only membership-oracle access is available.

6. Limitations, Open Problems, and Future Directions

Limitations documented in current CCFM research include:

  • Theoretical derivations relying on linear OT trajectories; neural approximation error and discretization may introduce minor inconsistencies, though these are controlled in practice.
  • For projection-based CCFM, complex nonconvex constraints may lack tractable closed-form surrogates, necessitating approximate or sample-based constraint enforcement.
  • FM-DD and FM-RE do not provide hard feasibility in general; only empirical reduction of violation rates, with strengths tied to penalty or randomization parameters.
  • All methods require full ODE (or discretized) sampling for each trajectory, which increases computational cost compared to single-step or normalizing flow methods.

Possible extensions include generalizing to non-Gaussian or anisotropic noise models, scenario- or sample-based enforcement for black-box constraints, randomized or coordinate-wise projections to scale in high dimensions, and the use of surrogate models for intractable or non-differentiable constraints (Liang et al., 29 Sep 2025, Huan et al., 18 Aug 2025).

7. Summary Table: CCFM Methods and Performance

Method Constraint Handling Feasibility Guarantee Sample Results (violations)
CCFM (Proj) Deterministic Projection Hard (pathwise) PB Valid (≈48%), PDE: zero
FM-DD Differentiable Penalty Soft (empirically tunable) ≈0.005–0.5% (synthetic)
FM-RE Randomized Exploration Soft (empirically tunable) ≈0.007–2.5% (synthetic)

Projection-based CCFM achieves distributionally exact generation with hard feasibility for common constraint classes. Penalty or exploration-based approaches provide flexible recipes for more general settings or black-box constraint oracles but do not guarantee absolute constraint satisfaction.


Chance-constrained Flow Matching establishes a theoretically justified and practically effective framework for constraint-aware generative modeling, delivering strict or probabilistic feasibility with low distortion and broad applicability to real-world scientific and engineering domains (Liang et al., 29 Sep 2025, Huan et al., 18 Aug 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Chance-constrained Flow Matching (CCFM).