Robot foundation models increasingly rely on flow-based action generation for general-purpose manipulation, yet the generated actions are not guaranteed to satisfy physical constraints such as joint limits and collision avoidance. This problem is especially challenging when the feasible set cannot be described analytically and is accessible only through black-box feasibility oracles. We study this practical oracle-only setting and propose an oracle-guided differentiable safeguard for safe flow-matching robot policies. The safeguard uses binary feasibility queries to correct unsafe updates in the forward pass, while extracting local boundary information to provide constraint-aware learning signals in the backward pass. Combined with discrete-time flow matching, the same safeguard is used during training and inference, enabling forward--backward aligned policy learning without explicit or differentiable constraint models. Experiments on obstacle-aware robotic manipulation demonstrate 100% constraint satisfaction while preserving task performance.
Figures & tables
Figure 1: Left: Overview of oracle-guided differentiable safeguard. Right: safe discrete-time flow-matching training using the same safeguard.
Figure 2: Snapshots of a rollout using π0.5 + safeguard, subject to collision-avoidance constraints and joint-position limits.
Method
Success Rate ↑
Step Safety Rate ↑
LDLJ ↑
Inference Time (s) ↓
π0.5 (gaussian init)
13/30
78.25%
-22.99
0.071
π0.5 (local init)
0/30
94.12%
-22.55
0.076
π0.5 + safeguard + stop grad
8/30
100 %
-19.32
1.808
π0.5 + safeguard
11/30
100 %
-18.35
1.345
Table 1: Comparison of task success, safety, motion smoothness, and inference efficiency. Best results are shown in bold.