acceptodds
Published as a conference paper at NeurIPS 2026

AegisFlow: Training-free Non-myopic Path-safe Guided Flow Matching

Kunpeng Liu, Boshi Zhang, Keyou You

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.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_eXjFOpenReview ↗
Rating
5
Clarity
4
Confidence
2
Originality
3
Quality
4
Significance
3
Read review
Summary

The authors proposed a training-free globally optimal guidance framework. AegisFlow integrate a barrier function directly into the global cost functional so that the constraint is enforced along the entire generation path. Authors also derived a tractable approximation using the HJB equation.

Strengths and weaknesses

Strengths:

  • The paper is well written, with clear motivation and illustrative visuals and theories to support the claim
  • The paper has strong theoretical claims. The guided generation is formed into a safety-critical optimal control problem and ensures global optimal instead of myopic. Path safety is justified in proposition2.
  • Extensive experiments in different domains well supports the claim.

Weaknesses:

  • No limitation is discussed
  • There is no implementation details to reproduce
Questions
  • what is the computation required? The gradient with respect to x could be expensive
Limitations

The paper does not talk about limitations specifically

Paper formatting concerns

N/A

Final justification

Thank you for providing the detailed rebuttal. I think they answered my questions and I will keep my score.

1 comment

We sincerely thank the reviewer for the positive feedback. Below we extend our discussions so as to help address the concerns.


Q1. What is the computation required? The gradient with respect to xx could be expensive.

A1. We shall illustrate the procedure of Algorithm 1 in details. At each iteration, a forward pass first compute xoutkx^k_\text{out} that f+ukf+u^k drives x0x_0 to. Then a backward pass back-propagates the gradient ∇xΨ(xoutk)\nabla_x\Psi(x^k_\text{out}) to each timestep tt. Note that xoutkx^k_\text{out} is determined by x(t)x(t) via xoutk=Φt→1f+uk(x)x^k_\text{out}=\Phi^{f+u^k}_{t\to1}(x). Moreover, the gradient of the barrier function ∇xB(x,t)\nabla_x B(x,t) is computed at each tt. Those two parts are combined to update uk(t)u^k(t) to be uk+1(t)u^{k+1}(t).

Therefore, it is required to compute gradient with respect to xx twice at each timestep. The back-propagation process is indeed the most expensive part of the algorithm. It is common in gradient-based methods (e.g., Liu et al., 2023; Wang et al., 2024).

To better understand how those computation benefits the generation quality, we provide an ablation on the number of iterations, including runtime and peak GPU Memory. Intuitively, better solution can be found with more iterations in the cost of more computation. The learning rate is increased when using fewer iterations, which is a common practice.

CelebA-HQ efficiency tradeoff:

MethodCLIP ↑\uparrowLPIPS ↓\downarrowID ↑\uparrowTime (s)Peak Mem (MB)
HardFlow (25 iters, lr=2.5)0.3180.1330.830153.932103.96
AegisFlow (25 iters, lr=2.5)0.3300.1130.870398.044112.88
AegisFlow (15 iters, lr=2.5)0.3210.1130.869246.794112.90
AegisFlow (10 iters, lr=5.0)0.3150.1350.853154.574113.19

Since HardFlow (Li et al., 2026) optimizes a combined CLIP+LPIPS objective with an LPIPS constraint, we re‑ran both methods using a common protocol: optimize CLIP + LPIPS and enforce the same ID constraint (>0.825). AegisFlow with 10 iterations matches HardFlow’s runtime while remaining competitive performance. With more iterations, it achieves clearly superior quality. The memory overhead is due to back-propagation through the full generative trajectory, a property shared by most gradient‑based guided generation methods.

Maze2D efficiency trade‑off:

#IterBS1 ↑\uparrowBS2 ↑\uparrowScore ↑\uparrowκ↓\kappa\downarrowa↓a\downarrowTime (s)Peak Mem (MB)
100.0490.0711.63544.7250.2944.1556.25
50.0220.0641.63551.8665.4426.6756.25
30.0200.0411.63553.5871.8716.7056.25

We set an MNC post-hoc safeguard to ensure safety. As the number of the iterations decrease, AegisFlow’s safety margins and smoothness gradually degrade toward the myopic MNC baseline. The non‑myopic planning still yields slightly better scores even in the low‑budget regime.

