NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Offline Learning of Counterfactual Perception as Prediction for Real-World Robotic Reinforcement Learning

Jun Jin, Daniel Graves, Cameron Haigh, Jun Luo, Martin JägersandarXiv 2020

TL;DR

This paper introduces a novel approach for training robots in real-world manipulation tasks using offline data. By learning "counterfactual predictions" from visual inputs, the robot can efficiently learn complex skills with only sparse, terminal rewards, significantly improving sample efficiency and enabling more robust learning in challenging scenarios.

What Problem Does This Paper Address?

Training robots for real-world manipulation tasks, especially those involving contact-rich skills (like inserting a peg into a hole), is notoriously difficult. Key challenges include:

  • Sample Inefficiency: Real-world robots require a vast number of interactions to learn, making training time-consuming and expensive.
  • Sparse Rewards: Relying solely on a "success" or "failure" signal at the end of a task provides very little guidance during the learning process.
  • High-Dimensional Data: Processing raw visual input (images) is computationally intensive and requires sophisticated perception pipelines.
  • Practical Constraints: Real-world robots often lack precise instrumentation (like optical trackers) and may need to operate from arbitrary starting poses.

Existing methods often struggle to address all these issues simultaneously, especially when learning from limited, offline data.

Methods

The core of this paper's contribution lies in its offline counterfactual prediction learning framework. Here's a breakdown:

  • General Value Functions (GVFs): The authors leverage GVFs, a generalization of standard value functions, to learn predictions about future outcomes. These GVFs are trained to answer "what if" questions – specifically, what would happen if the robot acted differently from its past experiences.
  • Counterfactual Predictions: Using offline samples (collected from human demonstrations, random exploration, or a mix), the system learns to encode visual inputs into compact, action-oriented predictions. These predictions act as a form of learned "human prior knowledge" about the task.
  • Multi-Temporal Scale Predictions: The GVFs are trained to predict outcomes across various time scales (near and long-term future), providing a richer representation of potential consequences.
  • Offline Learning of Predictions: The counterfactual predictions are learned offline using importance-weighted temporal difference updates to handle the distributional shift between the behavior policy (used for data collection) and the target policy (used for prediction). A discriminator is also trained to estimate the behavior policy.
  • Online Policy Learning with Auxiliary Rewards: During online training, the learned counterfactual predictions are combined with low-dimensional force feedback to form a new state representation. This combined state is then used with an off-the-shelf RL algorithm (like Soft Actor-Critic). Crucially, the counterfactual predictions are used to generate an auxiliary reward signal that guides the robot towards contact-rich states, effectively providing more frequent and informative guidance than just the terminal reward.

Datasets

  • Offline Samples: The paper utilizes offline samples collected from various sources, including human demonstrations, random actions, and a position-based visual servoing controller. These samples are used to train the counterfactual prediction model.
  • No New Benchmarks: The paper does not introduce new datasets but evaluates its method on a standard peg-in-hole task in both simulation and a real-world robotic setup.

Key Insights and Ideas

  • Perception as Prediction: The paper strongly advocates for the idea that intelligent agents don't just perceive the world but actively predict it. This predictive capability, learned from past experiences, is key to efficient learning.
  • Counterfactuals as a Compact Representation: Learning "what if" scenarios from visual data provides a powerful, compact, and informative state representation that is more useful than raw pixels or simple feature extraction.
  • Auxiliary Rewards from Predictions: The learned counterfactual predictions can be transformed into effective auxiliary rewards, guiding exploration towards critical states (like contact points) that are essential for tasks with sparse terminal rewards.
  • Bridging Offline and Online Learning: The proposed method effectively bridges the gap between offline data collection (which is easier and safer) and online learning (which is necessary for fine-tuning and adaptation), creating a practical pipeline for real-world RL.
  • Force Feedback Integration: Combining visual predictions with proprioceptive force feedback significantly enhances learning performance, highlighting the importance of multimodal sensing.

Key Results

  • Simulation:
    • Counterfactual predictions as a state representation significantly outperformed baseline methods (reward classifier, pose regression, end-to-end) in terms of success rate.
  • The auxiliary reward derived from counterfactual predictions was competitive with a fine-tuned oracle reward and significantly better than a VICE reward or a simple terminal reward.
  • Combining counterfactual predictions with force feedback improved learning performance compared to using predictions alone.
  • Real-World Robot:
    • The entire training process (offline and online) for a peg-in-hole task took approximately 13.2 hours (4.5 hours offline, 8.7 hours online).
  • The learned policy demonstrated robustness to variations in grasping pose and even slight displacements of the target slot.
  • The robot learned force-sensitive probing behaviors, allowing it to adapt to unexpected movements of the slot.

Limitations and Future Work

  • Hand-Crafted Cumulants: The current implementation relies on hand-crafted cumulants (defining the GVF-questions), specifically related to relative pose. The authors acknowledge that generalizing this method without such hand-crafted components would be a significant advancement.
  • Automatic Knowledge Discovery: Future work could explore automatic knowledge discovery from data to learn more meaningful representations and cumulants for GVFs, moving beyond pre-defined task-specific signals.
  • Generalization: While the method shows promise, further research is needed to explore its generalization capabilities to a wider range of robotic manipulation tasks and environments.

Summary updated

BibTeX
@misc{jin2020offline,
  author = {Jun Jin and Daniel Graves and Cameron Haigh and Jun Luo and Martin Jägersand},
  title = {{Offline Learning of Counterfactual Perception as Prediction for Real-World Robotic Reinforcement Learning}},
  year = {2020},
  eprint = {2011.05857},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.05857},
}
Figure