Dual Action Policy for Robust Sim-to-Real Reinforcement Learning

Wen Zheng Terence Ng, Jianda ChenICANN 2024

Introduction

Training reinforcement learning (RL) agents in simulation offers a safe and high-throughput environment for developing complex robotic behaviors. However, the transition from simulation to the physical world is often hindered by the "Sim-to-Real" gap. This gap is primarily driven by dynamics mismatch—subtle differences in physical properties such as friction, mass, or joint damping that cause a policy optimized in a simulator (the source domain) to fail when deployed in the real world (the target domain).

The Limitations of Current Domain Adaptation

Recent attempts to bridge this gap, such as Domain Adaptation with Rewards from Classifiers (DARC), utilize domain classifiers to adjust the agent's reward. These methods penalize the agent for taking actions that appear more likely to occur in the simulator than in the real world. Despite their promise, these approaches face two critical challenges:

  1. Action Set Constraint: Standard methods use a single action to both maximize task rewards and satisfy the domain adaptation penalty. This creates a difficult optimization conflict where the agent must balance two potentially opposing objectives with a single output.
  2. Classifier Over-optimism: Domain classifiers are prone to epistemic uncertainty. If a classifier incorrectly predicts that a specific state-action pair is highly likely in the target domain, the agent may become "over-optimistic," pursuing these transitions and ultimately failing during real-world deployment.

The Dual Action Policy (DAP) Framework

To overcome these hurdles, this paper introduces the Dual Action Policy (DAP). The core innovation lies in decoupling the action selection process. Instead of a single action, the DAP policy simultaneously predicts two:

  • $a^{src}$: This action is used for sampling within the simulator to maximize standard task rewards.
  • $a^{tgt}$: This action is used specifically to calculate the reward adjustment for domain adaptation.

By decoupling these actions, the agent can optimize for the task while separately adjusting for physics differences. To maintain physical feasibility, a regularization term ($\lambda$) is applied to ensure that $a^{src}$ and $a^{tgt}$ do not drift too far apart. This approach acts as an optimization relaxation, allowing gradient descent to find more effective local optima for bridging the sim-to-real gap.

Enhancing Robustness via Uncertainty

To address the issue of classifier errors, the authors propose Uncertainty-based Robust Action Resampling. The system utilizes an ensemble of domain classifiers to measure disagreement (standard deviation) regarding specific transitions. High disagreement indicates high epistemic uncertainty.

During training, the agent’s action is resampled or "perturbed" with a magnitude proportional to this uncertainty. This mechanism forces the agent to explore more robustly in areas where the dynamics model is unreliable, preventing it from relying on "lucky" but inaccurate simulator shortcuts that would not translate to the real world.

Experimental Evaluation

The researchers evaluated DAP using the MuJoCo physics simulator, focusing on four standard robotic benchmarks: Ant, Half-Cheetah, Hopper, and Walker2d. To simulate the sim-to-real gap, they created "mismatched" environments by altering physical properties like foot length, torso size, and mass.

The training utilized a small offline dataset of only 20,000 samples (approximately 20-40 minutes of data) from the target environment to train the classifiers, representing a realistic scenario where real-world data is scarce.

Key Results and Insights

  • Performance Gains: DAP significantly outperformed existing baselines, including DARC, H2O, and GARAT. In several benchmarks, DAP achieved double the return of the next best baseline.
  • Closing the Gap: When combined with uncertainty estimation (DAP+U), the performance on tasks like Hopper and Walker2d nearly matched the "Oracle"—an agent trained directly in the target environment with unlimited data.
  • Data Efficiency: The method proved highly robust, remaining effective even when the target offline dataset was reduced to just 1,000 samples (equivalent to a single episode).
  • The $\lambda$ Balance: The regularization parameter $\lambda$ was found to be critical. A "sweet spot" (around 0.10) allowed for effective adaptation without sacrificing the original task objective.

Conclusion and Future Work

Dual Action Policy provides a robust framework for addressing dynamics mismatch in sim-to-real transitions. By decoupling task optimization from domain adaptation and incorporating uncertainty-based resampling, DAP prevents the agent from falling victim to classifier hallucinations. While the Half-Cheetah task remains a challenge for all current methods, DAP represents a significant step toward making RL-trained robots more reliable in the real world. Future research may explore more complex uncertainty estimation techniques and application to high-dimensional tasks like dexterous manipulation.

Summary updated

BibTeX
@inproceedings{ng2024dual,
  author = {Wen Zheng Terence Ng and Jianda Chen},
  title = {{Dual Action Policy for Robust Sim-to-Real Reinforcement Learning}},
  booktitle = {ICANN},
  year = {2024},
}
Figure