Avoiding efficiency trade‑off:

#IterTimesteps ↓\downarrowGoal ↑\uparrowSafe ↑\uparrowViolation ↓\downarrowTime (s)Peak Mem (MB)
762.6 ±\pm 2.01.000.980.1 ±\pm 0.520.85181.22
563.1 ±\pm 3.01.000.970.3 ±\pm 1.716.28181.22
363.3 ±\pm 3.01.000.950.6 ±\pm 2.911.07181.22

The performance smoothly degrades with fewer iterations, demonstrating that the core advantage is the non‑myopic cost functional, with the iterative refinement allowing the user to trade compute for quality.

These results confirm that AegisFlow manifests an efficiency–quality trade‑off.


Q2. No limitation is discussed.

A2. Some limitations are discussed in Sec. 6. We acknowledge two main limitations:

  • AegisFlow requires back‑propagating through the full generative trajectory, which increases memory usage compared to light‑weight plug‑and‑play controllers. However, the ablation above shows that the cost can be traded off and remains within practical bounds for the tested domains.

  • The HJB approximation relies on a linearisation and other approximations that may degrade for highly curved flow geometries. Future work may explore higher‑order expansions to improve fidelity. We will add an explicit discussion of limitations to the final manuscript.


Q3. There is no implementation details to reproduce.

A3. We present the pseudocode of AegisFlow in Sec. 4 and provide useful implementation details in Appendix C, including the hyperparameters and the training and inference strategy. We are happy to supply any further necessary details to ensure reproducibility.


We hope these clarifications address the reviewer’s concerns. Thanks again for the valuable feedback.

Reviewer_CbUAOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper proposes AegisFlow, a training-free guidance framework for flow matching models under path-safety constraints. The paper focuses on the limitation of existing myopic safety controllers, such as CBF/MNC-style corrections, which enforce immediate constraint satisfaction but may keep trajectories close to constraint boundaries and reduce the ability to optimize toward the target objective. To address this, the method formulates guided generation as a safety-constrained optimal control problem. It incorporates a time-varying barrier function into the global cost functional, so that trajectories are penalized for approaching unsafe regions throughout the generative path. Since directly solving the resulting HJB equation is intractable for practical generative models, the paper derives an approximate update rule for a non-myopic control signal and applies it in a training-free manner during flow matching sampling. The method is evaluated on text-guided image manipulation with identity preservation, Maze2D planning, and D3IL robotic manipulation. The reported results suggest that AegisFlow can improve the trade-off between target optimization and path-level constraint satisfaction, achieving better text alignment and perceptual preservation in image editing, larger safety margins and smoother trajectories in Maze2D, and competitive goal-reaching and safety performance in robotic manipulation.

Strengths and weaknesses

The motivation of the paper is meaningful. Myopic safety controllers can indeed keep a trajectory feasible while forcing it to stay close to constraint boundaries, which may hurt task optimization. The paper gives a clear intuitive example and targets a relevant problem at the intersection of guided generative modeling, planning, and safety constraints. I also appreciate that the authors compare against OC-Flow, FlowGrad, SafeDiffuser/SafeFlowMatcher, and constrained planning baselines, and that the experiments cover both image and control domains.

However, my main concern is that the theoretical claims are stronger than what is actually established for the implemented method. The path-safety result is proved for the exact value function and the exact optimal control under smoothness assumptions. The practical algorithm, however, relies on several approximations, including local approximations used to make the forced HJB tractable, a first-order approximation of the terminal loss, the approximation (G_t(y)\approx I), and a heuristic substitution of the nominal flow map with the iteratively updated controlled flow. The paper does not prove that Algorithm 1 remains path-safe, converges, or approximates the globally optimal control in a controlled manner. Thus, claims related to global optimality, hard safety, or guaranteed path safety should be substantially qualified.

The originality is moderate. Relative to FlowGrad and OC-Flow, the main technical contribution is to extend optimal-control-based guidance for flow matching with a time-varying barrier term in the global running cost and to derive an approximate HJB-based control update for path safety. This is a useful and natural extension, but barrier-function methods in constrained optimal control are well established, and the paper itself acknowledges closely related safety-control formulations. The contribution is therefore best viewed as a targeted extension of optimal-control guidance to non-myopic path safety in flow matching, rather than a fundamentally new optimal-control methodology.

