techlist.io
OpenAI2017-03-234 min read

Curated summary

Evolution strategies as a scalable alternative to reinforcement learning

Read original(opens in new tab)

Evolution strategies (ES), a decades-old black-box optimization method, can match standard reinforcement learning (RL) methods on modern benchmarks like Atari and MuJoCo while avoiding many of RL's practical burdens. ES needs no backpropagation, is simpler to implement, scales far more easily across distributed machines, handles sparse rewards well, and has fewer hyperparameters. The authors show that ES can train a 3D humanoid walker in 10 minutes on 1,440 CPU cores, where A3C needed about 10 hours on 32 cores, and reach comparable Atari performance in one hour instead of one day.

How Reinforcement Learning Works

  • A policy, usually a neural network with on the order of a million parameters, maps the current state to probabilities over actions.
  • Training collects episodes of interaction, then uses backpropagation to nudge the network toward actions that preceded good outcomes and away from those that preceded bad ones.
  • Exploration comes from sampling actions from a stochastic policy, which injects noise into the agent's actions.

Evolution Strategies as Black-Box Optimization

  • Despite the name, ES has little to do with biological evolution. It is best understood as a family of black-box stochastic optimization methods.
  • The environment, the agent, and the time structure of episodes are all abstracted away. The method sees only a million-dimensional parameter vector go in and a single total reward come out.
  • Each step perturbs the current parameters with Gaussian noise to create a population (for example, 100 candidates), evaluates each candidate's total reward, and moves the parameters toward a reward-weighted average of the perturbations.
  • Mathematically, this is a finite-difference estimate of the gradient of expected reward along random directions. It can also be viewed as REINFORCE with a Gaussian policy over whole parameter vectors.
  • A short NumPy example minimizes a quadratic with this procedure, illustrating how little code is required.
  • Because noise is injected into parameters rather than actions, ES can use deterministic policies and can optimize non-differentiable networks.

Advantages of ES over RL

  • No backpropagation: Only forward passes are needed, making the code shorter and about 2 to 3 times faster in practice. Episodes need not be stored, and exploding gradients in RNNs are not a concern.
  • Highly parallelizable: Workers share random seeds and only exchange scalar rewards, rather than synchronizing parameter vectors with millions of entries. The authors observed linear speedups up to thousands of CPU cores.
  • Robustness: RL can fail badly under different Atari frame-skip settings, whereas ES performs about equally well across them.
  • Structured exploration: Policy-gradient methods often start with random jitter in place. ES, using deterministic policies, produces consistent behaviors.
  • Long time horizons: Analysis of both gradient estimators suggests ES is especially attractive when episodes are long, actions have lasting effects, or good value estimates are unavailable.

Challenges and Limitations

  • ES requires that parameter noise produce different outcomes so that a gradient signal exists. Virtual batch norm helped, but better parameterizations are needed.
  • In Montezuma's Revenge, a random network almost never retrieves the key on the first level, whereas random actions occasionally do.
  • ES is about 1,000 times slower than backpropagation for supervised tasks such as MNIST, so its advantage is specific to RL settings, where gradients must be estimated by sampling.

Benchmark Results

  • On MuJoCo, ES reaches performance comparable to TRPO but is roughly a factor of 10 less data-efficient in the worst case.
  • On wall-clock time, ES solved the 3D humanoid task in 10 minutes on 1,440 CPUs across 80 machines. A3C on 32 cores took about 10 hours, and the authors note that naive A3C scaling in cloud settings is limited by communication bandwidth.
  • On Atari, ES on 720 cores in one hour matches A3C on 32 cores in one day across games such as Pong, Seaquest, and Beamrider. In Seaquest, the submarine learns to surface when oxygen runs low.

Context and Conclusion

  • The work follows a broader pattern of revisiting decades-old ideas, similar to how AlexNet and Deep Q-Learning revived CNNs and Q-learning.
  • The authors' contributions are scaling ES to distributed settings, adapting it to deep networks (such as with virtual batch norm), and evaluating it on modern RL benchmarks. Their work builds on Natural Evolution Strategies (Wierstra et al., 2014).
  • The authors conclude that neuroevolution can compete with RL on modern benchmarks while being simpler and easier to scale, and suggest future directions such as indirect encoding and evolving network structure.

Continue with another curated summary.