We introduce Latent Barrier Steering (LBS), a hierarchical semantic-to-path framework for safe flow-matching-based generative planning. Existing control-barrier-function (CBF) safety filters for diffusion and flow-matching planners act locally on generated samples, either during sampling or after prediction. Such repair is effective for small violations, but can struggle when a new constraint blocks the whole selected behavior mode rather than merely perturbing it locally. LBS decouples behavior selection from path certification through two coordinated interventions: it first steers the generator's behavior latent toward rollouts with larger safety margin, then decodes the steered latent and applies a path-space CBF quadratic program (QP) only for residual violations. We show that latent steering increases the margin available to the path-space corrector, yielding finite-time recovery guarantees and reduced correction burden. Experiments across navigation and robot end-effector planning tasks show that LBS preserves safety while improving goal reaching and reducing correction burden compared with path-level safety filters.
Figures & tables
Figure 1: Latent Barrier Steering separates behavior selection from path repair. A vanilla flow-matching planner may generate a goal-reaching but unsafe rollout under a new constraint. A path-space CBF corrector such as SafeFlowMatcher can enforce safety locally, but may produce a trajectory that is safe while no longer reaching the goal when the selected behavior mode is blocked. LBS first steers the behavior latent from z0 to z+ toward a safer rollout, then applies path-level CBF repair only for residual violations, yielding a trajectory that is both safe and goal-reaching.
Figure 2: Experimental domains and test-time safety constraints. Each row shows one planning domain: 2D point-navigation, Maze2D, and Franka 3D end-effector planning. The first column visualizes the original scene and multimodal demonstration dataset, where multiple behaviors can reach the same goal. The remaining columns show three test-time safety constraints imposed on the same pretrained planner. Green circles denote starts, orange stars denote goals, and red shaded regions denote unsafe sets. These constraints test whether a method can preserve safety and goal reaching when certification requires more than local path repair.
2D
Franka
Maze2D
Constraint
Method
Safety ↑
Reach ↑
Energy ↓
Safety ↑
Reach ↑
Energy ↓
Safety ↑
Reach ↑
Energy ↓
I
Vanilla FM
12%
100%
–
12%
100%
–
0%
50%
–
SafeDiffuser
100%
10%
1.226
100%
0%
0.0023
100%
0%
0.0288
SafeFlow
100%
18%
1.077
100%
16%
0.0020
100%
0%
0.1208
SafeFlowMatcher
100%
18%
1.166
100%
14%
0.0075
100%
0%
0.2668
Full LBS
100%
100%
0.037
100%
100%
0.0004
100%
95%
0.010
Table 1: Performance comparison across domains and test-time safety constraints. Each domain uses the same pretrained flow-matching planner across methods. Final goal distance, curvature smoothness, and runtime are reported in Appendix I .
Figure 3: Latent steering provides the warm start needed for path-space repair. Stage I performs behavior-level selection by steering the latent and changing the decoded rollout before certification; Stage II then applies path-level CBF repair to remove residual violations. The second row removes Stage I and applies the same path-space correction directly, corresponding to SafeFlowMatcher . Without the latent-steered warm start, the local corrector remains tied to the original rollout and fails to produce a goal-reaching safe path. With Stage I, the corrected trajectory starts from a better behavior and Stage II only needs to repair the remaining local violation.
2D
Franka
Maze2D
Method
Safety ↑
Reach ↑
Safety ↑
Reach ↑
Safety ↑
Reach ↑
Stage II only ( SafeFlowMatcher )
100%
4%
100%
0%
100%
53%
Stage I only
10%
100%
10%
100%
20%
95%
BoN-1 + Stage II
100%
0%
100%
0%
100%
0%
BoN-4 + Stage II
100%
0%
100%
0%
90%
48%
BoN-16 + Stage II
100%
0%
100%
32%
100%
5%
Table 2: Alternatives to Stage I (Constraint III). All methods share the pretrained generator, the safety margin mβ , and the Stage-II corrector.
Domain
Initial → terminal mβ
∥∇mβ∥2
Clip frequency
Terminal mβ<0
2D
−1.03→−0.08
0.46
100%
90%
Franka
−0.21→−0.006
0.09
8%
84%
Maze2D
−0.63→−0.11
0.18
22%
88%
Table 3: Stage-I diagnostics for Constraint III in each domain. Initial → terminal mβ : median buffered latent margin before and after Stage I. ∥∇mβ∥2 : median norm of the estimated pulled-back gradient along the Stage-I iterates. Clip frequency : fraction of episodes in which the projection onto Ω activates at least once. Terminal mβ<0 : fraction of episodes whose buffered margin is still negative when Stage I hands off to Stage II.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
2D point-nav
Franka 3D EE
Maze2D
Hidden width
128
128
128
Latent dim dz
2
4
4
Optimizer
AdamW
AdamW
AdamW
Learning rate
10−4
10−4
10−4
Weight decay
10−5
10−5
10−5
LR schedule
cosine
cosine
cosine
Appendix
Table 4: Encoder hyperparameters.
2D point-nav
Franka 3D EE
Maze2D
Hidden width
256
256
768
Residual blocks
4
4
20
z -projection width
32
32
128
Start/goal conditioning dim
—
—
8
FM Euler steps
50
50
50
Optimizer
Adam
Adam
Adam
Appendix
Table 5: Generator hyperparameters for the flow-matching backbone. Maze2D uses a wider/deeper backbone because of its longer horizon and start–goal conditioning. Sampling uses the listed number of explicit-Euler integration steps.
Domain
Constraint
Method
Safety ↑
Reach ↑
ED ↓
Energy ↓
CS ↓
T-I (s) ↓
T-II (s) ↓
2D
I
Vanilla FM
12%
100%
0.21
–
0.88
–
0.09
SafeDiffuser
100%
10%
6.38
1.226
1.56
–
0.11
SafeFlow
100%
18%
5.57
1.077
1.42
–
0.10
SafeFlowMatcher
100%
18%
5.61
1.166
1.56
–
0.10
Full LBS
100%
100%
0.23
0.037
0.87
0.35
0.10
II
Vanilla FM
0%
100%
0.21
–
0.88
–
0.09
Appendix
Table 6: Full performance comparison across all test-time safety constraints. Best per-column value within each constraint block is bolded; ties and values within 10% of the per-column optimum are also bolded. Stage-I and Stage-II runtimes are not bolded. Constraints I, II, III correspond to mode selection, mode interpolation, and residual correction, respectively.
Safe motion planning develops methods for robots and vehicles to reach goals while avoiding collisions and respecting dynamic and uncertainty constraints.
Generative planners based on diffusion/flow matching can learn to synthesize long-horizon trajectories from demonstrations. However, real-world deployment requires (i) enforcing safety constraints during execution and (ii) tight online replanning at fast execution rates. Prior safe diffusion/flow planners generate the agent's full trajectory at once, while repeatedly perturbing intermediate states to satisfy safety constraints. This approach is not only computationally intensive, but also introduces distribution shift since the learned sampling dynamics is distinct from the system's execution dynamics. We propose SafeStreamingFlow, a goal-conditioned planner that aligns flow sampling dynamics with execution dynamics by sequentially integrating a learned state vector field with hierarchical state prediction. Importantly, we need to enforce safety constraints only for the executed step via high order control barrier functions. Across navigation, racing, and locomotion benchmarks, SafeStreamingFlow reduces planning latency and improves safety compared to existing methods, while maintaining competitive goal-reaching success.
Seunghwan Jang, Jeongyong Yang, Siddharth Ancha +1
Nanyang Technological University Singapore · KAIST Daejeon, Republic of Korea · University of Washington Seattle, WA, USA +1
Latent-space path planning (LSPP) compresses the configuration space of a robotic manipulator into a compact, differentiable manifold learned by a variational autoencoder, enabling fast gradient-based planning without explicit inverse kinematics. Existing LSPP frameworks enforce obstacle avoidance with a binary collision classifier, whose saturated gradients near obstacle boundaries and lack of temporal structure cause the optimizer to stall and provide no forward-invariance guarantee. We replace the classifier with a neural control barrier function (CBF) learned directly in the latent space. The barrier is trained with a three-term objective that combines safe and unsafe sign constraints with a discrete-time decrease condition evaluated on transitions of an obstacle-blind nominal planner, and it is enforced at planning time by a closed-form, first-order correction that projects each goal-directed latent step back onto the CBF constraint. On a 7-DoF Franka Panda manipulator, the CBF planner achieves a 75.6% success rate on a fixed-obstacle task, 12.0 percentage points above the best of 35 tuned classifier configurations, and 83.8% on a multi-position task. A sweep of the decay rate α characterizes the safety--performance trade-off, with the best operating points in α∈[0.10,0.20]. In a fully general random-obstacle setting, success drops to 33.0%, which we trace to covariate shift between the obstacle-blind training transitions and the states visited by the corrected planner.
Chandrakiran Ravula, Siddhanth Ramesh
Indian Institute of Science (IISc), Bengaluru, India
Flow-based generative models, such as diffusion models and flow matching models, have achieved remarkable success in learning complex data distributions. However, a critical gap remains for their deployment in safety-critical domains: the lack of formal guarantees that generated samples will satisfy hard constraints. We propose a safety filtering framework that acts as an online shield for any pre-trained generative model. Our key insight is to cooperate with the generative process rather than override it. We define a constricting safety tube that is relaxed at the initial noise distribution and progressively tightens to the target safe set at the final data distribution, mirroring the coarse-to-fine structure of the generative process itself. By characterizing this tube via Control Barrier Functions (CBFs), we synthesize a feedback control input through a convex Quadratic Program (QP) at each sampling step. As the tube is loosest when noise is high and intervention is cheapest in terms of control energy, most constraint enforcement occurs when it least disrupts the model's learned structure. We prove that this mechanism guarantees safe sampling in discrete-time. The minimum-norm control synthesized at each step minimizes the per-step contribution to the KL divergence between the safe and original distributions. Across all experiments, we observe 100% constraint satisfaction. Our framework applies to any pre-trained flow-based sampling scheme requiring no retraining or architectural modifications. We validate the approach across constrained image generation, physically-consistent trajectory sampling, and safe robotic manipulation policies, achieving 100% constraint satisfaction while preserving semantic fidelity.
Darshan Gadginmath, Ahmed Allibhoy, Fabio Pasqualetti
Mitsubishi Electric Research Laboratories Cambridge, Massachusetts · Electrical Engineering and Computer Science University of California, Irvine