The experiments show promising trends but are not fully convincing. On CelebA-HQ, AegisFlow achieves better CLIP and LPIPS scores than the compared methods, but the improvements over the strongest baseline are relatively small. In addition, several image-editing baselines are relatively old, so the comparison may not fully reflect the current state of training-free or safety-aware guided generation. In Maze2D, AegisFlow improves safety margins and smoothness, but the reported runtime is about an order of magnitude slower than SafeFlowMatcher. In D3IL, the method matches DPCC-C in safety rate and completes the task in fewer environment steps, but the paper does not report runtime, and broader safe-flow baselines are missing. Overall, the empirical results are positive but not strong enough to fully support the paper’s broad claims of state-of-the-art safe guided generation.

The writing is generally clear and the paper is well organized, with helpful figures and tables.

Questions
  1. Can the authors clarify what safety guarantees, if any, apply to the implemented Algorithm 1 rather than only to the exact continuous-time HJB formulation?

The practical method relies on several approximations, so it is important to clearly separate the guarantees established for the idealized optimal-control problem from those, if any, that remain valid for the implemented algorithm. My evaluation would increase if the authors could provide a formal approximation or feasibility bound, a weaker but precisely stated guarantee, or a carefully designed empirical stress test demonstrating that Algorithm 1 preserves constraint satisfaction under challenging settings.

  1. Can the authors strengthen the baseline comparison, particularly on CelebA-HQ?

The image-editing experiments mainly compare against relatively old guided-generation methods, and it is unclear whether the current results reflect the state of the art in training-free or constraint-aware image editing. Please include additional recent and relevant baselines on CelebA-HQ, using the same evaluation protocol and computational budget where possible. This comparison would help determine whether the reported CLIP and LPIPS improvements remain meaningful against stronger contemporary methods. My evaluation would increase if AegisFlow continues to show a clear safety–quality advantage under a broader and more up-to-date comparison.

  1. Can the authors report the actual runtime for D3IL and discuss the practical cost-quality tradeoff?

AegisFlow uses fewer environment steps in D3IL, but its actual computational cost is not reported. Since it is substantially slower than SafeFlowMatcher in Maze2D, it would be helpful to know whether similar overhead exists in robotic manipulation and whether the additional cost is justified by safety or performance gains.

Limitations

Partially. The paper acknowledges relevant limitations, including the accuracy of the HJB approximation and the computational overhead of the method. However, the discussion could more clearly distinguish the guarantees established for the exact optimal-control formulation from those that apply to the approximate implemented algorithm. It would also be helpful to discuss the practical computational cost of the iterative control procedure across different tasks.

Paper formatting concerns

I did not notice any major formatting or anonymity issues.

Final justification

After considering the rebuttal and discussion, I raise my rating to 4 (Borderline Accept).

  • Resolved: The new HardFlow comparison and runtime–quality analyses substantially strengthen the empirical evaluation and address my concerns about baseline coverage and computational cost.
  • Remaining concern: The theoretical guarantee applies to the idealized converged control, not automatically to the finite-iteration output of Algorithm 1. Hard safety may therefore require an additional provable safeguard.
  • Weighting: I place greater weight on the strengthened empirical evidence and the practical value of the non-myopic guidance framework. However, the unresolved finite-iteration guarantee prevents a stronger accept recommendation.

I appreciate the authors’ commitment to clarify this distinction and appropriately limit the safety claims in the final version.

1 comment

We sincerely thank the reviewer for the constructive feedback. Below we address each concern in detail.


Q1. What safety guarantee applies to Algorithm 1 rather than the exact HJB formulation?

A1. We derive a safety guarantee for the idealized control that Algorithm 1 aims to approximate, and then clarify its practical implications.

Idealized fixed‑point control. Algorithm 1 can be viewed as a fixed point iteration that seeks for u^\hat u that satisfies u^=−λt−1∇xW~,\hat u = -\lambda_t^{-1}\nabla_x \tilde W, where W~:=Ψ∘Φt→1f+u^(x)+αtB(x,t),αt:=λts(t)βt\tilde W:=\Psi\circ\Phi^{f+\hat u}_{t\to1}(x)+\alpha_t B(x,t), \alpha_t:=\lambda_t s(t)\beta_t. We now show that with necessary regularity, the cost functional J(u^)J(\hat u) is finite.

