Assessing Generalization in Deep Reinforcement Learning

Charles Packer, Katelyn Gao, Jernej Kos, Philipp Krähenbühl, Vladlen Koltun, Dawn SongarXiv 2018

Introduction

Deep reinforcement learning (RL) has demonstrated remarkable success in complex domains such as Go and Atari games. However, these agents are notoriously brittle, often failing when faced with even minor variations in their environment's physics or dynamics. For instance, a robotic controller trained for a specific leg mass might fail if that mass changes by a small margin. This paper addresses the critical issue of generalization by introducing a systematic benchmark and evaluating how different RL paradigms handle environmental shifts.

A Systematic Framework for Generalization

To rigorously measure generalization, the authors propose a framework that distinguishes between three types of environmental parameter distributions:

  1. Deterministic (D): The standard setup with fixed default parameters.
  2. Random (R): Parameters sampled uniformly from a range around the default, used to test interpolation.
  3. Extreme (E): Parameters sampled from "edge case" regions outside the training range, used to test extrapolation.
Visualization of the parameter space partitions: Default (D), Interpolation (R), and Extrapolation (E).

The study utilizes six modified environments from OpenAI Gym and Roboschool—including CartPole, MountainCar, and HalfCheetah—where physical parameters like mass, friction, and motor power are varied according to these tiers.

Methodology

The researchers evaluated four primary algorithmic approaches across Feed-forward (FF) and Recurrent (RC) architectures:

  • Vanilla Baselines (A2C and PPO): Standard algorithms without explicit robustness mechanisms.
  • Robust Scheme (EPOpt): A method that optimizes for the "worst-case" subset of environments to ensure stability.
  • Adaptive Scheme ($RL^2$): A meta-learning approach using recurrent networks to adapt strategies on-the-fly based on observed trajectories.

Key Results and Analysis

The experimental results yielded a surprising insight: "vanilla" RL algorithms often generalize better than specialized schemes when trained on a diverse set of environments.

Performance comparison of various RL algorithms across training and testing distributions.

As shown in the table above, vanilla A2C (FF) maintained a strong success rate of 76.63% during interpolation, though performance dropped to 63.72% in extrapolation. In contrast, specialized meta-learning agents like $RL^2$-PPO struggled significantly, achieving only a 29.93% success rate in interpolation. This suggests that the added complexity of meta-learning architectures can hinder data efficiency and training stability.

Emergent Robustness

Beyond raw metrics, the study observed qualitative changes in agent behavior. In the HalfCheetah environment, agents trained on diverse distributions developed a "forward-leaning" gait. While not the fastest possible movement, this strategy provided a buffer against fluctuations in motor power or friction, preventing the catastrophic "face-planting" seen in agents trained only on deterministic environments.

Conclusion

The findings highlight that diversity in training data is a powerful tool for building robust RL agents. While interpolation within a known range is achievable for standard algorithms, extrapolation to extreme values remains a significant challenge. Future research may need to look beyond model-free methods toward model-based RL to achieve true physical generalization.

Summary updated

BibTeX
@misc{packer2018assessing,
  author = {Charles Packer and Katelyn Gao and Jernej Kos and Philipp Krähenbühl and Vladlen Koltun and Dawn Song},
  title = {{Assessing Generalization in Deep Reinforcement Learning}},
  year = {2018},
  eprint = {1810.12282},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.12282},
}
Figure