ICLR 2026
Overview of SafeFlowMatcher versus existing certification-based methods. Directly constraining intermediate samples during generation (top) can cause paths to be distorted or trapped, whereas SafeFlowMatcher (bottom) decouples generation and certification via a prediction–correction integrator, producing a complete and certified-safe path.
Problem. Flow matching (FM) planners generate high-quality paths in very few ODE steps, but provide no formal safety guarantees and can produce incomplete paths near constraints.
Method. SafeFlowMatcher couples FM with control barrier functions (CBFs) via a two-phase prediction–correction integrator:
(i) Predict — run the learned FM one or a few steps to get a candidate path;
(ii) Correct — refine the path using a vanishing time-scaled vector field and a CBF quadratic program that applies the minimum perturbation needed to restore safety.
Key insight. Safety is enforced only on the executed path, not on every intermediate latent sample — eliminating distributional drift and local trap problems that affect prior methods.
Results. SafeFlowMatcher produces faster, smoother, and safer paths than diffusion- and FM-based baselines across maze navigation, locomotion, and robot manipulation tasks. We also prove a barrier certificate guaranteeing forward invariance of a robust safe set and finite-time convergence to safety.
Existing generative planners either ignore safety constraints entirely, producing paths that violate them, or enforce safety on every intermediate sample during generation, causing local traps—paths to get stuck near constraints.
Diffuser
Diffuser w/ CFG
SafeDiffuser
SafeFlowMatcher (Ours)
Maze2D Navigation. Diffuser produces unsafe paths; Diffuser w/ CFG and SafeDiffuser get trapped or yield incomplete paths near constraints; SafeFlowMatcher generates complete, certified-safe paths.
SafeFlowMatcher decouples generation from safety certification via a two-phase Prediction–Correction (PC) integrator. The prediction phase runs the learned FM dynamics freely to produce a candidate path; the correction phase then applies a vanishing time-scaled vector field with a CBF-QP that minimally adjusts velocities to enforce safety.
Noise Path
$\tau_0^p \sim \mathcal{N}(0,I)$
Candidate Path
$\tau_1^p = \Psi_{0\to1}^{(T^p)}(\tau_0^p)$
Integrate the nominal FM vector field $v_t(\tau_t;\theta)$ from noise for $T^p = 1$ step (or a few). This yields a candidate path $\tau_1^p$ close to the target distribution.
Correcting
VTFD + CBF-QP
Final Path
$\tau_1^c \approx \tau_1^\star$
Refine the candidate path using vanishing time-scaled flow dynamics (VTFD), $\alpha(1-t)v_t {+} \Delta u_t$, where $\Delta u_t$ is solved by a CBF-QP that applies the minimum perturbation needed to keep each waypoint in the safe set over $T^c = 256$ steps.
Guarantee. The correction phase provably maintains forward invariance of a safe set and drives any unsafe waypoints back to safety in finite time without imposing constraints on intermediate latent samples, which avoids distributional drift and local traps.
We evaluate SafeFlowMatcher on the Maze2D navigation benchmark against diffusion- and FM-based baselines. SafeFlowMatcher achieves the highest task score with zero trap rate, while all safety constraints (BS ≥ 0) are satisfied.
| Method | BS1 (≥0) | BS2 (≥0) | Score ↑ | Time (ms) | Trap Rate ↓ |
|---|---|---|---|---|---|
| Diffuser | -0.825 | -0.784 | 1.572±0.288 | 3.70 | 0% |
| RES-SafeDiffuser | 0.010 | 0.010 | 1.442±0.451 | 4.72 | 72% |
| TVS-SafeDiffuser | -0.003 | -0.003 | 1.506±0.405 | 4.78 | 69% |
| TVS-SafeDDIM ($\eta$=1.0) | -0.026 | -0.026 | 1.549±0.304 | 4.74 | 65% |
| RES-SafeFM | 0.010 | 0.010 | 1.401±0.429 | 4.74 | 12% |
| SafeFlowMatcher (Ours) | 0.010 | 0.010 | 1.632±0.003 | 4.71 | 0% |
SafeFlowMatcher achieves the highest score with zero trap rate and guaranteed safety (BS ≥ 0), evaluated over 100 independent trials.
Comparison of path generation processes. (Top) RES-SafeDiffuser initializes samples all over the maze and converges to a path with local traps. (Bottom) SafeFlowMatcher (ours) initializes from near the target path after the prediction phase, and converges to a higher-quality path with no local traps.
SafeFlowMatcher generalizes to high-dimensional robotic tasks beyond navigation. On locomotion and manipulation benchmarks, it consistently achieves higher task scores than diffusion- and FM-based baselines while maintaining certified safety.
| Category | Environment | Method | Score ↑ | BS (≥0) |
|---|---|---|---|---|
| Locomotion | Walker2D | SafeDiffuser | 0.283±0.135 | Yes |
| SafeFM | 0.264±0.127 | Yes | ||
| SafeFlowMatcher (Ours) | 0.331±0.021 | Yes | ||
| Hopper | SafeDiffuser | 0.435±0.068 | Yes | |
| SafeFM | 0.675±0.312 | Yes | ||
| SafeFlowMatcher (Ours) | 0.917±0.026 | Yes | ||
| Robot Manipulation | Block Stacking | SafeDiffuser | 0.72±0.055 | Yes |
| SafeFM | 0.73±0.056 | Yes | ||
| SafeFlowMatcher (Ours) | 0.76±0.053 | Yes |
Performance on high-dimensional robotic tasks. SafeFlowMatcher maintains its advantages in both locomotion and robot manipulation settings.
Locomotion (Hopper)
Kuka Manipulation
@inproceedings{
yang2026safeflowmatcher,
title={SafeFlowMatcher: Safe and Fast Planning using Flow Matching with Control Barrier Functions},
author={Jeongyong Yang and Seunghwan Jang and SooJean Han},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=refcXHU1Nh}
}
The diffusion model implementation is based on Diffuser by Michael Janner. The safe diffusion implementation is based on SafeDiffuser by Wei Xiao.