Recall that the cost functional is defined by J(u):=∫01[λt2∥u(t)∥2+βtB(x(t),t)]dt+Ψ(x(1)),x˙=f(x,t)+u,x(0)=x0.J(u):=\int_0^1\left[\frac{\lambda_t}2\|u(t)\|^2+\beta_t B(x(t),t)\right]\mathrm{d}t+\Psi(x(1)),\quad \dot x=f(x,t)+u,\quad x(0)=x_0. and s(t):=∫t1λt−1dts(t):=\int_t^1\lambda_t^{-1}\mathrm{d}t. Note that ddtϕ(x,t)=0\frac{\mathrm{d}}{\mathrm{d}t}\phi(x,t)=0, which yields ddtW=αt˙B+αt∂tB+αt∇xB⋅(f+u).\frac{\mathrm{d}}{\mathrm{d}t}W=\dot{\alpha_t}B+\alpha_t\partial_t B+\alpha_t\nabla_x B\cdot(f+u). We have J(u^)=W(x0,0)+∫01[(αt˙+βt)B+αtDfB+12λt∥∇xϕ∥2−αt22λt∥∇xB∥2]dt,J(\hat u)=W(x_0,0)+\int_0^1\left[(\dot{\alpha_t}+\beta_t)B+\alpha_t D_f B+\frac1{2\lambda_t}\|\nabla_x\phi\|^2-\frac{\alpha_t^2}{2\lambda_t}\|\nabla_x B\|^2\right]\mathrm{d}t, where Df:=∂t+f⋅∇xD_f:=\partial_t+f\cdot\nabla_x.

A widely considered barrier function, which is also adopted in this paper, takes the form B(x,t):=h−1(x,t)B(x,t):=h^{-1}(x,t) (e.g., Ames et al., 2016; Cohen et al., 2020). Direct calculation yields ∥∇xB∥2=∥∇xh∥2B4\|\nabla_x B\|^2=\|\nabla_x h\|^2 B^4 and ∣DfB∣=∣Dfh∣B2|D_f B|=|D_f h|B^2. Let RB:=(αt˙+βt)B+αtDfB−αt22λt∥∇xB∥2≤aB+bB2−cB4R_B:=(\dot{\alpha_t}+\beta_t)B+\alpha_t D_f B-\frac{\alpha_t^2}{2\lambda_t}\|\nabla_x B\|^2\le aB+bB^2-cB^4, where a=∣αt˙+βt∣,b=αt∣Dfh∣,c=αt22λt∥∇xh∥2a=|\dot{\alpha_t}+\beta_t|, b=\alpha_t|D_f h|, c=\frac{\alpha_t^2}{2\lambda_t}\|\nabla_x h\|^2. Apply Young's inequality aB≤34ϵ4/3a4/3+14ϵ4B4aB\le\frac34\epsilon^{4/3}a^{4/3}+\frac1{4\epsilon^4}B^4 with ϵ4=1/2c\epsilon^4=1/2c yields aB−c2B4≤34(2c)−1/3a4/3aB-\frac c2 B^4\le\frac34(2c)^{-1/3}a^{4/3}. Hence, RB≤(bB2−c2B4)+(aB−c2B4)≤b22c+34(2c)−1/3a4/3=λt∣Dfh∣2∥∇xh∥2+34⋅∣αt˙+βt∣4/3λt1/3(αt2∥∇xh∥2)1/3.R_B\le (bB^2-\frac c2 B^4)+(aB-\frac c2 B^4)\le\frac{b^2}{2c}+\frac34(2c)^{-1/3}a^{4/3}=\frac{\lambda_t|D_f h|^2}{\|\nabla_x h\|^2}+\frac34\cdot\frac{|\dot{\alpha_t}+\beta_t|^{4/3}\lambda_t^{1/3}}{(\alpha_t^2\|\nabla_x h\|^2)^{1/3}}.

