cs.AIOct 29, 2026

AegisFlow: Training-Free Non-Myopic Path-Safe Guided Flow Matching

Authors: Kunpeng Liu, Boshi Zhang, Keyou You

Organizations: Department of Automation and BNRist, Tsinghua University, Beijing, China

Abstract

Pretrained generative models, such as diffusion and flow matching models, have demonstrated exceptional capabilities in synthesizing high-quality data. However, steering their generative trajectories to satisfy strict constraints--such as identity preservation in image editing or obstacle avoidance in robotics--remains fundamentally challenging. While recent training-free guidance methods enforce path-safety, they rely heavily on min-norm controllers that only account for immediate constraint satisfaction. These myopic approaches often yield suboptimal trajectories that hover dangerously close to the boundary, severely restricting the model's ability to optimize toward its target. In this paper, we propose AegisFlow, a training-free, non-myopic path-safe guidance framework that recasts guided generation as a safety-critical optimal control problem with global scope. By integrating a time-varying barrier function directly into the global cost functional, AegisFlow naturally enforces constraints along the entire generative path. To compute the global optimal control, we derive a tractable, mathematically grounded approximation of the Hamilton-Jacobi-Bellman (HJB) equation. Comprehensive experiments demonstrate that AegisFlow outperforms state-of-the-art methods across text-guided image manipulation and robotic planning, establishing a significantly better trade-off between target alignment and constraint satisfaction. Code is available at https://github.com/LiuKunpeng03/AegisFlow.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Conflict-Aware Additive Guidance for Flow Models under Compositional Rewards

    May 20, 2026Xuehui Yu, Fucheng Cai, Meiyi Wang +2Constrained Generative ModelingDiffusion Model Guidance

  2. ConFlow: Constraints-Guided Learning with Flow Matching for Motion Generation

    Jul 15, 2026Nutan Chen, Jianxiang Feng, Marvin Alles +1Constrained Generative ModelingFlow Matching

  3. Coupled Guidance for Flow Matching

    Oct 29, 2026Mateo Clémente, Léo Maxime Brunswic, Rui Heng Yang +1Flow MatchingFlow-Based Generative Modeling