TL;DR
Contrastive Reinforcement Learning (CRL) excels at smooth tasks like locomotion but struggles with the abrupt, piecewise dynamics of object manipulation. This paper introduces Interaction-weighted Resampling (IWR), a simple yet principled sampling strategy that biases training data toward critical interaction boundaries (like contact or grasping). IWR significantly boosts sample efficiency and success rates across simulation environments and enables the first real-world, goal-conditioned robot air hockey agent trained entirely from scratch.
What Problem Does This Paper Address?
Goal-conditioned reinforcement learning (GCRL) aims to train generalist robots capable of achieving diverse tasks without manual reward engineering. Contrastive RL (CRL) has emerged as a powerful framework for this, learning a "goal-reaching energy" by treating future states within a trajectory as positive examples and random states as negatives.
While CRL works beautifully for smooth, continuous systems like quadruped locomotion, it frequently falls flat in object manipulation. The authors identify a fundamental structural mismatch: manipulation is inherently piecewise-smooth. When a robot paddle strikes an air hockey puck or a gripper grabs a block, the underlying dynamic mode instantly switches. Standard CRL smooths over these sharp boundaries, failing to accurately model reachability across interaction events and leading to fragile policies that miss or fumble objects.
Methods
To address this, the authors propose Interaction-weighted Resampling (IWR). Instead of uniformly sampling future states from a replay buffer to train the contrastive critic, IWR calculates an interaction weight for each candidate future goal based on its proximity to an interaction threshold (e.g., the contact distance between a gripper and an object).
The interaction weight $w_k$ for a future state at step $t+k$ is defined as: $$w_k = \epsilon + \exp\left(-\frac{\|d_{t+k} - c\|^2}{2\sigma^2}\right)$$
Where:
- $d_{t+k}$ is the distance between the actuated factor (e.g., robot hand) and the target object.
- $c$ is a loose interaction threshold.
- $\sigma$ controls the width of the interaction window.
- $\epsilon$ ensures global coverage is maintained.
This simple modification biases the positive pairs used in the contrastive objective (InfoNCE) toward the critical phases right before, during, and after an interaction. Crucially, IWR changes only the sampling distribution, leaving the core CRL objective and neural architecture untouched, making it plug-and-play with existing algorithms.
Datasets
The method was evaluated across three simulation suites and one real-world physical setup:
- 2D Box2D Manipulation: Five custom continuous-control tasks (Center, Goal, Hard, Hard-Velocity, Maze) where an agent controls a blue ball to move a green ball into a target zone.
- Robotic Manipulation (Meta-World): Four standard manipulation tasks: Push, Pick-Place, Sweep-Into, and Peg-Insert.
- Robot Air Hockey (Simulation): A high-speed environment requiring a paddle to strike a dynamically moving puck into a goal.
- Real-World Robot Air Hockey: A physical setup utilizing a UR5e robotic arm equipped with a 3D-printed paddle on an inclined table to evaluate sim-to-real transfer.
Key Insights and Ideas
- The Error Propagation Trap: The authors mathematically prove that if a contrastive model makes a small error in estimating the "interaction bridge" (the moment of contact), that error compounds exponentially through subsequent passive dynamics. This explains why standard CRL learns fragile energies near contact points.
- Fix the Data, Not the Loss: Instead of designing complex new loss functions or specialized model architectures to handle multi-modal dynamics, simply reshaping the training distribution to over-sample interaction boundaries gives the model the dense supervision it needs to resolve sharp reachability boundaries.
- Locomotion vs. Manipulation Dependency: In locomotion, actions persistently affect the robot's own state. In manipulation, actions affect the robot, but only affect the target object during sparse interaction events, necessitating a switched affine Gaussian model rather than a single-operator linear model.
Key Results
- Simulation Performance: IWR achieved an average 19.8% absolute improvement in success rates across all simulation tasks compared to standard CRL and other competitive baselines.
- Hard Tasks Excel: The gains were most pronounced in sparse-interaction, long-horizon tasks. On Meta-World Pick-Place, IWR improved success rates from 30.5% (CRTR baseline) to 57.0% (an 86.9% relative gain).
- Sim-to-Real Breakthrough: When transferred directly to a physical robot air hockey setup without real-world fine-tuning, IWR achieved a 60% success rate (12/20 goals), vastly outperforming standard CRL (25%) and reward-based baselines like PPO and SAC, which failed completely (0%).
Limitations and Future Work
- Unimodal Representation: While IWR alters sampling to capture interaction boundaries, the underlying CRL architecture still uses a unimodal energy function to represent inherently multimodal manipulation dynamics.
- Heuristic Dependency: The method currently relies on a factorized state space and a heuristic interaction indicator (the distance threshold $c$). Integrating IWR with end-to-end perception systems (e.g., learning interaction boundaries directly from raw pixels) is a critical next step.
- High Sample Cost: Even with IWR, training contrastive RL from scratch requires a high number of environment steps (10M in simulation), meaning it still relies heavily on simulation and robust sim-to-real pipelines rather than direct real-world training.
Summary updated