Generative policies, like those based on diffusion or flow matching, have revolutionized robot learning by capturing complex, multi-modal behaviors. However, these models often struggle with covariate shift—the "drifting" of a robot into unfamiliar states during execution. In a new paper, researchers from Stanford and Honda Research Institute USA introduce GUARD (Guidance Using Anomaly-infoRmed Dense Values), a framework that uses anomaly detection to steer these policies back to safety in real-time.
TL;DR
GUARD improves the robustness of generative robot policies by using anomaly scores from training data as a dense reward signal for a learned Q-function. This Q-function then provides "steering" gradients during inference to nudge the robot toward successful, in-distribution actions, significantly boosting performance in complex dexterous manipulation.
What Problem Does This Paper Address?
While generative policies are powerful, they are notoriously brittle. Small errors in execution can push a robot into states it never saw during training. In contact-rich tasks like dexterous manipulation (e.g., spinning a pen or using a screwdriver), these small deviations quickly lead to catastrophic failure.
Existing solutions usually involve collecting more human data, fine-tuning the policy, or engineering complex reward functions—all of which are expensive and difficult to scale. GUARD addresses this by asking: Can we use the training data we already have to "nudge" the robot back to regions where it knows what it's doing?
Methods
GUARD operates by "steering" the action-generation process (denoising) at test time without changing the underlying pretrained policy.
- Anomaly-Informed Dense Rewards: The authors fit an anomaly detector (using the
logpZOmetric) to the original training demonstrations. This detector assigns a high "anomaly score" to states that are far from the training distribution. - Anticipatory Q-Steering: They train an ensemble of Q-functions to predict future returns. Crucially, the reward function is a combination of the sparse task success signal and the dense anomaly penalty. This allows the Q-function to anticipate risk, identifying actions that might lead to "weird" (and likely failing) states several steps into the future.
- Inference-Time Guidance: During action generation, GUARD uses the gradients of this Q-function to bias the denoising process. It's a "nudge" that pushes the sampled action toward higher predicted success and lower anomaly risk.
- Offline-to-Online Adaptation: The Q-function is first trained on offline data and then refined through online interaction to ensure it accurately evaluates the steered policy's performance.
Datasets
The authors evaluated GUARD on two main fronts:
- Adroit Simulation Benchmark: Four challenging 24-DoF dexterous manipulation tasks: Relocate, Pen, Hammer, and Door.
- Real-World Robot: A 16-DoF Allegro V5 Plus hand performing screwdriver rotation and reorientation tasks.
Key Insights and Ideas
- Anomaly Scores as Supervision: Typically, anomaly detection is used just for monitoring (e.g., "stop the robot, it's confused"). GUARD repurposes this signal as a dense reward to actively guide the robot.
- Preserving the Prior: By steering the denoising process rather than fine-tuning the policy weights, GUARD keeps the rich, multi-modal "knowledge" of the original model while adding a layer of robustness.
- Anticipation is Key: Simply minimizing the current anomaly score is greedy. By propagating the score through a Q-function, the robot learns to avoid trajectories that eventually lead to out-of-distribution states.
Key Results
- Massive Success Gains: In the Adroit simulation, GUARD achieved an average success rate of 96%, outperforming the base behavior cloning (BC) policy by 36 percentage points (pp) and the strongest baseline by 21 pp.
- Robustness to Noise: When dynamics were perturbed with action noise, GUARD maintained an 80% success rate, while other methods' performance plummeted.
- Sim-to-Real Transfer: GUARD demonstrated impressive zero-shot transfer to a real robot. On a screwdriver rotation task, it improved the success rate from 20% to 60% and reduced the "drop rate" from 80% to 25%.
Limitations and Future Work
The primary limitation is the "sim-to-real gap" in contact modeling. In one specific real-world task (palm-up reorientation), GUARD actually performed worse than the baseline. The authors attribute this to the simulation failing to capture certain failure modes (like the screwdriver rotating mid-execution). Because the Q-function never saw these failures in sim, it couldn't learn to steer away from them.
Future work aims to resolve this by training on "mixed buffers" that incorporate real-world interaction data and using wider domain randomization to make the Q-function more aware of hardware-specific quirks.
Summary updated