techlist.io
OpenAI2017-07-193 min read

Curated summary

Proximal Policy Optimization

Read original(opens in new tab)

Proximal Policy Optimization: A Simpler, Robust Policy Gradient Method

OpenAI introduces Proximal Policy Optimization (PPO), a new family of reinforcement learning algorithms that matches or beats state-of-the-art methods while being far simpler to implement and tune. The post argues that PPO strikes a practical balance between ease of implementation, sample efficiency, and ease of tuning, and reports that it has become OpenAI's default RL algorithm as a result.

The Problems with Policy Gradient Methods

  • Policy gradient methods underpin many deep RL successes, including video games, 3D locomotion, and Go.
  • They are highly sensitive to the step size: too small and learning is painfully slow, too large and noise overwhelms the signal or performance collapses.
  • They often have poor sample efficiency, needing millions or billions of timesteps to learn simple tasks.

Earlier Fixes: TRPO and ACER

  • TRPO and ACER constrain or otherwise optimize the size of each policy update to address these issues.
  • ACER is considerably more complex than PPO, requiring off-policy corrections and a replay buffer, while only marginally outperforming PPO on Atari.
  • TRPO works well for continuous control but is hard to combine with architectures that share parameters between the policy and value function, or that use auxiliary losses, which are common in vision-heavy domains like Atari.

The PPO Objective

  • Supervised learning is predictable, whereas RL algorithms have many interacting parts that are hard to debug and require heavy tuning.
  • PPO computes each update to minimize the cost function while keeping the new policy close to the previous one.
  • An earlier PPO variant used an adaptive KL penalty to control policy change. The new version replaces this with a clipped surrogate objective built from the probability ratio between the new and old policies, multiplied by the estimated advantage, with a clipping hyperparameter ε typically set to 0.1 or 0.2.
  • This objective approximates a trust region update while remaining compatible with stochastic gradient descent. It removes the KL penalty and the need for adaptive update schedules.
  • In tests, PPO performed best on continuous control tasks and nearly matched ACER on Atari.

Demonstration: Controllable Robots

  • Interactive agents trained with PPO were shown in Roboschool, where a user set new target positions for a robot via keyboard.
  • Although the input sequences differed from the training distribution, the agent generalized to them.

Released Implementations

  • OpenAI Baselines now includes scalable, parallel implementations of PPO and TRPO that use MPI for data passing, written in Python 3 and TensorFlow.
  • Pre-trained policies for the robots are available in the Roboschool agent zoo.
  • A later update added PPO2, a GPU-enabled implementation that runs about 3x faster than the original PPO baseline on Atari.
  • The update also added ACER, which uses a replay buffer to perform multiple gradient updates per sample and a Q-function approximator trained with the Retrace algorithm.

Conclusion

PPO offers a practical default for policy gradient reinforcement learning: it is simpler than TRPO and ACER, performs comparably or better across continuous control and Atari, and is easier to tune. Its open-source implementations in Baselines make it straightforward to adopt.

Continue with another curated summary.