Gauge Flow Matching: Efficient Constrained Generative Modeling over General Convex Set and Beyond

Xinpeng Li, Enming Liang, Minghua ChenICLR 2026

Modern generative models, such as Diffusion and Flow Matching, have achieved incredible success in creating realistic images and robotic plans. However, they suffer from a fundamental "boundary problem." In many real-world applications—such as protein synthesis, robotics, or physics-informed simulations—generated samples must satisfy strict constraints. For instance, a robotic arm cannot pass through a wall, and a chemical bond cannot exceed a certain length.

Vanilla generative models often produce samples that "drift" outside these valid regions due to approximation errors. Existing fixes generally fall into two camps:

  1. Simple but limited: Methods that only work for basic shapes like boxes or simplexes.
  2. Powerful but slow: Methods like "Reflected Diffusion" or "Projection" that require solving expensive optimization problems at every single step of the generation process, making them too slow for practical use.

To bridge this gap, researchers have introduced Gauge Flow Matching (GFM), a framework that ensures generative models strictly obey hard constraints without the massive computational slowdown of traditional methods.

The Gauge Flow Matching Framework

The core innovation of GFM is the Gauge Mapping ($\Phi$).

Think of a complex, star-shaped cookie cutter. Instead of trying to generate data directly within that complex shape, GFM mathematically "stretches" the constrained space into a perfect unit ball.

Comparison of standard Flow Matching (FM) and Gauge Flow Matching (GFM).

The generation process is broken down into three efficient steps:

  1. Training: The original constrained data is mapped into a unit ball using an inverse gauge mapping. A standard Flow Matching model is then trained to learn the distribution inside the ball.
  2. Inference: To generate a new sample, the model operates entirely inside the unit ball. Because a ball is a simple geometric shape, ensuring the model stays inside is computationally "cheap" (requiring only simple reflection or projection operations).
  3. Output: Once a valid sample is generated in the ball, the forward gauge mapping "squeezes" it back into the original complex constrained shape.

How the Gauge Mapping Works

The paper relies on the Minkowski function (a generalization of a norm) to define this mapping. Crucially, the authors prove the mapping is bi-Lipschitz, meaning it doesn't distort the data distribution so much that the model cannot learn it.

Illustration of the gauge mapping $\Phi$ transforming points from the unit ball $\mathcal{B}$ to the convex set $\mathcal{C}$.

The quality of this mapping depends heavily on choosing a "center" for the shape. Picking a point far from the boundaries (known as the "Chebyshev center") minimizes distortion and leads to better generative quality. Furthermore, the authors extend this logic beyond simple convex shapes to star-convex sets (where every point on the boundary is "visible" from a central point) and geodesic-convex sets (constraints on curved manifolds).

Key Results and Applications

The authors evaluated GFM across a diverse range of benchmarks, including synthetic geometric sets, robotic control (modeling the "manipulability ellipsoids" of robotic arms), traffic time series, image generation with embedded watermarks, and high-dimensional combinatorial optimization.

The results demonstrate significant improvements over existing methods:

  • 100% Feasibility: Across all tests, GFM achieved a 100% constraint satisfaction rate, whereas vanilla models often failed on 5% to 25% of samples.
  • Massive Speedups: By moving the "hard" boundary problem into a simple space, the complexity drops dramatically. In a traffic time series task, GFM was 160x faster than projection-based methods during inference (0.43s vs 49.7s).
  • High Fidelity: GFM consistently outperformed other constrained methods (like Reflection or Metropolis sampling) in sample quality. For example, in watermarked image generation, GFM achieved a better Fréchet Inception Distance (FID of 5.85) than standard reflection (6.06) or projection (6.88).

Limitations and Future Work

While GFM handles a wide variety of shapes, it still struggles with highly non-convex sets that aren't star-convex (e.g., a "donut" shape or a complex maze). Future work could involve decomposing these complex shapes into smaller convex or star-convex subsets.

Additionally, the current framework is designed for continuous domains. Extending GFM to discrete constraints—like graph structures or categorical data—remains an open challenge, though embedding techniques might eventually bridge this gap. Finally, adapting GFM for "one-step" generation models could further boost its already impressive speed.

Summary updated

BibTeX
@inproceedings{li2026gauge,
  author = {Xinpeng Li and Enming Liang and Minghua Chen},
  title = {{Gauge Flow Matching: Efficient Constrained Generative Modeling over General Convex Set and Beyond}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=vxq1OnaAMq},
}
Figure