PPO — Talks, Press, and Discussion

Press & Blog Coverage

  1. OpenAI blog, “Proximal Policy Optimization” (July 2017). OpenAI’s release post for PPO and the baselines code. It says PPO “has become the default reinforcement learning algorithm at OpenAI because of its ease of use and good performance.”

  2. OpenAI blog, “OpenAI Five” (2018). Describes the Dota 2 system, trained with a scaled-up version of PPO running on 256 GPUs and 128,000 CPU cores.

  3. Hugging Face Deep RL Course, “Proximal Policy Optimization (PPO)”. A step-by-step explanation of the clipped objective, with code.

  4. CleanRL documentation, PPO. Single-file reference implementations of PPO, with notes on implementation details.

  5. Lilian Weng, “Policy Gradient Algorithms” (2018). A survey of policy gradient methods with a section on PPO.

Q&A (answers from the paper)

Q1: What is wrong with doing many gradient steps on the same data with the normal policy gradient loss? The paper says it is “appealing” to do several steps of optimization on the same data, but this “is not well-justified, and empirically it often leads to destructively large policy updates” (Section 2.1). In Table 1, the objective with no clipping or penalty scored −0.39, worse than a random policy on average.

Q2: What does the clip do? The ratio r_t(θ) is clipped to [1 − ε, 1 + ε], and the objective takes the minimum of the clipped and unclipped terms. So the final objective is a lower (pessimistic) bound on the unclipped objective: a change in r is ignored when it would make the objective better, and included when it makes it worse (Section 3, Eq. 7).

Q3: Which ε worked best? On the 7 MuJoCo tasks, ε = 0.2 had the best average normalized score, 0.82, against 0.76 for ε = 0.1 and 0.70 for ε = 0.3 (Section 6.1, Table 1).

Q4: Is a KL penalty a good replacement for clipping? The paper tests a KL penalty with a fixed or adaptive coefficient and finds it “performed worse than the clipped surrogate objective” (Section 4). In Table 1, the KL settings scored between 0.62 and 0.74.

Q5: How is PPO compared with other algorithms? On the continuous-control tasks, PPO “outperforms the previous methods on almost all” of them (Section 6.2). On 49 Atari games, PPO won 30 games on average reward over all of training (ACER 18, A2C 1). On average reward over the last 100 episodes, ACER won 28 and PPO 19 (Section 6.4, Table 2).

Q6: Do the policy and value function share a network? For MuJoCo, no: “We don’t share parameters between the policy and value function” (Section 6.1). For a shared network, the loss adds a value-function error term and an entropy bonus (Section 5, Eq. 9). The Atari runs use c1 = 1 and c2 = 0.01 (Table 5).

Common Misconceptions

  1. “PPO is on-policy, so it uses each sample once.” Correction: PPO reuses each batch for K epochs of minibatch updates; the paper uses K = 10 for MuJoCo (Section 5, Algorithm 1; Table 3). The data still comes from the policy just before the update.

  2. “The clip stops the policy from changing.” Correction: The clip only removes the gain from pushing r outside [1 − ε, 1 + ε]. Inside that range, and in any direction that makes the objective worse, the gradient is unchanged (Section 3, Figure 1).

  3. “ε = 0.2 limits the KL divergence to a fixed value.” Correction: ε clips the per-sample probability ratio inside the loss. It is not a hard limit on the KL divergence, unlike TRPO’s constraint (Sections 2.2 and 3).

  4. “PPO needs a GPU.” Correction: The MuJoCo policies in the paper are small MLPs with two hidden layers of 64 units (Section 6.1). The CartPole run in this notebook trained on a CPU in 59.0 seconds.

Real Citations

  • Schulman, J., Wolski, F., Dhariwal, P., Radford, A., & Klimov, O. (2017). Proximal Policy Optimization Algorithms. arXiv:1707.06347.
  • Schulman, J., Levine, S., Moritz, P., Jordan, M., & Abbeel, P. (2015). Trust Region Policy Optimization. ICML. (PPO’s predecessor)
  • Schulman, J., Moritz, P., Levine, S., Jordan, M., & Abbeel, P. (2015). High-Dimensional Continuous Control Using Generalized Advantage Estimation. arXiv:1506.02438. (GAE, used by PPO)
  • Mnih, V., et al. (2016). Asynchronous Methods for Deep Reinforcement Learning. ICML. (A3C/A2C, compared against)
  • Kakade, S. & Langford, J. (2002). Approximately Optimal Approximate Reinforcement Learning. ICML. (CPI, the original surrogate objective)
  • Berner, C., et al. (2019). Dota 2 with Large Scale Deep Reinforcement Learning. arXiv:1912.06680. (OpenAI Five, trained with PPO)
  • Ouyang, L., et al. (2022). Training Language Models to Follow Instructions with Human Feedback. arXiv:2203.02155. (InstructGPT, uses PPO)