Manuscript Offprint

arXiv:2610.40075

Learning Safe Flow Matching Robot Policies from Binary Feasibility Oracles

Jianming Ma, Rongjun Jin, Yizhi Chen, Yue Gao

Jianming Ma

Shanghai Jiao Tong University

Yizhi Chen

Tongji University

Rongjun Jin

Shanghai Jiao Tong University

Yue Gao

Shanghai Jiao Tong University

Abstract: 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.

Keywords: safe robot learning, flow matching, feasibility oracle

1 Introduction

Robot foundation models, including vision-language-action (VLA) models [1, 2] and world-action models (WAMs) [3, 4], increasingly combine pretrained vision-language or video-generation backbones with flow-based action generation for general-purpose robot control. However, strong task generalization does not guarantee safe physical interaction: generated actions must also satisfy constraints such as joint limits and collision avoidance. Enforcing such scene-dependent constraints remains a key challenge for deploying flow-based robot policies.

Existing methods either correct generated actions only at inference time or incorporate constraint enforcement into training. Inference-time correction, e.g., through control barrier functions [5, 6, 7, 8], or trajectory-wise constraint guidance [9, 10], can be applied to pretrained policies but introduces a train–test mismatch. Training-aware approaches reduce this mismatch [11, 12, 13], but typically require explicit constraint functions, differentiable constraint models, or known feasible-set geometry. Such information is often difficult to obtain in robotics. For example, in robotic arm obstacle avoidance, a collision checker can readily determine whether a candidate configuration is feasible, while an analytical description of the corresponding collision-free configuration space may be unavailable.

This motivates an oracle-only setting, where safety is accessible solely through a binary feasibility oracle. We ask: how can a flow-matching robot policy enforce constraints and learn from them when only binary feasibility queries are available? To address this problem, we propose an oracle-guided differentiable safeguard. In the forward pass, the safeguard uses oracle queries to restrict each predicted update to the feasible region. In the backward pass, it extracts local boundary information from nearby binary queries and uses it to construct a boundary-aware surrogate gradient. Thus, the same oracle supports both feasibility enforcement and constraint-aware policy learning, without requiring an explicit or differentiable constraint model.

We integrate the safeguard with discrete-time flow matching, allowing the same correction mechanism to be used during both training and inference. This yields a forward–backward aligned learning framework in which the policy is optimized under the safety intervention encountered at deployment.

Our contributions are summarized as follows:

• We formulate safe flow-matching robot policy learning under an oracle-only constraint interface, removing the need for explicit or differentiable constraint models.

• We introduce an oracle-guided differentiable safeguard that combines oracle-based forward feasibility correction with boundary-aware surrogate gradients, enabling forward–backward aligned policy learning.

• We validate the proposed approach on an obstacle-aware robotic manipulation task, demonstrating strong constraint satisfaction while maintaining task performance.

References (19)