Privileged Knowledge Distillation for Sim-to-Real Policy Generalization

Haoran He, Chenjia Bai, Hang Lai, Lingxiao Wang, Weinan Zhang · OpenReview

Abstract

Reinforcement Learning (RL) has recently achieved remarkable success in robotic control. However, most RL methods operate in simulated environments where privileged knowledge (e.g., dynamics, surroundings, terrains) is readily available. Conversely, in real-world scenarios, robot agents usually rely solely on local states (e.g., proprioceptive feedback of robot joints) to select actions, leading to a significant sim-to-real gap. Existing methods address this gap by either gradually reducing the reliance on privileged knowledge or performing a two-stage policy imitation. However, we argue that these methods are limited in their ability to fully leverage the privileged knowledge, resulting in suboptimal performance. In this paper, we propose a novel single-stage privileged knowledge distillation method called the Historical Information Bottleneck (HIB) to narrow the sim-to-real gap. In particular, HIB learns a privileged knowledge representation from historical trajectories by capturing the underlying changeable dynamic information. Theoretical analysis shows that the learned privileged knowledge representation helps reduce the value discrepancy between the oracle and learned policies. Empirical experiments on both simulated and real-world tasks demonstrate that HIB yields improved generalizability compared to previous methods.

Introduction: The Sim-to-Real Challenge

In reinforcement learning (RL), there is a notorious "sim-to-real gap." In a simulator, we have access to privileged knowledge: the exact mass of an object, the friction coefficient of a floor, or the precise height of every bump on a rug. Real robots, however, only have local states: joint angles, velocities, and accelerometer data.

Existing solutions often use a two-stage "teacher-student" approach: first, a teacher policy learns using privileged info; then, a student policy tries to mimic the teacher using only local sensors. This is computationally expensive and often results in "conservative" policies that don't fully exploit the available data. The Historical Information Bottleneck (HIB) framework addresses this by enabling the robot to "infer" hidden environmental factors directly from its own movement history in a single-stage process.

The HIB Framework

The core idea of HIB is that a robot’s past movements (trajectories) contain clues about the environment. If a robot slips, that "history" contains information about low friction.

The HIB architecture featuring a two-stream setup with TCN encoders and an Information Bottleneck objective.

Key technical components include:

  • Temporal Convolutional Network (TCN): Used to encode a fixed length of historical states and actions into a latent representation $z_t$.
  • Information Bottleneck (IB) Objective: The model is trained to maximize the Mutual Information (MI) between the history-based representation and the actual privileged knowledge while simultaneously minimizing the MI between the raw history and the representation. This forces the model to compress the data, throwing away "noise" and keeping only the essential environmental features.
  • Single-Stage Learning: Unlike traditional methods, HIB trains the policy and the representation encoder simultaneously. The RL objective itself helps guide the history encoder to find task-relevant features.
  • Two-Stream Architecture: To avoid "representation collapse," the system uses an online/target network setup with a cosine similarity loss, ensuring the learned representation remains stable and informative.

Experimental Evaluation

The researchers evaluated HIB across several challenging benchmarks, including the Privileged DMC Benchmark (randomized physical parameters), morphology shifts (changing leg lengths), and complex terrains in Isaac Gym.

Real-World Deployment

The HIB policy was deployed directly onto a Unitree A1 quadruped robot in various outdoor environments, including grass, slopes, and stairs, with zero fine-tuning.

Real-world deployment of the HIB policy on a Unitree A1 robot across various terrains like grass, slopes, and stairs.

Key results include:

  • Superior Generalization: HIB consistently outperformed baselines like RMA (Rapid Motor Adaptation) and DreamWaQ, especially in "far Out-of-Distribution" (OOD) tests.
  • Stair Mastery: In simulation, HIB achieved a 96.7% success rate on stairs. In real-world tests, it successfully navigated high stairs (0.6m) with a 100% success rate over 10 trials, while the strongest baseline failed.
  • Robustness: The robot maintained balance even when a leg was suddenly pulled during a dash, demonstrating the robustness of the learned representation.

Conclusion

HIB demonstrates that framing the sim-to-real gap as an information bottleneck problem allows for high-performance, single-stage reinforcement learning. By compressing historical data into essential environmental features, robots become less sensitive to sensor noise and generalize better to unseen conditions. While currently limited to low-dimensional privileged knowledge, future work aims to scale this approach to handle high-dimensional data like raw RGB images or LIDAR point clouds.

Summary updated

BibTeX
@inproceedings{he2024privileged,
  author = {Haoran He and Chenjia Bai and Hang Lai and Lingxiao Wang and Weinan Zhang},
  title = {{Privileged Knowledge Distillation for Sim-to-Real Policy Generalization}},
  booktitle = {Conference on Robot Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Bq4XOaU4sV},
}
Figure