Actor-critic's gradient step can, in principle, be as large as the math allows — nothing stops a single update from making a good action ten times more likely in one shot. If the advantage estimate that step was based on happens to be wrong (and it often is, especially early on), that's a huge, hard-to-undo mistake.
Drag the ratio — how much more (or less) likely the new policy makes the action the old policy took. The dashed line is the plain, unlimited objective; the bold line is PPO's version. They agree almost everywhere, then the bold line goes flat once crosses : past that point, moving further doesn't earn any more reward in the objective, no matter how far the policy actually moves.
With probability ratio and advantage estimate , PPO's clipped surrogate objective is:
- — the probability ratio: how much more (or less) likely the new policy makes the action taken, relative to the policy that generated the data.
- — the advantage estimate for that action (e.g. the actor-critic TD error from last chapter).
- — the clip range, typically around .
- — clamped into .
- r = 1 means 'no change yet'
exactly when the new policy assigns the same probability to that action as the old one did — the starting point before any update has moved anything.
- The min makes it a pessimistic bound
Taking the of the raw and clipped terms means the objective can never be more generous about a large policy change than the honest, unclipped number — it can only be more conservative.
- The clip only bites on one side
For a positive advantage, increasing past gets capped — no extra credit for over-committing to a good action. But decreasing below isn't clipped at all: the just picks the (already smaller) unclipped term, so nothing stops the policy from moving a good action's probability down as far as the raw gradient wants. The clip specifically prevents exploiting an advantage by moving too far in the rewarding direction, not the punishing one.
Step through ratios from up to . Below , the bold and dashed lines sit exactly on top of each other — nothing is being clipped. Past , the bold line stays flat at no matter how much further climbs.
With and (so the clip range is ):
- r = 0.9 — inside the clip range, nothing happens
, so both terms equal . The objective is just the plain policy gradient here — the clip hasn't engaged at all.
- r = 0.7 — below 1-epsilon, but still not clipped
, giving a clipped term of . But the raw unclipped term is , which is smaller — so wins. The clip exists but never binds here, exactly the asymmetry described above.
- r = 1.3 — past 1+epsilon, and now it bites
, giving a clipped term of . The unclipped term is . Now — the objective is held down to , even though the policy actually moved the ratio to . That gap is the clip doing its job: refusing to reward the update any further for moving past the trust region.
Move the ratio slider until the policy has moved far enough (past 1+ε = 1.2) that the clip is actively flattening the objective.
PPO keeps actor-critic's exact advantage estimate and policy-gradient machinery, but caps how much credit a single update can take for moving the policy a long way in one step — cheaply approximating a hard trust-region constraint with nothing more than a and a . That's the full arc of this part: from a policy with no memory of state at all (the bandit), to knowing a state's value under a fixed policy, to finding the optimal values and policy exactly, to learning them from experience, to learning a policy directly, and finally to constraining how aggressively that policy is allowed to change on any single step.