5.2.9 · D5Deep & Advanced RL
Question bank — Proximal Policy Optimization (PPO)
Before you start, every symbol this page leans on is built from zero below — nothing is assumed.
The figure below turns the clip logic into a picture you can point at while answering the traps.

True or false — justify
is always less than or equal to the unclipped surrogate .
True — the
min can only pick the smaller of the two branches, so is a pessimistic lower bound on ; it never overstates the improvement.Clipping the ratio into guarantees the new policy's KL divergence from the old stays below a fixed bound.
False — clipping bounds the per-sample ratio, not the aggregate KL Divergence; the total KL can still grow across many samples and epochs, which is why implementations often add early-stopping on measured KL as a safety net.
If every advantage in a batch is exactly zero, PPO makes no policy update.
True — the objective is -based, so zeroes both branches and the policy gradient; only the value and entropy terms could still move parameters.
The min in is what stops the policy from moving too far.
Partly — the
min combined with the clip removes the incentive to move further when doing so would help, but it does not hard-stop motion; a single mis-estimated batch with active gradients elsewhere can still shift the policy.PPO is second-order like TRPO because it also enforces a trust region.
False — PPO gets TRPO-like reliability using only first-order SGD; it replaces TRPO's Fisher-matrix / conjugate-gradient machinery with a cheap clipped objective.
When for a sample, that sample contributes nothing to learning.
False — means the ratio is unchanged, but the gradient is generally nonzero, so this sample still pushes the policy in the direction of its advantage.
Increasing always makes PPO learn faster.
False — a larger permits bigger steps but reopens the instability PPO exists to prevent; too large and the importance ratio stops approximating the true objective, exactly the failure mode of unclipped importance sampling.
Running more epochs over the same batch is free sample efficiency.
False — more epochs squeeze more learning from data (the win over REINFORCE), but each epoch drives further from , so ratios drift outside the band and later epochs contribute mostly clipped, gradient-free samples.
Spot the error
"Clip is active, therefore the gradient is zero for this sample."
Error — clip being active is necessary but not sufficient; the gradient is zero only when the
min selects the clipped branch. When and , the ratio is clipped, yet the min keeps the unclipped branch (it is more negative), so the gradient still flows."For a good action () we should keep pushing up as high as possible to maximize return."
Error — the surrogate is only trustworthy near ; pushing exploits a possibly noisy and leaves the region where the reweighting is valid. PPO caps the reward at precisely to kill this incentive.
"To reuse old data we just average over the new policy's samples."
Error — the data was generated by , not , so you must reweight by the ratio (Importance Sampling); averaging without estimates the wrong expectation.
"The value-function term is subtracted because we want to maximize it."
Error — we minimize squared value error between the critic and its target ; it is subtracted from so that maximizing minimizes that error. The sign is bookkeeping, not a claim that large value error is good.
"Entropy bonus is there to make the loss smoother."
Error — entropy is added to encourage exploration, keeping the policy from collapsing to a deterministic choice too early; it is about behaviour, not numerical smoothness.
"GAE with is strictly better because it's unbiased."
Error — gives the unbiased Monte-Carlo return but with high variance; GAE deliberately uses to trade a little bias for a large variance reduction, which trains more stably.
"Since is a lower bound, optimizing it can't improve the true objective."
Error — improving a valid lower bound on the surrogate still drives the true objective up as long as the bound is tight near ; the pessimism only prevents overclaiming improvement, not real improvement.
Why questions
Why a ratio and not a difference ?
Because importance sampling reweights expectations by a ratio of densities — it is the exact factor that converts an average under into one under ; a difference has no such correction meaning.
Why does PPO clip instead of clipping the advantage ?
The danger is the policy drifting too far, which is measured by how much the ratio moved; clipping would distort the learning signal itself, while clipping only limits the step size implied by each sample.
Why take the min rather than symmetrically clipping both directions?
The
min is deliberately asymmetric: it lets the objective get worse freely (so you can always correct a mistake, even outside the band) but forbids it getting artificially better (so you can't be rewarded for over-stepping). Symmetric clipping would also cap useful corrections.Why is the clipped objective called "pessimistic"?
Because at every sample it takes the smaller of the two estimates, so it never assumes the update helped more than the conservative branch allows — it errs toward underclaiming improvement.
Why does TRPO's hard KL constraint get replaced, not just added?
The clip approximates the trust region with a first-order penalty, delivering ~90% of TRPO's reliability at ~10% of the complexity; keeping both would mostly restore the expensive second-order machinery PPO was designed to avoid.
Why run minibatch SGD for several epochs on one batch at all?
To extract more signal from each expensive rollout — the sample-efficiency gain over REINFORCE's one-step-per-batch — with the clip acting as the guardrail that keeps those extra epochs from wandering too far.
Edge cases
and exactly (right on the boundary).
Both branches give , so the value is identical; the gradient is defined by the branch structure but any further increase in crosses into the flat, zero-gradient region.
and (already suppressed below the band).
The clipped branch is smaller (more negative) than the unclipped , so
min selects it → gradient zero; PPO refuses to suppress an already-crushed bad action even further in one update.but (we accidentally made a bad action more likely).
Unclipped is more negative than clipped , so
min keeps the unclipped term → gradient flows to push down. This is the min letting us undo damage even outside the trust band.The new policy assigns near-zero probability to a sampled action, so .
The ratio collapses toward zero; for this heavily penalizes abandoning a good action, but numerically it can blow up in log-space, which is why PPO clips and why probabilities are floored in practice.
The old policy assigned near-zero probability to the action, so .
A tiny denominator makes the ratio explode — the classic high-variance failure of Importance Sampling; clipping caps the reward from such samples, but they remain a warning that the two policies are drifting apart.
A deterministic policy () with no entropy bonus.
Exploration stops: every rollout samples the same action, advantages stop being informative for alternatives, and learning stalls — exactly why the entropy term is kept nonzero early in training.
(zero clip width).
The band collapses to the single point ; any deviation is immediately clipped and, for helpful directions, gradient-free — the policy can barely move, so learning nearly freezes.
Advantages not normalized within the batch.
Their raw scale multiplies directly into , so a few large-magnitude advantages can dominate the update; standardizing per batch (see the normalization definition above) keeps the band meaningful.
Recall One-line summary of the trap pattern
Almost every trap here is a confusion between "clip is active" and "gradient is zero" — they coincide only when the min selects the clipped branch. Master that, plus the sign of , and the whole objective becomes readable.
Question
Answer
Related: Policy Gradient Theorem · Actor-Critic Methods · 5.2.09 Proximal Policy Optimization (PPO) (Hinglish)