MintFlow: Minimal Trajectory Intervention for Constrained Flow Matching
Organizations: Department of Mathematics, University of California, Los Angeles · Brookhaven National Laboratory
Abstract
Flow matching models excel at generative modeling, and many downstream applications require their samples to satisfy prescribed constraints, such as observed measurements and physical laws. However, existing constrained samplers often face a trade-off: enforcing constraints can substantially displace samples from the pretrained data distribution. To address this trade-off, we introduce MintFlow, a training-free constrained sampling framework that formulates constraint enforcement as a minimal intervention on the pretrained flow trajectory. MintFlow seeks the minimal perturbation of an intermediate flow state such that its subsequent evolution under the pretrained flow field satisfies the target constraint. By minimally perturbing the flow state while keeping the pretrained flow field unchanged, MintFlow enforces the constraint while minimizing unnecessary deviation from the pretrained distribution. An adjoint formulation yields a closed-form expression for this perturbation, eliminating expensive iterative optimization. Furthermore, MintFlow adaptively selects the intervention time to balance the required perturbation magnitude with its amplification by the remaining flow. Across a range of tasks in generative vision and physical system modeling, MintFlow achieves competitive constraint satisfaction while preserving the pretrained generative distribution substantially better than state-of-the-art constrained methods.
Figures & tables
| AFHQ-Cat | FFHQ | Efficiency | ||||||||||
| Method | FID | PSNR | SSIM | LPIPS | FID | PSNR | SSIM | LPIPS | Time | Memory | ||
| Task: Inpainting | ||||||||||||
| D-Flow | 1.775E-2 | 23.662 | 20.8597 | 0.7180 | 0.1578 | 1.592E-2 | 29.692 | 22.7378 | 0.7910 | 0.0915 | 153.47 | 3597.02 |
| DPS | 2.583E-2 | 14.532 | 20.9537 | 0.6232 | 0.1806 | 2.897E-2 | 33.498 | 21.3944 | 0.6913 | 0.1146 | 6.61 | 646.74 |
| Freedom | 6.013E-2 | 19.999 | 17.8908 | 0.4377 | 0.2502 | 6.789E-2 | 39.998 | 18.0828 | 0.5334 | 0.1605 | 4.60 | 637.36 |
| PNPFlow | 1.926E-2 | 24.063 | 22.2547 | 0.6877 | 0.1897 | 2.126E-2 | 63.579 | 22.3143 | 0.7388 | 0.1281 | 5.56 | 338.28 |
| Method | H | CLIP-T | CLIP-I | Time | Memory |
|---|---|---|---|---|---|
| DPS | 0.0115 | 0.2916 | 0.7911 | 9.17 | 8881.75 |
| Freedom | 0.0071 | 0.2756 | 0.8466 | 17.65 | 8122.47 |
| PNPFlow | 0.0503 | 0.2918 | 0.6897 | 42.45 | 6507.95 |
| FlowChef | 0.0136 | 0.2891 | 0.7939 | 9.29 | 6507.26 |
| MintFlow | 0.0069 | 0.2926 | 0.8151 | 8.79 | 6507.26 |
| System 1: Heat Equation | System 2: Reaction-Diffusion Equation | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | FID | MMD | Sim. Error | FID | MMD | Sim. Error | ||||
| Vanilla FFM | ||||||||||
| DiffusionPDE | ||||||||||
| D-Flow | ||||||||||
| ECI | ||||||||||
| PCFM | ||||||||||
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Details | Data | FM Method | Constraint |
|---|---|---|---|---|
| Image generation | App. D | MNIST, CIFAR-10 | Flow Matching | Intensity, fidelity |
| Image inverse problems | App. E (Sec. 4.1 ) | AFHQ-Cat, FFHQ | Rectified Flow | Observation consistency |
| Image editing | App. F (Sec. 4.2 ) | PIE-Bench | Latent text-conditioned FM | Text-guided generation with region preservation |
| Physics-informed generation | App. G (Sec. 4.3 ) | Heat, RD1D PDE | Functional Flow Matching | Boundary condition, conservation laws |
| Ablation studies: App. H | ||||
| Dataset | Channels | ResBlocks | Attention | Dropout | Channel Mult. |
|---|---|---|---|---|---|
| MNIST | 64 | 2 | 0.1 | ||
| CIFAR-10 | 128 | 4 | 0.3 |
| Distribution Metrics | Constraint | Efficiency | |||||
|---|---|---|---|---|---|---|---|
| Method | FID | KID | MMD | Time (s) | Memory (GB) | ||
| Unconstrained | 0.879 | 0.02215 | 0.03158 | 0.938 | 2.79E-1 | 5.07 | 0.10 |
| DiffusionPDE | 0.899 | 0.06860 | 0.04427 | 1.064 | 5.36E-2 | 4.29 | 5.10 |
| D-Flow | 0.813 | 0.05342 | 0.04726 | 0.902 | 5.49E-2 | 703.40 | 125.27 |
| ECI | 1.851 | 0.09982 | 0.07863 | 1.361 | 3.55E-15 | 8.89 | 0.35 |
| PCFM | 1.736 | 0.12379 | 0.12064 | 1.317 | 1.43E-12 | 18.37 | 10.12 |
| Distribution Metrics | Constraint | Efficiency | |||||
|---|---|---|---|---|---|---|---|
| Method | FID | KID | MMD | Time (s) | Memory (GB) | ||
| Unconstrained | 0.261 | 0.0089 | 0.0093 | 0.0093 | 4.54E-3 | 4.45 | 0.12 |
| DiffusionPDE | 0.242 | 0.0074 | 0.0078 | 0.0069 | 3.59E-3 | 6.98 | 5.15 |
| D-Flow | 0.257 | 0.0087 | 0.0092 | 0.5076 | 3.91E-3 | 1674.73 | 63.76 |
| ECI | 0.932 | 0.0079 | 0.0164 | 0.9659 | 3.43E-2 | 11.91 | 0.40 |
| PCFM | 10.225 | 0.3210 | 0.3336 | 3.1977 | 1.02E-1 | 79.56 | 10.17 |
| Distribution Metrics | Constraint | Efficiency | |||||
|---|---|---|---|---|---|---|---|
| Method | FID | KID | MMD | Time (s) | Memory (GB) | ||
| Unconstrained | 11.1568 | 0.0421 | 0.0518 | 5.354 | 1.02E-1 | 14.17 | 0.44 |
| DiffusionPDE | 8.4464 | 0.0014 | 0.0012 | 2.9062 | 4.66E-2 | 12.08 | 2.25 |
| D-Flow | 9.8484 | 0.0019 | 0.0015 | 3.138 | 5.789E-4 | 787.30 | 101.01 |
| ECI | 322.500 | 0.3596 | 0.29951 | 17.9582 | 2.53E-16 | 19.81 | 0.34 |
| PCFM | 125.262 | 0.0950 | 0.0727 | 11.1920 | 1.72E-12 | 27.10 | 4.26 |
| Distribution Metrics | Constraint | Efficiency | |||||
|---|---|---|---|---|---|---|---|
| Method | FID | KID | MMD | Time (s) | Memory (GB) | ||
| Unconstrained | 11.797 | 0.0053 | 0.0043 | 3.4347 | 2.18E-5 | 13.91 | 0.72 |
| DiffusionPDE | 10.779 | 0.0058 | 0.0042 | 3.3389 | 1.06E-5 | 14.82 | 2.59 |
| D-Flow | 9.984 | 0.0057 | 0.0042 | 3.3438 | 9.09E-6 | 1618.61 | 103.74 |
| ECI | 310.353 | 0.3391 | 0.3083 | 17.6227 | 3.17E-4 | 30.80 | 0.68 |
| PCFM | 116.953 | 0.0729 | 0.0578 | 10.8794 | 6.78E-4 | 49.53 | 4.60 |
| Distribution Fidelity † | Constraint †† | Physical Consistency ††† | |||||
| Method | FID | KID | MMD | PDE Res. | Sim. Error | ||
| System 1: Heat Equation | |||||||
| Vanilla FFM | |||||||
| DiffusionPDE | |||||||
| D-Flow | |||||||
| ECI | |||||||
Constrained Generative Modeling
Constrained generative modeling develops methods that produce samples satisfying structural, physical, semantic, or user-defined requirements.
See all 182 papers