arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.08425cs.LGcs.SYeess.SY
收藏

HardFlow: 通过轨迹优化实现流匹配模型的硬约束采样

HardFlow: Hard-Constrained Sampling for Flow-Matching Models via Trajectory Optimization

Massachusetts Institute of Technology(麻省理工学院)

Zeyang Li, Kaveh Alim, Navid Azizan

AI总结:

本文提出HardFlow框架,通过轨迹优化解决流匹配模型中硬约束采样问题,利用数值最优控制确保终端时间满足约束,并在统一框架下提升样本质量。

摘要:

扩散和流匹配已成为生成建模中强大的方法,能够捕捉复杂数据分布并实现灵活的推理引导。然而,许多下游应用需要对生成样本施加硬约束(例如机器人轨迹需避障),这超出了简单引导的范围。现有基于投影的方法将整个采样路径限制在约束流形上,过于严格且会降低样本质量。本文提出一种新框架,将硬约束采样重新表述为轨迹优化问题。我们的关键见解是利用数值最优控制引导采样轨迹,使约束在终端时间精确满足。通过利用流匹配模型的底层结构并采用模型预测控制技术,我们将原本复杂的约束优化问题转化为可解的替代方案。此外,这种轨迹优化视角提供了超越单纯约束满足的灵活性,允许包含积分成本以最小化分布偏移和终端目标以进一步提升样本质量。我们提供了控制理论分析,建立了可解替代方案与理想公式之间的近似误差界限。在多样本域(包括机器人规划、偏微分方程边界控制和视觉文本引导图像编辑)的广泛实验中,我们的算法(命名为HardFlow)在约束满足和样本质量方面均显著优于现有方法。

英文摘要:

Diffusion and flow-matching have emerged as powerful methodologies for generative modeling, with remarkable success in capturing complex data distributions and enabling flexible guidance at inference time. Many downstream applications, however, demand enforcing hard constraints on generated samples (for example, robot trajectories must avoid obstacles), a requirement that goes beyond simple guidance. Prevailing projection-based approaches constrain the entire sampling path to the constraint manifold, which is overly restrictive and degrades sample quality. In this paper, we introduce a novel framework that reformulates hard-constrained sampling as a trajectory optimization problem. Our key insight is to leverage numerical optimal control to steer the sampling trajectory so that constraints are satisfied precisely at the terminal time. By exploiting the underlying structure of flow-matching models and adopting techniques from model predictive control, we transform this otherwise complex constrained optimization problem into a tractable surrogate that can be solved efficiently and effectively. Furthermore, this trajectory optimization perspective offers significant flexibility beyond mere constraint satisfaction, allowing for the inclusion of integral costs to minimize distribution shift and terminal objectives to further enhance sample quality, all within a unified framework. We provide a control-theoretic analysis of our method, establishing bounds on the approximation error between our tractable surrogate and the ideal formulation. Extensive experiments across diverse domains, including robotics (planning), partial differential equations (boundary control), and vision (text-guided image editing), demonstrate that our algorithm, which we name $\textit{HardFlow}$, substantially outperforms existing methods in both constraint satisfaction and sample quality.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