SafeDec: Constrained Decoding for Safe Autoregressive Generalist Robot Navigation Policies
Abstract
Recent advances in end-to-end, multi-task robot policies based on transformer models have demonstrated impressive generalization to real-world embodied navigation tasks. Trained on vast datasets of simulated and real-world trajectories, these policies map multimodal observations directly to action sequences for physical execution. Despite promising real-world capabilities, these models are still data-driven and, therefore, lack explicit notions of behavioral correctness. We address this gap by introducing SafeDec, a constrained decoding framework for autoregressive, transformer-based robot navigation policies that enforces safety specifications expressed as Signal Temporal Logic (STL) formulas. Our method ensures that generated actions provably satisfy STL specifications under assumed dynamics at runtime without retraining while remaining agnostic of the underlying policy. We evaluate SafeDec on tasks from the CHORES benchmark for state-of-the-art embodied navigation policies across hundreds of procedurally generated environments and show that our decoding-time interventions are useful not only for filtering unsafe actions but also for conditional action generation. Videos are available at constrained-robot-fms.github.io.
Lay Summary
Robots that use modern AI models are becoming increasingly capable of following language instructions and navigating complex environments. However, these models are usually trained from data and may not always follow explicit safety rules, such as avoiding restricted areas, staying within allowed zones, or respecting ordering constraints during a task. This is a problem for deploying robots in real homes, workplaces, and public spaces. This paper introduces SafeDec, a method for making robot navigation policies follow user-specified safety rules at runtime, without retraining the robot’s AI model. Instead of changing the model itself, SafeDec changes how the model chooses its next action. When the robot considers possible actions, SafeDec checks whether each action would lead toward violating a safety rule and either blocks unsafe actions or makes safer actions more likely. We test SafeDec on several robot navigation models in simulated indoor environments. The results show that SafeDec substantially improves safety-rule satisfaction across different models and tasks. A strict version of the method can enforce safety very reliably but may sometimes reduce task success, while a softer version provides a better balance between safety and completing the task. Overall, SafeDec shows that safety rules can be added to powerful pretrained robot policies at inference time, making them more adaptable and safer to use without expensive retraining.