Investigating Generalisation in Continuous Deep Reinforcement Learning

Chenyang Zhao, Olivier Sigaud, Freek Stulp, Timothy M. HospedalesarXiv 2019

TL;DR

This paper investigates the critical issue of generalization in Deep Reinforcement Learning (Deep RL), revealing that current common practices of training and evaluating agents on deterministic simulators lead to policies that perform poorly when faced with real-world variations. The authors introduce a new benchmark and empirical evaluation to highlight this problem, demonstrating that optimizing for training performance often selects suboptimal agents for generalization.

What Problem Does This Paper Address?

Deep Reinforcement Learning (Deep RL) has achieved remarkable success in various control tasks, from games to robotics. However, a significant gap exists between these simulated successes and real-world applicability. A key challenge is generalization: the ability of an RL agent, trained in a specific environment, to perform well in new, unseen conditions. Current Deep RL research often trains agents on largely deterministic simulators and evaluates them solely based on their performance during training. This practice overlooks the crucial need for a train/test distinction to ensure models aren't overfitted to the training environment. Furthermore, robustness to "domain shift" – changes in the environment's underlying dynamics or noise characteristics – is essential for real-world applications like robotics, yet it's not a standard evaluation criterion. This paper aims to bridge this gap by systematically characterizing generalization challenges and evaluating state-of-the-art Deep RL methods under various forms of uncertainty and domain shift.

Methods

The authors tackle generalization by:

  • Characterizing Generalization Challenges: They break down the sources of uncertainty and variability that make generalization difficult. These include:
  • Noise: Sensor, actuator, and environmental noise that perturbs observations, actions, and transitions at each time step.
  • Domain Shift: Changes in environmental parameters (e.g., robot mass, friction) that create systematic differences between training and testing environments. This can occur due to differences in initial states, transition dynamics, or observation functions.
  • Developing a New Benchmark: They propose a rigorous evaluation framework that explicitly separates training and testing phases. This benchmark involves testing agents under various noise scales and systematic domain shifts, moving beyond simple train/test splits.
  • Empirical Evaluation: They conduct a thorough evaluation of several state-of-the-art Deep RL algorithms (PPO, TRPO, DDPG) and their modifications on standard OpenAI Gym continuous control tasks (e.g., Walker2d, Hopper).
  • Investigating Improvement Techniques: They explore and evaluate several methods aimed at enhancing generalization, including:
  • Entropy Regularization: Encouraging higher policy entropy for robustness.
  • Structured Control Nets (SCN): Architectures inspired by classic control theory.
  • Smaller Network Architectures: Investigating if reducing model complexity improves generalization.
  • Adversarial Attacks: Training with adversaries to improve robustness.
  • Multi-Domain Learning: Training agents on a distribution of environments.

Datasets

The paper uses standard OpenAI Gym environments for continuous control tasks, specifically:

  • InvertedPendulum-v2
  • InvertedDoublePendulum-v2
  • Walker2d-v2
  • Hopper-v2
  • HalfCheetah-v2

The authors introduce a new benchmark for evaluating generalization by systematically varying environmental parameters and noise levels during testing, creating distinct training and testing conditions.

Key Insights and Ideas

  • The "Reality Gap" is a Major Hurdle: Real-world robotics applications are inherently noisy and unpredictable, making deterministic simulations an insufficient training ground for robust agents.
  • Training Performance is a Misleading Metric: Optimizing solely for training return often leads to selecting policies that generalize poorly. This is because overfitting to the training environment can yield high training scores but fail dramatically when faced with even slight variations.
  • Generalization is Often Negatively Correlated with Training Performance: The paper shows a Pareto frontier where improving training return often comes at the cost of testing performance, highlighting the trade-off and the problem with standard evaluation practices.
  • Different Algorithms Excel at Different Generalization Challenges: No single algorithm consistently outperforms others across all types of noise and domain shifts. Some are more robust to observation noise, others to environmental parameter changes.
  • Training with Uncertainty Can Help: Introducing noise or domain variations during training can significantly improve an agent's ability to generalize to similar variations at testing time. However, this requires careful tuning and can sometimes hinder learning.
  • Simpler Architectures Can Generalize Better: Reducing the complexity of neural network architectures (e.g., fewer hidden units) can sometimes lead to improved generalization.

Key Results

  • Poor Generalization by Default: Standard Deep RL algorithms (PPO, TRPO, DDPG) exhibit significant performance degradation when tested on environments with even moderate noise or domain shifts, as measured by the Area Under Curve (AUC) of testing return.
  • Domain Shift is Particularly Challenging: Changes in environmental parameters (like robot mass or friction) often lead to a more substantial drop in performance than simple noise.
  • No Consistent Winner: Across various tasks and generalization scenarios, no single baseline algorithm (PPO, TRPO, DDPG) consistently demonstrated superior generalization.
  • Training with Noise Improves Performance: For tasks like Walker2d, training with observation or action noise (e.g., otr = 0.2) led to improved testing AUC scores compared to training in a deterministic environment, especially when testing also involved noise.
  • Architectural and Algorithmic Modifications Help: Techniques like entropy regularization (PPO-Ent) and smaller network sizes (PPO-16, SCN-16) showed promise in improving generalization, often outperforming the standard PPO baseline. PPO-Ent, in particular, sometimes showed substantial gains.
  • Negative Correlation Observed: The study found a generally negative correlation between training return and testing AUC score across many tasks and noise types, reinforcing the idea that optimizing for training performance is detrimental to generalization.

Limitations and Future Work

  • Misspecified Uncertainty: The paper notes that while training with noise can help, it's crucial that the noise characteristics during training are not too dissimilar from testing. Mis-specifying this can still lead to poor generalization.
  • No Universal Solution: The authors conclude that there isn't a single "silver bullet" technique that guarantees generalization across all environments and noise types.
  • Need for New Algorithms: The study suggests that new algorithms and architectures are likely needed to achieve robust generalization in Deep RL.
  • Future Work: The paper advocates for the continued development and use of benchmarks that explicitly test generalization, moving away from solely relying on training performance metrics for algorithm selection and development. They suggest their proposed benchmark and analysis can serve as a starting point for future research.

Summary updated

BibTeX
@misc{zhao2019investigating,
  author = {Chenyang Zhao and Olivier Sigaud and Freek Stulp and Timothy M. Hospedales},
  title = {{Investigating Generalisation in Continuous Deep Reinforcement Learning}},
  year = {2019},
  eprint = {1902.07015},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.07015},
}
Figure