arXiv:2511.08425cs.LGcs.SY2025-11TPAMI被引 7

用轨迹优化解决生成模型硬约束问题,提升样本质量和约束满足度。

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

  • 将硬约束采样转化为轨迹优化问题,利用最优控制思想精确满足终态约束。
  • 在机器人路径规划、偏微分方程边界控制和文本引导图像编辑中显著优于现有方法。
  • 支持积分代价与终端目标联合优化,兼顾分布一致性与生成质量。

扩散模型与流匹配已成为强大的生成建模方法,在捕捉复杂数据分布和推理时灵活引导方面表现卓越。然而,许多下游应用要求生成样本严格满足硬约束(如机器人轨迹必须避开障碍物),这超出了简单引导的范畴。现有基于投影的方法强制整个采样路径位于约束流形上,过于严格且降低样本质量。本文提出一种新框架,将硬约束采样重新表述为轨迹优化问题。核心思想是利用数值最优控制,使采样轨迹在终态精确满足约束。通过挖掘流匹配模型的内在结构并结合模型预测控制技术,我们将原本复杂的约束优化问题转化为可高效求解的近似形式。此外,该轨迹优化视角具备高度灵活性,可在统一框架内引入积分代价以最小化分布偏移,以及终端目标以进一步提升样本质量。我们提供了控制理论分析,建立了近似解与理想解之间的误差界。在机器人规划、偏微分方程边界控制及文本引导图像编辑等多个领域进行的大量实验表明,所提出的算法HardFlow在约束满足度与样本质量上均显著优于现有方法。

原文摘要 · Abstract (English)

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.

生成模型轨迹优化约束采样流匹配

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。