Assuming ∣αt˙+βt∣4/3αt2/3∈L(0,1)\frac{|\dot{\alpha_t}+\beta_t|^{4/3}}{\alpha_t^{2/3}}\in L(0,1), which is satisfied by the constant schedule adopted in the paper, f,u^f,\hat u and ∥∇xϕ∥\|\nabla_x\phi\| are bounded, hh has bounded C1C^1-norm and ∥∇xh∥\|\nabla_x h\| is bounded away from zero. Then the RHS is integrable, J(u^)<∞J(\hat u)<\infty, and the finiteness of J(u^)J(\hat u) implies path-safety.

From idealized guarantee to Algorithm 1. Assuming convergence, the output of Algorithm 1 inherits the above safety property. Intuitively, the steep barrier penalty strongly repels trajectories from the unsafe set, which is empirically validated in Sec. 5. Although it is hard to establish theoretical guarantee on the performance of finite step output of Algorithm 1, it is convenient to set a safeguard (e.g., MNC) that intervenes when necessary, which provably enforces constraints. We will add a remark in the paper to clearly separate the idealized guarantee and the practical algorithm.


Q2. Can the authors strengthen the baseline comparison, particularly on CelebA-HQ?

Yes. We add a comparison with HardFlow (Li et al., IEEE TPAMI, 2026). Since HardFlow optimizes a combined CLIP+LPIPS objective with an LPIPS constraint, we re‑ran both methods using a common protocol: optimize CLIP + LPIPS and enforce the same ID constraint (>0.825). The results are:

MethodCLIP ↑\uparrowLPIPS ↓\downarrowID ↑\uparrow
HardFlow (Li et al., 2026)0.3180.1330.830
AegisFlow (Ours)0.3300.1130.870

AegisFlow outperforms this strong contemporary baseline across all metrics, confirming that its advantage persists against the current state of the art.


Q3. Can the authors report the actual runtime for D3IL and discuss the practical cost-quality tradeoff?

Yes. We now provide a thorough ablation over the number of iterations for all tasks, reporting runtime, peak memory, and performance. The tables below demonstrate a clear efficiency‑quality trade‑off.

CelebA-HQ efficiency tradeoff:

MethodCLIP ↑\uparrowLPIPS ↓\downarrowID ↑\uparrowTime (s)Peak Mem (MB)
HardFlow (25 iters, lr=2.5)0.3180.1330.830153.932103.96
AegisFlow (25 iters, lr=2.5)0.3300.1130.870398.044112.88
AegisFlow (15 iters, lr=2.5)0.3210.1130.869246.794112.90
AegisFlow (10 iters, lr=5.0)0.3150.1350.853154.574113.19

AegisFlow with 10 iterations matches HardFlow’s runtime while remaining competitive performance. With more iterations, it achieves clearly superior quality. The memory overhead is due to back-propagation through the full generative trajectory, a property shared by most gradient‑based guided generation methods.

Maze2D efficiency trade‑off:

#IterBS1 ↑\uparrowBS2 ↑\uparrowScore ↑\uparrowκ↓\kappa\downarrowa↓a\downarrowTime (s)Peak Mem (MB)
100.0490.0711.63544.7250.2944.1556.25
50.0220.0641.63551.8665.4426.6756.25
30.0200.0411.63553.5871.8716.7056.25

We set an MNC post-hoc safeguard to ensure safety. As the number of the iterations decrease, AegisFlow’s safety margins and smoothness gradually degrade toward the myopic MNC baseline. The non‑myopic planning still yields slightly better scores even in the low‑budget regime.

Avoiding efficiency trade‑off:

#IterTimesteps ↓\downarrowGoal ↑\uparrowSafe ↑\uparrowViolation ↓\downarrowTime (s)Peak Mem (MB)
762.6 ±\pm 2.01.000.980.1 ±\pm 0.520.85181.22
563.1 ±\pm 3.01.000.970.3 ±\pm 1.716.28181.22
363.3 ±\pm 3.01.000.950.6 ±\pm 2.911.07181.22

The performance smoothly degrades with fewer iterations, demonstrating that the core advantage is the non‑myopic cost functional, with the iterative refinement allowing the user to trade compute for quality.

These results illustrate the practical cost‑quality trade‑off and show that AegisFlow can be tuned to a desired operating point.


Q4. The originality is moderate.

