Policy Contrastive Decoding for Robotic Foundation Models

Shihan Wu, Xu Luo, Ji Zhang, Junlin Xie, Jingkuan Song, Heng Tao Shen, Lianli Gao

TL;DR

Policy Contrastive Decoding (PCD) is a training-free, plug-and-play method designed to prevent robotic foundation models from being distracted by irrelevant background elements and lighting changes. By contrasting the action predictions of an original image with those of an image where the target object is masked out, PCD effectively "subtracts" spurious correlations. This approach leads to massive performance gains, including a 108% success rate increase for state-of-the-art models in real-world tasks.

What Problem Does This Paper Address?

Generalist robot policies—often referred to as Robotic Foundation Models—are trained on massive datasets to perform diverse manipulation tasks. However, these models frequently become "lazy" learners. Instead of focusing on the actual object they are supposed to manipulate, they often rely on spurious correlations: task-irrelevant features like background textures, drawer handles, or specific lighting conditions.

Visualizing spurious correlations: The model's attention (d) drifts to irrelevant features like table edges or drawer handles, causing performance drops (a-c) that PCD helps recover.

When these models are deployed in new, out-of-distribution environments, these learned shortcuts fail. For example, simply shifting the lighting in a simulation can cause a 36% drop in the success rate for models like OpenVLA. The core challenge this paper tackles is: How do we force a pre-trained, "black-box" model to ignore the background and focus on the target object without expensive retraining or fine-tuning?

Methods

The authors introduce Policy Contrastive Decoding (PCD). The core intuition is inspired by "Visual Contrastive Decoding" used in Large Language Models: to isolate the decision-making process that is truly about the object, you compare the model's output when the object is present versus when it is hidden.

The method consists of three main components:

  1. Policy Contrastive Decoding (PCD): The system calculates a new "rectified" action distribution by contrasting the probability of an action given the original image ($o_i$) against the probability given an object-masked image ($\hat{o}_i$). This amplifies the influence of object-relevant features and suppresses background noise.
  2. Track2Mask: To automate the masking process during a robot's trajectory, the authors use Grounding DINO for initial object detection and SAM2 to track and segment the object across frames. The segmented object is then "inpainted" (filled in with background pixels) to create the masked observation.
  3. KDE-based Probabilistic Modeling (KDE-PM): Autoregressive models naturally output probability distributions, but diffusion-based models (like Octo or $\pi_0$) output discrete samples. To make PCD compatible with diffusion models, the authors use Kernel Density Estimation (KDE) to approximate a continuous probability distribution from a set of candidate action samples.

Datasets and Evaluation

The researchers evaluated PCD across 15 diverse manipulation tasks using three major open-source robot policies:

  • SIMPLER: A simulated environment designed to mimic real-world robot performance. They tested 9 tasks (e.g., "Pick Coke Can," "Open Drawer") using Google Robot and WidowX arm setups.
  • Real-World Benchmark: 6 custom manipulation tasks (e.g., "Pick Ball," "Cookies Towel") using an AGILEX PIPER 6DOF robot arm.
  • LIBERO-90: A standard robot manipulation benchmark used to test multi-perspective scenarios involving third-person and wrist cameras.

Key Insights

  • The "Subtraction" Logic: PCD works because it treats the masked image as a baseline for "what the model would do if it only looked at the background." By contrasting this with the original prediction, the background-driven logic is filtered out.
  • Training-Free Generalization: Most methods for fixing spurious correlations require adversarial training or massive data augmentation. PCD operates entirely at inference time, meaning it can be applied to any existing model without seeing a single new training example.
  • Diffusion Compatibility: Using KDE to turn a "black-box" diffusion sampler into a differentiable probability distribution is a clever bridge. It allows contrastive techniques to work on the latest generation of flow-matching and diffusion policies.
  • Robustness to Imperfect Masks: The authors found that PCD is relatively insensitive to the specific inpainting method used (e.g., Telea vs. LaMa), suggesting the contrastive signal remains robust even if the "masked" image isn't perfectly seamless.

Key Results

PCD consistently improved every model it was tested on, often by dramatic margins:

  • OpenVLA: Improved success rates by 50.6% in simulation.
  • Octo: Improved success rates by 29.7% in simulation.
  • $\pi_0$ (State-of-the-Art): While $\pi_0$ is already a highly capable model, PCD boosted its performance by 8.9% in simulation and a staggering 108% in real-world environments.
  • Generalization: In "unseen" scenarios where backgrounds or object positions were intentionally altered to trigger failures, PCD-equipped models often outperformed the baseline's original training performance.

Limitations and Future Work

  • Computational Overhead: PCD requires a second forward pass for the masked image and, for diffusion models, the KDE-PM process. This roughly doubles the inference latency (e.g., increasing from 0.86s to 1.77s per step for OpenVLA).
  • Reliance on Segmentation: If the initial object detection (Grounding DINO) or tracking (SAM2) fails, PCD's performance reverts to the baseline. The system is fundamentally bottlenecked by its ability to identify the target object.
  • Inference-Only Fix: While PCD fixes the symptoms of spurious correlation during testing, it doesn't prevent the model from learning them during training. Future work could explore how to integrate these contrastive signals directly into the pre-training phase.

Summary updated

BibTeX
@inproceedings{wu2026policy,
  author = {Shihan Wu and Xu Luo and Ji Zhang and Junlin Xie and Jingkuan Song and Heng Tao Shen and Lianli Gao},
  title = {{Policy Contrastive Decoding for Robotic Foundation Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=P9PVdWyM3U},
}
Figure