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

Robust Adversarial Reinforcement Learning

Lerrel Pinto, James Davidson, Rahul Sukthankar, Abhinav Gupta

Deep neural networks coupled with fast simulation have led to massive successes in reinforcement learning (RL). However, transitioning these policies from simulation to the real world remains a major hurdle. The paper Robust Adversarial Reinforcement Learning (RARL) introduces a framework to improve the robustness and generalization of RL agents by training them in a zero-sum game against a destabilizing "adversary."

The Reality Gap and Data Scarcity

Moving RL policies to physical hardware is notoriously difficult primarily due to two issues:

  1. The Reality Gap: Simulators are inherently approximations. Small differences in friction, mass, or joint damping between the simulation and the real world can cause a policy to fail completely.
  2. Data Scarcity: Training directly in the real world is slow, expensive, and potentially dangerous for the hardware. Consequently, agents often overfit to the specific, limited conditions they encounter during simulated training.

The authors argue that modeling errors and environmental changes can be viewed as external "disturbances." Standard RL tries to maximize average performance, which often leads to fragile policies. RARL instead aims for robust performance by preparing the agent for worst-case scenarios.

The RARL Framework

The core of the paper is framing the training process as a two-player, zero-sum minimax game:

  • The Protagonist: The main agent trying to complete the task (e.g., walking or balancing).
  • The Adversary: A secondary agent whose sole goal is to make the protagonist fail by applying disturbance forces to specific points on its body.

The Training Loop

The authors use an alternating optimization strategy.

  1. Phase 1: The adversary's policy is fixed, and the protagonist is trained to maximize its reward using Trust Region Policy Optimization (TRPO).
  2. Phase 2: The protagonist's policy is fixed, and the adversary is trained to minimize the protagonist's reward (effectively maximizing its own negative reward).

This cycle repeats until convergence. By the end of training, the protagonist has learned a policy that is robust to the "hardest" disturbances the adversary could discover.

Experimental Setup

The researchers evaluated RARL using OpenAI Gym control environments powered by the MuJoCo physics engine. The benchmarks included a variety of locomotion and balancing tasks: InvertedPendulum, HalfCheetah, Swimmer, Hopper, Walker2d, and Ant.

For each environment, the researchers manually defined specific points where the adversary could apply forces, simulating external disturbances or unmodeled dynamics.

OpenAI Gym environments with adversarial forces

Key Insights

  • Adversary as a Hard-Example Miner: Instead of randomly sampling different physical parameters (like mass or friction) to find edge cases, the adversary learns to find the specific trajectories where the protagonist is most vulnerable.
  • Disturbances Simulate Modeling Errors: The fundamental insight is that if an agent can handle a smart adversary actively pushing it around, it can likely handle the "passive" disturbances caused by incorrect friction coefficients or unmodeled mass in the real world.
  • Interpretability: The learned adversarial strategies are often highly intuitive. For example, in the Inverted Pendulum task, the adversary learns to push the pole in the exact direction it is already tilting, forcing the cart to move faster to compensate.

Results and Performance

While RARL often achieves higher peak rewards, its most significant contribution is stability.

  • Improved Training Stability: RARL demonstrated a significant reduction in reward variance across different training runs, suggesting it is less sensitive to hyperparameter tuning and random initialization compared to the baseline.
  • Superior Generalization: When tested in environments with different masses and friction coefficients than those seen during training, RARL significantly outperformed the standard TRPO baseline. In many edge cases, the baseline failed completely while the RARL agent remained stable.
  • Zero-Adversary Performance: Even when the adversary was removed at test time, the RARL-trained agents often performed better than the baseline. This indicates that the agents learned more "conservative" and universally stable control strategies.
Training curves comparing RARL to TRPO baseline

Limitations and Future Work

While highly effective in simulation, the RARL framework has a few limitations:

  • Adversary Strength Tuning: If the adversary is too powerful (e.g., allowed to apply infinite force), the protagonist can never learn. Balancing the "strength" of the adversary requires manual tuning.
  • Manual Force Mapping: The authors had to manually decide where the adversary could apply forces for each robot. Automating this process or allowing the adversary to directly modify environment parameters (like gravity or friction) is a logical next step.
  • Computational Cost: Training two agents simultaneously (or alternatingly) increases the computational overhead compared to standard RL.
  • Sim-to-Real Validation: While the results on varying simulated parameters are promising, the paper relies on simulated environments and does not include experiments on actual physical hardware to definitively prove the sim-to-real transfer.

Summary updated

BibTeX
@inproceedings{pinto2017robust,
  author = {Lerrel Pinto and James Davidson and Rahul Sukthankar and Abhinav Gupta},
  title = {{Robust Adversarial Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=rybfPsWd-r},
}
Figure