A4. We agree with the reviewer that augmenting a cost functional with a barrier function is an established technique in optimal control. The novelty of AegisFlow lies not in the barrier‑augmented cost itself, but in how we make this formulation computationally tractable and effective for guided flow matching.

  • We derive a tractable estimate (Eq. 16) of the optimal control for the barrier‑augmented problem based on HJB analysis. To the best of our knowledge, such an approximation has not been considered in the literature.

  • We propose an iterative algorithm based on the approximation. The derivation relies on linearizations and constant approximation. A one‑shot control computed from the uncontrolled flow would accumulate significant error over long horizons. Our key insight is to recast the control as a fixed‑point iteration: we replace the uncontrolled flow map with the current controlled flow and refine the control repeatedly (Algorithm 1), substantially reducing the compounding approximation error.

In doing so, AegisFlow bridges a gap between optimal control theory and practical training‑free guided generation, providing a principled alternative to myopic safety mechanisms.


We hope these responses address the reviewer’s concerns.

Reviewer_tXTmOpenReview ↗
Rating
4
Clarity
2
Confidence
3
Originality
3
Quality
2
Significance
3
Read review
Summary

This paper formulates guided generation (through pretrained diffusion or flow matching) to be a safety-critical optimal control problem with a barrier function integrated into the cost functionals. A hamilton-Jacobi-Bellman equation approximation was derived and applied to three different cases. The core idea is that such a HJB based cost function would account for long term consequences of actions or guidance, therefore will do better that methods that rely on min-norm controllers or local projection based corrections.

Strengths and weaknesses

Strengths

It is very interesting to see a framework that combines HJB, barrier funciton, and constraints satisfaction, to improve guided generation performance.

There is also an approximation of the HJB, which makes the framework promising to be applied in different scenarios.

The experimental results are fairly interesting, especially the robotic manipulation task.

Weaknesses

While the paper is theoretically interesting, the experiments can benefit from clarifications:

  1. It would be beneficial to clearly define what each metric is acconting for, and why do you choose them?
  2. It would be good to see more discussions on the results. For intance, for the CelebA-HQ, the gains are very limited, particularly when compared to OC-Flow + MNC. It would be great to include inference time/memory related data here as well, as it feels that the proposed methods need some iterations to get the results. If the cost is efficiency, then the gains will be very limited. 3.The Maze experiments, how many different obstacle distributions have you carried out? If the 100 trials are with the same obstacles configurations, then the results are much less convincing.
  3. For the robotic manipulation tasks, similar concerns remain: i.e., can you test your methods on more tasks?
  4. The work is quite theory heavy, and the autors provide some materials in the Appendix. But the key thing is: how did you turn them into or incorporate them with the generative methods? The algorithm is useful, but it would be hlepful if you make the implementation process clearer.
Questions

Please refer to the Weaknesses

Limitations

Mostly addressed, but please please add more details on the implementation process, the experiments ranges from image generation to robotics, you need to provide enough implementation details to help people understand how the theories are working exactly.

Paper formatting concerns

n/a

1 comment

We sincerely thank the reviewer for the thoughtful feedback. We address all concerns with new experiments and expanded explanations, as detailed below.


Q1. What does each metric measure, and why was it selected?

A1. The metrics were chosen to capture the complementary dimensions of the target‑quality‑safety trade‑off and are standard in the literature.

CelebA‑HQ: CLIP (↑\uparrow) measures alignment with the target text prompt; LPIPS (↓\downarrow) quantifies perceptual deviation from the source image; ID (↑\uparrow) is the ArcFace‑based identity similarity. These are widely used in text‑guided image editing (e.g., FlowGrad (Liu et al., 2023), OC-Flow (Wang et al., 2024)).

Maze2D: BS1/BS2 (↑\uparrow) are the minimum constraint‑function values along the entire planned trajectory – a positive value indicates path safety and a larger value implies a bigger safety margin. The normalized D4RL score (↑\uparrow) evaluates task completion, while curvature κ\kappa (↓\downarrow) and acceleration aa (↓\downarrow) assess trajectory smoothness and dynamical regularity. These are considered by SafeFlowmatcher (Yang et al., 2026).

D3IL (Avoiding): Goal (↑\uparrow) is the target‑reaching success rate; Safe (↑\uparrow) is the success rate under safety constraints; Timesteps (↓\downarrow) is execution length; Violation (↓\downarrow) counts unsafe timesteps, following the evaluation protocol of DPCC‑C (Romer et al., 2024).

