Viyan

Viyan AI

Hard Constraints for Robot Policies

ActSafeGuard integrates physical constraints directly into flow-matching training to ensure robot actions remain within valid bounds.

ActSafeGuard integrates physical constraints directly into the training of robot policies by embedding a differentiable ray-scaling operator into flow-matching architectures. Vision-Language-Action models often treat safety as an external check, using post-hoc filters to block commands that exceed hardware limits. This creates a disconnect between policy learning and physical reality. ActSafeGuard eliminates this by forcing the policy to learn exclusively within the bounds of physically permissible actions.

Flow-matching models are suited for this because they learn a continuous vector field, describing how to reach a target state through a smooth, time-dependent trajectory. This makes it possible to define a geometric constraint surface that the vector field is projected against during training. This surface is typically derived from known environment representations, such as a URDF or a point-cloud map, which the model uses to identify collision zones.

Feature Conventional Inference Safeguards ActSafeGuard
Enforcement Timing Post-hoc Integrated
Constraint Type Soft/Statistical Hard/Deterministic
Policy Alignment Mismatched Fully Aligned
Impact on Success Rate Often degrades Preserved or Boosted

Mechanically, the ray-scaling operator modifies the vector field during each training step. If the predicted velocity vector points toward a forbidden state, the operator calculates the intersection between the trajectory ray and the boundary. It performs a dot product calculation between the velocity vector and the normal vector of the constraint surface at that intersection point. To prevent overshoot, the operator scales the velocity vector length—shortening it toward zero as it nears the boundary—and subtracts the component pointing into the forbidden region. This projects the vector onto the tangent plane of the constraint surface. Because the operator is differentiable, the projection remains within the computation graph.

During backpropagation, the chain rule flows through this operator, using the Jacobian of the projection function to map the penalty for attempting an invalid move back to the policy weights. This changes the training objective: the model is no longer penalized only for failing to reach a goal; it is also penalized for attempting to move through a forbidden zone. The gradient is diverted along the tangent of the surface, forcing the policy to find alternative, valid velocities that stay within the permitted manifold. This mechanism guides the model to refine its vector field in subsequent steps, favoring paths that naturally skirt obstacles rather than colliding with them.

Consider a robot arm navigating a narrow doorway. Without ActSafeGuard, a model might predict a motion that collides with the door frame, requiring a filter to block the command at inference time. With ActSafeGuard, the training process identifies the collision risk during the learning phase. The vector field is reshaped so that all paths within the high-probability region of the flow point safely through the center of the opening. The precision of this enforcement relies on the accuracy of the boundary definitions provided to the model. If the internal representation of the workspace is imprecise, the hard enforcement will reflect that error, potentially resulting in overly conservative behavior. It remains to be seen how well this approach scales to highly dynamic, unmodeled environments where the constraint surfaces must be estimated in real-time by the robot's vision sensors rather than being pre-computed.