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.