We will consolidate these definitions and their rationales in the final manuscript.


Q2. The CelebA-HQ gains are limited; please discuss the results and efficiency more carefully.

A2. We fully agree that efficiency and the magnitude of gains deserve more context. First, we include a stronger recent baseline, HardFlow (Li et al., IEEE TPAMI, 2026). For a fair comparison, we let both methods optimize CLIP and LPIPS while enforcing an ID constraint (>0.825). The results are:

MethodCLIP ↑\uparrowLPIPS ↓\downarrowID ↑\uparrow
HardFlow (Li et al., 2026)0.3180.1330.830
AegisFlow (Ours)0.3300.1130.870

AegisFlow outperforms HardFlow on all three metrics, showing that the improvement over MNC is not merely incremental but also competitive with state‑of‑the‑art.

Second, we provide an ablation on the number of iterations, including runtime and peak GPU Memory. The learning rate is increased when using fewer iterations, which is a common practice.

CelebA-HQ efficiency tradeoff:

MethodCLIP ↑\uparrowLPIPS ↓\downarrowID ↑\uparrowTime (s)Peak Mem (MB)
HardFlow (25 iters, lr=2.5)0.3180.1330.830153.932103.96
AegisFlow (25 iters, lr=2.5)0.3300.1130.870398.044112.88
AegisFlow (15 iters, lr=2.5)0.3210.1130.869246.794112.90
AegisFlow (10 iters, lr=5.0)0.3150.1350.853154.574113.19

AegisFlow with 10 iterations matches HardFlow’s runtime while remaining competitive performance. With more iterations, it achieves clearly superior quality. The memory overhead is due to back-propagation through the full generative trajectory, a property shared by most gradient‑based guided generation methods.

Maze2D efficiency trade‑off:

#IterBS1 ↑\uparrowBS2 ↑\uparrowScore ↑\uparrowκ↓\kappa\downarrowa↓a\downarrowTime (s)Peak Mem (MB)
100.0490.0711.63544.7250.2944.1556.25
50.0220.0641.63551.8665.4426.6756.25
30.0200.0411.63553.5871.8716.7056.25

We set an MNC post-hoc safeguard to ensure safety. As the number of the iterations decreases, AegisFlow’s safety margins and smoothness gradually degrade toward the myopic MNC baseline. The non‑myopic planning still yields slightly better scores even in the low‑budget regime.

Avoiding efficiency trade‑off:

#IterTimesteps ↓\downarrowGoal ↑\uparrowSafe ↑\uparrowViolation ↓\downarrowTime (s)Peak Mem (MB)
762.6 ±\pm 2.01.000.980.1 ±\pm 0.520.85181.22
563.1 ±\pm 3.01.000.970.3 ±\pm 1.716.28181.22
363.3 ±\pm 3.01.000.950.6 ±\pm 2.911.07181.22

The performance smoothly degrades with fewer iterations, demonstrating that the core advantage is the non‑myopic cost functional, with the iterative refinement allowing to trade computation for quality.

These results confirm that AegisFlow offers a meaningful and tunable efficiency–quality trade‑off.


Q3. How many obstacle distributions are covered by the 100 Maze trials? Can the method be tested on more robotic manipulation tasks?

A3. The original 100 Maze trials used fixed obstacle configurations (one elliptical, one hyper‑elliptical), which is common practice in the literature (e.g., Xiao et al., 2023; Yang et al., 2026). We add an experiment with randomly placed obstacles.

MethodBS1 ↑\uparrowBS2 ↑\uparrowScore ↑\uparrowκ↓\kappa\downarrowa↓a\downarrow
SafeFlowmatcher (Yang et al., 2026)0.0190.0371.63354.1067.08
AegisFlow (Ours)0.0200.0391.63347.9059.06

For the robotic manipulation task, we similarly tested AegisFlow with randomly placed obstacles.

MethodTimesteps ↓\downarrowGoal ↑\uparrowSafe ↑\uparrowViolation ↓\downarrow
AegisFlow63.7 ±\pm 2.41.000.960.3 ±\pm 1.5

Q4. How is the theory incorporated into the generative procedure?

