cs.LGOct 8, 2026

Primal-Dual Flow Matching for Sample-Wise Constrained Generation

Authors: Zhengyan Huan, Peter Y. Lu, Shuchin Aeron

Organizations: Department of Electrical and Computer Engineering, Tufts University · NSF AI Institute for Artificial Intelligence and Fundamental Interactions

Abstract

We consider the problem of learning to generate data while satisfying a prescribed sample-wise constraint with a user-specified probability of constraint satisfaction. Starting with a population-level constrained negative log-likelihood minimization and using a flow-matching (FM) parameterization, under regularity assumptions and sufficient expressivity of the velocity field family, we derive guarantees on the probability of constraint satisfaction for the corresponding primal-dual optimization algorithm. We provide a practical implementation of this approach, called Primal-Dual Flow Matching (PDFM), which has direct control over constraint satisfaction rate and requires only binary membership oracle feedback for constraint satisfaction, avoiding the need for differentiable distances, projections, or special structure of the constraint set, such as convexity. We show that PDFM improves constraint satisfaction over vanilla FM and achieves competitive performance against constraint-aware baselines while maintaining distributional fidelity. Our code is available at https://github.com/ZhengyanHuan/PDFM.

Figures & tables

Appendix figures & tables14 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Constrained Flow Matching via Lagrangian Dual Flows

    Jul 5, 2026Vince Kurtz, Alexander DavydovConstrained Generative ModelingFlow Matching

  2. Constraint-Aware Flow Matching: Decision Aligned End-to-End Training for Constrained Sampling

    May 12, 2026Jacob K. Christopher, James E. Warner, Ferdinando FiorettoConstrained Generative ModelingFlow Matching

  3. MintFlow: Minimal Trajectory Intervention for Constrained Flow Matching

    Sep 30, 2026Yesom Park, Kelvin Kan, Qifan Chen +2Constrained Generative ModelingConstrained Sampling