# Chance-constrained Flow Matching for High-Fidelity Constraint-aware Generation

*JINHAO LIANG, Yixuan Sun, Anirban Samaddar, Sandeep Madireddy, Ferdinando Fioretto*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150205) · [OpenReview](https://openreview.net/forum?id=jwaNz2c281) · [Open on the map](../papers.html#p150205)

Category: [Time Series, PDEs & Probabilistic ML](../pcat/9.md) › [Constrained Generative Modeling](../pgroup/168.md) · Type: new method · Keywords: constrained generative modeling, stochastic optimization, flow matching, constraint enforcement, physics-informed generation

Areas: [Generative Models (Diffusion & Flows)](../areas/generative-models.md) › Flow Matching and Diffusion › Constrained Generation; [AI for Science](../areas/ai-for-science.md) › Molecular Systems Modeling › Constrained Generative Flows

## Summary
Chance-constrained Flow Matching (CCFM) is a training-free method that formulates constraint enforcement during sampling as stochastic optimization, avoiding projection of noisy intermediate states and achieving higher feasibility and fidelity in constrained generation tasks.

## Explained to a 5-year-old
Generative models make new pictures or sounds. Sometimes they break rules, like making a ball go through a wall. To fix this, we try to make the model follow the rules while still making cool things. The new idea uses a special way to check the rules during the making process, so the results are both cool and obey the rules. It works for things like physics simulations and molecular docking. This helps scientists design better drugs and simulate the world.

## Explained to a 5-year-old, longer
Generative models are like machines that create new things, such as pictures, sounds, or even molecules. They are trained to make things that look like real data, but sometimes they ignore important rules, like the laws of physics. For example, a model might generate a molecule that cannot exist because it breaks chemical constraints. To solve this, researchers try to make the model respect those rules while still creating realistic outputs. One common way is to project the generated samples onto a feasible set, but doing this repeatedly can mess up the quality of the generated data. Another approach is to first estimate clean samples and then project them, but this adds extra steps and can cause errors. The paper introduces a new method that treats rule enforcement as a stochastic optimization problem during the generation process. This way, the model can stay faithful to the rules without disturbing the generation dynamics. The method is training-free, meaning it does not need to retrain the whole model. It works well on complex tasks like solving partial differential equations, docking molecules, and generating physically plausible motions. By avoiding direct projection of noisy intermediate states, the method reduces distortion and improves both feasibility and fidelity. The result is a more reliable generative model that can be used in scientific and engineering applications where correctness is crucial.

## For a technical reader
Chance-constrained Flow Matching (CCFM) is a training-free sampling technique that enforces hard constraints without retraining the underlying generative model. It reformulates constraint enforcement as a stochastic optimization problem, avoiding the need to project noisy intermediate states onto a clean-sample feasible set. This reduces algorithmic complexity and error accumulation while preserving the feasibility guarantees of projection-based methods. CCFM is evaluated on PDE modeling, molecular docking, and physics-informed motion generation, where it consistently outperforms existing constrained generative approaches.

## Problem
Generative models often produce samples that violate hard constraints from physical laws or task specifications, and existing constraint enforcement methods either project noisy intermediate samples (distorting dynamics) or estimate clean samples before projection (increasing complexity and error accumulation).

## Method
The approach formulates constraint enforcement during sampling as a stochastic optimization problem, avoiding direct projection of noisy intermediate states onto the clean-sample feasible set. This training-free method retains the hard-constraint feasibility guarantee while reducing algorithmic complexity and error accumulation.

## Results
The approach achieves superior feasibility and fidelity compared to state-of-the-art constrained generative models across the evaluated tasks.

## Contributions
It introduces a training-free stochastic optimization formulation for constraint enforcement that avoids noisy intermediate projections and complex clean-sample estimation, while preserving hard-constraint feasibility guarantees.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150205)
