Q2-Computing Icon
Q2-Computing Icon

Research › Analysis

Proximal Policy Optimization Algorithms

Schulman, J., Wolski, F., Dhariwal, P., Radford, A. & Klimov, O.  ·  arXiv:1707.06347 (2017)  · Paper

Q2 Computing analysis. All mathematical results and empirical findings are attributed to the original authors. We present our reading of the work as it relates to robotic automation.

What this paper solves

Policy gradient methods for reinforcement learning are unstable: a single large gradient step can collapse a policy, and recovering requires restarting from scratch. Trust Region Policy Optimization (TRPO) addressed this by constraining each update to stay within a KL-divergence bound from the current policy, but it requires second-order optimization and is difficult to apply when the policy shares parameters with a value function or auxiliary loss.

PPO achieves the same stability guarantee through a first-order clipped surrogate objective that is simple to implement, compatible with shared architectures, and admits multiple minibatch epochs per rollout. It became the standard policy gradient algorithm for continuous control and is the training method used in Champion-Level Drone Racing (#11 in this archive).

Key mathematical framework

Policy gradient baseline

Standard policy gradient maximizes the expected return by ascending the gradient of the log-probability of actions weighted by advantage:

where is an estimate of the advantage function at timestep . Multiple epochs of gradient ascent on this objective destroys the policy because large updates shift far from the distribution that generated the data.

Probability ratio

Let be the ratio of the new policy probability to the old policy probability for the taken action:

When , the policy is unchanged. TRPO constrains updates by requiring the expected KL divergence between old and new policy to stay below a threshold . PPO enforces a softer version by clipping directly.

Clipped surrogate objective

The PPO-Clip objective pessimistically clips the probability ratio so that updates which move the policy too far from the old policy receive no additional gradient signal:

The clip threshold is the primary hyperparameter. When the advantage is positive (the action was good), the ratio is clipped above at so the policy cannot over-exploit it. When the advantage is negative (the action was bad), the ratio is clipped below at so the policy cannot collapse toward avoiding it too aggressively.

Generalized Advantage Estimation

The advantage estimate uses Generalized Advantage Estimation (GAE) to balance bias and variance. Let be the TD residual. GAE computes an exponentially weighted sum of TD residuals:

The parameter interpolates between high-bias one-step TD () and high-variance Monte Carlo returns (). Typical values are .

Combined training objective

When the policy and value function share network parameters, PPO optimizes a combined objective that adds a value function loss and an entropy bonus:

The entropy bonus penalizes premature convergence to deterministic policies. Coefficients are standard. Unlike TRPO, this objective is differentiable and can be optimized with any first-order method.

Empirical results

  • Continuous control: PPO outperforms TRPO, A2C, and CMA-ES on the majority of MuJoCo locomotion benchmarks including Hopper, Walker2d, HalfCheetah, and Ant
  • Atari games: Matches or exceeds A3C performance on most Atari 2600 games using a single GPU within hours of wall-clock time
  • Sample efficiency: Achieves competitive performance with far fewer total environment interactions than TRPO due to multiple epochs of minibatch updates per rollout
  • Implementation simplicity: Requires only first-order gradients and no line search, making it compatible with standard deep learning frameworks and shared policy-value architectures

What this means for robotic automation

PPO's importance in this archive is primarily as an infrastructure algorithm. It is the training method behind Champion-Level Drone Racing, where 100 parallel simulation agents trained a quadrotor policy over 10⁸ environment interactions to achieve human-world-champion performance. The clip mechanism is what makes that scale of parallel training stable: independent rollouts from different agents can be batched into minibatch updates without any single rollout catastrophically shifting the policy.

The GAE formulation is directly applicable to any control problem where the reward signal is delayed or sparse. In swarm coordination, individual node rewards depend on collective outcomes that may not materialize until many timesteps after the action that caused them. GAE's weighted sum of TD residuals provides a low-variance advantage estimate under exactly this kind of temporal credit assignment problem.