Text-conditioned motion generators can produce trackable whole-body movement, but they lack an understanding of scene-dependent safety: the same action may be harmless in one context and dangerous when aimed at a person or object. Existing safeguards typically inspect the prompt, require labeled motion data, or enforce geometric constraints, so they do not directly account for how scene context changes a motion's meaning.
The authors propose contextual safety filtering (CSF), a training-free filter that grounds natural-language safety rules in safe and unsafe reference trajectories generated by the motion generator itself. For each active rule, those reference trajectories define an affine safety value that a safe reference tracking CBF-QP enforces. This allows the filter to adapt to scene context without retraining or additional labeled data.
In experiments across four pretrained generators with different architectures, CSF activated the intended rules in all explicit and scene-triggered unsafe cases. It reduced the danger-event rate by up to 90% while preserving 88–100% of benign motions. The complete system was also demonstrated on a real Unitree G1 robot, where it prevented unsafe motions in scenarios involving interactions with humans and objects.