Curated summary
Quantifying generalization in reinforcement learning
Quantifying Generalization in Reinforcement Learning
OpenAI introduces CoinRun, a procedurally generated platformer environment that measures how well reinforcement learning agents transfer their experience to unseen levels. The authors show that RL agents overfit heavily to their training levels, even when trained on thousands of them, and that common supervised-learning regularization techniques can meaningfully reduce this gap. CoinRun gives the research community a simple, quantifiable benchmark for evaluating generalization.
The Generalization Problem
- RL agents can solve complex tasks but struggle to transfer skills to new environments.
- Benchmarks typically test agents on the same environments they trained on, which is comparable to evaluating on the training set in supervised learning.
- Earlier benchmarks (the Sonic benchmark, procedurally generated gridworld mazes, and the General Video Game AI framework) showed similar overfitting. Sonic agents performed well on training levels but poorly on test levels without fine-tuning, maze agents memorized large numbers of training levels, and GVG-AI agents failed on difficulty settings they had not seen during training.
CoinRun Environment Design
- Levels are procedurally generated, giving agents a large, easily quantifiable supply of training data.
- The goal is to collect a single coin at the end of each level while avoiding stationary and non-stationary obstacles.
- Touching an obstacle causes immediate death. The only reward is a fixed positive constant for collecting the coin.
- Episodes end on death, coin collection, or after 1000 time steps.
- The environment is deliberately simpler than Sonic but still challenging for state-of-the-art algorithms.
Measuring Overfitting
- Nine agents were trained with Proximal Policy Optimization for 256M timesteps, each on a different number of levels: eight fixed sets ranging from 100 to 16,000 levels, and one on an unrestricted set where it never saw the same level twice (roughly 2 million distinct levels).
- Each agent used a 3-layer convolutional architecture called Nature-CNN. Performance was averaged over 10,000 test episodes on unseen levels.
- Substantial overfitting appeared with fewer than 4,000 training levels and persisted even at 16,000.
- Agents trained on the unrestricted set performed best.
- The IMPALA-CNN architecture generalized noticeably better than Nature-CNN across all training set sizes.
Regularization Techniques
Experiments used a fixed set of 500 levels, which the authors recommend as a shared benchmark:
- Dropout and L2 regularization: Both reduced the generalization gap, with L2 having the larger effect.
- Data augmentation and batch normalization: A modified Cutout augmentation and batch normalization both significantly improved generalization.
- Environmental stochasticity: Training with stochastic environments improved generalization more than any of the other techniques.
- The authors note that RL policies are often trained without these supervised-learning methods, but in this setting they helped, indicating that earlier policies were overfitting to particular MDPs.
Additional Environments
- CoinRun-Platforms: A variant where several coins are scattered across platforms in a larger, fixed-size level. Agents must explore more and sometimes retrace their steps. Trained with 2B timesteps using the IMPALA-CNN followed by an LSTM.
- RandomMazes: A simple maze navigation environment that also uses an LSTM, since memory is needed.
- Both environments showed strong overfitting under the baseline setup. RandomMazes was especially severe, with a large generalization gap remaining even at 20,000 training levels.
Future Directions
The authors suggest several research questions:
- How environment complexity relates to the number of training levels needed for good generalization
- Whether different recurrent architectures generalize better in these environments
- How to combine multiple regularization methods effectively
Related reading
Continue with another curated summary.
OpenAI2019-12-02 Procgen Benchmark
Read original
OpenAI2019-12-04 Deep double descent
Read original
OpenAI2018-06-21 Retro Contest: Results
Read original
OpenAI2018-04-04 Retro Contest
Read original