A4. Sec. 3 contains the motivation of our method. Flow matching models the generation as an ODE x˙=f\dot x=f, where ff is the output of a pretrained model. Training-free methods seek for a control uu at the inference time that steers the trajectory x˙=f+u\dot x=f+u. Such uu is expected to improve the quality of the output (measured by Ψ(x(tf))\Psi(x(t_f))) while keep the entire trajectory within a safe region (x(t)∈Ctx(t)\in C_t). It is natural to formulate it as an constrained optimal control problem (Eq. 3). We then incorporate the constraint into the cost functional with a barrier function, turning the problem into a constraint-free one (Eq. 9). Path-safety under the optimal solution u⋆u^\star to Eq. 9 is justified. In Sec. 4 we derive a tractable approximation of u⋆u^\star (Eq. 16) based on the HJB equation. Algorithm 1 can be viewed as a fixed point iteration that seeks for u^\hat u that satisfies u^=−λt−1∇xW~\hat u = -\lambda_t^{-1}\nabla_x \tilde W, where W~:=Ψ∘Φt→1f+u^(x)+λts(t)βtB(x,t)\tilde W:=\Psi\circ\Phi^{f+\hat u}_{t\to1}(x)+\lambda_t s(t)\beta_t B(x,t). This is exactly the RHS of Eq. 16, except that the uncontrolled flow is replaced by a controlled one (cf. Remark 1).

For the text-guided image manipulation task, xx lies in the pixel space. We first inverse the original image xorix_{\text{ori}} back to noise x0x_0. If no control is imposed, the pretrained RF model ff would drive x0x_0 to xorix_{\text{ori}}, which is not desired. That is why we seek to modify ff to be f+uf+u, where uu is to be determined by Algorithm 1. At each iteration, a forward pass first compute xoutkx^k_\text{out} that f+ukf+u^k drives x0x_0 to. Then a backward pass back-propagates the gradient ∇xΨ(xoutk)\nabla_x\Psi(x^k_\text{out}) to each timestep tt. Note that xoutkx^k_\text{out} is determined by x(t)x(t) via xoutk=Φt→1f+uk(x)x^k_\text{out}=\Phi^{f+u^k}_{t\to1}(x). In addition, the gradient of the barrier function ∇xB(x,t)\nabla_x B(x,t) is computed at each tt. Those two parts are combined to update uk(t)u^k(t) to be uk+1(t)u^{k+1}(t).

For the planning tasks like maze navigation and robotic manipulation, the xx-space consists of position and action. Some predefined number of points in the xx-space are sampled randomly at t=0t=0. Pretrained model drives them to assemble a reasonable consecutive positions and corresponding actions - i.e., a "plan". Another difference is that we no longer need the inversion process since we are not editing some existing results in these tasks. It is enough to sample an x0x_0 and fix it. Remaining procedure is identical with that of the image manipulation task.


We hope these additions comprehensively address the reviewer’s concerns.

Comments on the paper

1 comment
Meta-review

The paper proposes guided generation (diffusion or flow matching) to be a safety-critical optimal control problem with a barrier function integrated into the cost functions. The formulation is derived for long term consequences of actions or guidance, which effectively overcome limitations of min-norm controllers or local projection-based corrections.

The paper received mixed initial reviews: borderline accept, borderline reject, and accept. The reviewers appreciate the theoretical grounding, and find the writing clear. However there exist concerns on the validity or theoretical guarantees on proposed approximation in addition to questions on runtime and baselines, which the rebuttal is encouraged to address.

Strength

  • Interesting framework that combines Hamilton-Jacobi-Bellman (HJB) equation, barrier function, and constraints satisfaction to improve guided generation performance.
  • The approximation to HJB makes the framework applicable to different scenarios
  • Interesting experimental results
  • Writing is clear and well-organized

Weakness

  • Explanation on metrics
  • More discussion on the results
  • The work is heavy in theory, but the implementation process can be more clear
  • Theoretical claim is stronger than what is actually established, and the evidence is missing about validity after the proposed approximations
  • Relatively small improvement, and results are presented with relatively old methods
  • Missing clear discussion about limitations

Additional Questions

  • Clarify safety guarantees of the implemented algorithm 1
  • Stronger baseline?
  • Runtime and practical cost-quality tradeoff

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.