Deep Policy Gradient Methods

Imagine training a simulated humanoid to walk using a neural network with millions of parameters. Every step of gradient ascent must nudge these parameters in the right direction. But the reward signal is sparse, and the environment is stochastic. A single bad update can send the policy into a region of parameter space from which it never recovers. This is the central engineering challenge of deep policy gradient methods: turning the elegant but fragile policy gradient theorem into an algorithm that scales to networks with millions of weights without collapsing. Classical actor-critic methods combine a policy (actor) with a value function (critic) to reduce variance in gradient estimates. But naively applying stochastic gradient ascent with a neural-network policy tends to be unstable. Step sizes that work well early in training become catastrophic later. A single large update can destroy weeks of learning progress. Deep policy gradient methods — Trust Region Policy Optimization (TRPO) and Proximal Policy Optimization (PPO) chief among them — solve this by explicitly constraining how much the policy is allowed to change on each update. They do this while still using deep networks and stochastic minibatch optimization. The big picture is a tension between two forces. Policy gradient methods want to take large, confident steps toward higher reward. But the same nonlinearity and high-dimensionality that make deep networks powerful also make the loss landscape treacherous. Trust-region and clipped-objective methods resolve this tension by measuring how far the new policy has drifted from the old one. They use KL divergence or a probability ratio to do so. Then they either constrain or penalize large drifts. This yields algorithms that are both sample-efficient enough for real robots and simple enough to run at scale. They work in game-playing and language-model fine-tuning pipelines alike. This article builds the theory from first principles. It explains why vanilla policy gradients are unstable. It shows how the trust-region idea fixes this with a provable monotonic-improvement guarantee. It also shows how PPO approximates that guarantee with a cheap, first-order clipped objective. It closes with a worked numerical trace and a table of common pitfalls. Finally, it traces the historical arc from REINFORCE to the algorithms that now underlie systems like OpenAI Five and RLHF-tuned language models.

Key takeaways
  • Vanilla policy gradient (REINFORCE, actor-critic) updates can be destructively large because step size in parameter space does not control step size in policy behavior.
  • TRPO constrains updates by bounding the KL divergence between old and new policies, giving a theoretical monotonic-improvement guarantee.
  • PPO replaces TRPO's constrained optimization with a clipped surrogate objective, achieving similar stability with plain SGD/Adam and no second-order math.
  • Generalized Advantage Estimation (GAE) supplies a low-variance, tunable-bias advantage estimate that both algorithms rely on.
  • Complexity: TRPO needs a conjugate-gradient solve per update (extra compute, no huge memory cost); PPO is roughly as cheap as ordinary supervised learning per step.
  • These methods are the backbone of large-scale RL systems, including robotics control, game-playing agents, and reinforcement learning from human feedback (RLHF).
The core insight

Constrain how much the policy's behavior changes on each update — not just the gradient step size — and stable, scalable policy-gradient learning follows.

The idea

The policy gradient theorem says that for a parameterized policy πθ(a∣s)\pi_\theta(a|s), the gradient of expected return J(θ)J(\theta) is

∇θJ(θ)=Eτ∼πθ[∑t∇θlog⁡πθ(at∣st) Aπθ(st,at)],\nabla_\theta J(\theta) = \mathbb{E}_{\tau \sim \pi_\theta}\left[\sum_{t} \nabla_\theta \log \pi_\theta(a_t|s_t)\, A^{\pi_\theta}(s_t,a_t)\right],

where Aπθ(s,a)=Qπθ(s,a)−Vπθ(s)A^{\pi_\theta}(s,a) = Q^{\pi_\theta}(s,a) - V^{\pi_\theta}(s) is the advantage function. In classical actor-critic methods, a critic network estimates AA (or VV) to reduce the variance of this Monte Carlo estimate, and the actor takes a gradient step θ←θ+α∇θJ(θ)\theta \leftarrow \theta + \alpha \nabla_\theta J(\theta). The problem is that this update is defined in parameter space, but what actually matters is the induced change in the policy's action distribution. Neural network policies are highly nonlinear reparameterizations of the action distribution, so a small step in θ\theta-space can correspond to an enormous, discontinuous change in behavior — flipping which action is preferred in many states simultaneously. Because policy gradient estimates are themselves computed under the old policy's state distribution, a large behavioral jump invalidates the very data used to compute the gradient, and the next batch of experience can be catastrophically off-policy or simply useless. Unlike supervised learning, there is no fixed dataset to fall back on: a bad step changes the data-generating distribution itself, and can be irrecoverable. Deep policy gradient methods address this by introducing a trust region: an explicit or implicit constraint on the statistical distance between the old policy πθold\pi_{\theta_{\text{old}}} and the new policy πθ\pi_\theta, typically measured by KL divergence. TRPO enforces this as a hard constraint solved via a constrained optimization (natural gradient plus line search). PPO approximates the same idea with a clipped objective function that can be optimized with ordinary stochastic gradient ascent, at the cost of only an approximate (rather than guaranteed) trust region. Both methods are built on top of an actor-critic architecture with a variance-reduced advantage estimator, most commonly Generalized Advantage Estimation (GAE), and both use importance sampling to reuse trajectories collected under an older policy for several gradient steps.

How it works

Step 1: Collect rollouts. Run the current policy πθold\pi_{\theta_{\text{old}}} in the environment for TT timesteps (or until episode end) across possibly many parallel workers, storing states, actions, rewards, and the action log-probabilities under the old policy.

Step 2: Estimate advantages. Use the critic VϕV_\phi and GAE to compute advantage estimates A^t\hat{A}_t with the recursion

δt=rt+γVϕ(st+1)−Vϕ(st),A^t=∑l=0∞(γλ)lδt+l.\delta_t = r_t + \gamma V_\phi(s_{t+1}) - V_\phi(s_t), \qquad \hat{A}_t = \sum_{l=0}^{\infty} (\gamma\lambda)^l \delta_{t+l}.

Here γ\gamma is the discount factor and λ∈[0,1]\lambda \in [0,1] trades bias for variance: λ=0\lambda=0 gives the low-variance, high-bias one-step TD advantage; λ=1\lambda=1 gives the high-variance, unbiased Monte Carlo advantage.

Step 3: Form the surrogate objective. Define the probability ratio

rt(θ)=πθ(at∣st)πθold(at∣st).r_t(\theta) = \frac{\pi_\theta(a_t|s_t)}{\pi_{\theta_{\text{old}}}(a_t|s_t)}.

TRPO maximizes Et[rt(θ)A^t]\mathbb{E}_t[r_t(\theta)\hat{A}_t] subject to Et[KL(πθold∥πθ)]≤δ\mathbb{E}_t[\mathrm{KL}(\pi_{\theta_{\text{old}}}\|\pi_\theta)] \le \delta. PPO instead maximizes the clipped surrogate

LCLIP(θ)=Et[min⁡(rt(θ)A^t, clip(rt(θ),1−ϵ,1+ϵ)A^t)].L^{\text{CLIP}}(\theta) = \mathbb{E}_t\Big[\min\big(r_t(\theta)\hat{A}_t,\ \mathrm{clip}(r_t(\theta), 1-\epsilon, 1+\epsilon)\hat{A}_t\big)\Big].

The clip removes the incentive to push rt(θ)r_t(\theta) far from 1 once it has already moved past 1±ϵ1\pm\epsilon in the direction favored by the sign of A^t\hat{A}_t.

Step 4: Update. TRPO computes the natural-gradient direction via conjugate gradient on the Fisher-information matrix, then does a backtracking line search to satisfy the KL constraint exactly. PPO simply runs several epochs of minibatch SGD/Adam directly on LCLIPL^{\text{CLIP}} minus a value-function loss plus an entropy bonus.

Step 5: Repeat, using the newly updated policy to collect the next batch of rollouts. ``` Algorithm: PPO (Clipped Surrogate, Actor-Critic) Input: initial policy parameters θ, value parameters φ, clip range ε, discount γ, GAE parameter λ, rollout length T, epochs K, minibatch size M repeat until convergence:

# 1. Collect experience run policy π_θ_old = π_θ for T timesteps (possibly N parallel actors) store (s_t, a_t, r_t, log π_θ(a_t|s_t)) for each step

# 2. Compute advantages and returns via GAE for each trajectory (backward pass): δ_t = r_t + γ V_φ(s_{t+1}) - V_φ(s_t) A_hat_t = δ_t + γλ * A_hat_{t+1} # recursive, A_hat after terminal = 0 R_hat_t = A_hat_t + V_φ(s_t) # target return for critic normalize A_hat over the batch (mean 0, std 1) # variance reduction, common in practice θ_old ← θ # freeze old policy for ratio computation

# 3. Multiple epochs of minibatch updates on the SAME data for epoch = 1 to K: shuffle the T(N) collected steps into minibatches of size M for each minibatch: r(θ) = exp( log π_θ(a|s) - log π_θ_old(a|s) ) # importance ratio L_clip = mean( min( r(θ)A_hat, clip(r(θ), 1-ε, 1+ε) A_hat ) ) L_value = mean( (V_φ(s) - R_hat)^2 ) L_entropy = mean( entropy(π_θ(·|s)) ) loss = -L_clip + c1 L_value - c2 L_entropy θ, φ ← Adam_step(θ, φ; ∇loss) return θ, φ ``` ``` Algorithm: TRPO (single update) Input: θ_old, rollouts, advantage estimates A_hat, KL budget δ g ← ∇_θ [ E_t( r_t(θ) A_hat_t ) ] evaluated at θ = θ_old # surrogate gradient F ← Fisher information matrix of π_θ at θ_old # implicit, via Hessian-vector products x ← ConjugateGradient(F, g) # solves F x = g approximately, avoiding explicit F^{-1} step_size ← sqrt( 2δ / (x^T F x) ) Δθ ← step_size x for k = 0, 1, 2, ... (backtracking line search): θ_candidate = θ_old + (0.5^k) * Δθ if surrogate improves AND mean KL(π_θ_old || π_candidate) ≤ δ: θ_old ← θ_candidate break ```

Figure
PPO actor-critic data flow: rollout, GAE, clipped update, repeat
Environment s_t, r_t Policy π_θ_old (actor network) a_t ~ π(·|s_t) Rollout Buffer (s,a,r,logπ_old) T × N samples Critic V_φ GAE: δ_t, A_hat_t target R_hat_t Clipped Surrogate r(θ) = π_θ/π_θ_old min(rA, clip(r,1±ε)A) + value + entropy terms Adam Update θ, φ ← θ,φ - α∇loss act in env (rollout loop) update θ_old ← θ, repeat

Complexity & correctness

Time complexity per iteration. Let TT be the rollout length per actor, NN the number of parallel actors, and dd the number of network parameters. Rollout collection costs O(NT)O(NT) environment steps and O(NTd)O(NTd) forward-pass compute. For PPO, each of the KK epochs performs one backward pass over all NTNT samples in minibatches, giving O(K⋅NT⋅d)O(K \cdot NT \cdot d) compute — essentially the cost of KK epochs of ordinary supervised learning, since the clipped objective and GAE recursion add only O(NT)O(NT) overhead (linear scans and elementwise operations). For TRPO, computing the natural gradient direction requires conjugate gradient, which itself needs O(m)O(m) Hessian-vector products (each an O(NTd)O(NTd) forward-backward pass through the network) where mm is the number of CG iterations (typically 1010–2020, independent of dd); the line search adds a small constant number of extra forward passes to re-evaluate the surrogate and KL. So TRPO costs roughly O(m⋅NTd)O(m \cdot NTd) per update — more expensive than PPO by the CG-iteration factor mm, but still linear in the number of parameters since Hessian-vector products are computed implicitly via automatic differentiation (never materializing the d×dd\times d Fisher matrix).

Space complexity. Both methods store the rollout buffer, O(NT⋅(dim⁡s+dim⁡a))O(NT \cdot (\dim s + \dim a)), plus the usual O(d)O(d) for network weights and optimizer state. TRPO's conjugate gradient needs only a handful of length-dd vectors, so it avoids the O(d2)O(d^2) cost of forming the Fisher matrix explicitly — this implicit Hessian-vector-product trick is what makes natural-gradient methods usable at neural-network scale at all.

Correctness argument — why the trust region works. The theoretical backbone is the policy improvement bound. For any two policies π\pi and π′\pi', define the surrogate advantage

Lπ(π′)=J(π)+Es∼dπ,a∼π′[Aπ(s,a)].L_\pi(\pi') = J(\pi) + \mathbb{E}_{s\sim d^\pi, a\sim\pi'}\left[A^\pi(s,a)\right].

A classical result (used to derive TRPO) shows

J(π′)≥Lπ(π′)−C⋅max⁡sKL(π(⋅∣s) ∥ π′(⋅∣s)),J(\pi') \ge L_\pi(\pi') - C \cdot \max_s \mathrm{KL}(\pi(\cdot|s)\,\|\,\pi'(\cdot|s)),

for a constant CC depending on the reward range and discount factor. The right-hand side is a lower bound on the true improvement in expected return that only depends on quantities computable from data generated by the old policy π\pi: the surrogate Lπ(π′)L_\pi(\pi') can be estimated by importance sampling, and the KL term measures the policy's own drift. Maximizing this lower bound with respect to π′\pi', subject to keeping the KL term small, guarantees J(π′)≥J(π)J(\pi') \ge J(\pi) — i.e. monotonic improvement — as long as the bound is tight enough that maximizing it does not decrease the true objective. TRPO approximates this by replacing the max-KL penalty with an average-KL constraint (empirically similar and far easier to optimize), turning the update into a constrained quadratic program solved via natural gradient. PPO's clipped objective is a first-order, unconstrained relaxation of the same idea. When A^t>0\hat{A}_t > 0 (action was better than average), the clip caps the objective's gradient once rt(θ)>1+ϵr_t(\theta) > 1+\epsilon, removing the incentive to increase the action's probability further — preventing runaway divergence from πθold\pi_{\theta_{\text{old}}} in that direction. Symmetrically for A^t<0\hat{A}_t < 0. This does not provide a formal monotonic-improvement guarantee (there is no bound analogous to TRPO's), but empirically it behaves as an effective trust region: because the pessimistic min⁡\min takes the lower of the clipped and unclipped terms, the objective never rewards moving rt(θ)r_t(\theta) further past the clip boundary, only tolerates it, so gradient ascent naturally settles near the boundary rather than blowing past it.

Honest tradeoffs. TRPO's guarantee is real but relies on the KL bound being accurate (it is a first/second-order approximation itself) and the conjugate-gradient solve is fiddly to implement correctly, sensitive to damping coefficients, and expensive per step. PPO trades away the formal guarantee for simplicity, GPU-friendliness, and compatibility with standard deep learning stacks; in practice it matches or exceeds TRPO's sample efficiency on most benchmarks, but it can still suffer instability if the clip range ϵ\epsilon is mistuned, if minibatches are reused too many epochs (letting rt(θ)r_t(\theta) drift far outside the clip zone before the objective can react), or if the advantage estimates are poorly normalized.

Worked example

Consider one PPO update step on a toy bandit-like state with a single state ss and two discrete actions, a1,a2a_1, a_2. Suppose πθold(a1∣s)=0.5\pi_{\theta_{\text{old}}}(a_1|s) = 0.5, πθold(a2∣s)=0.5\pi_{\theta_{\text{old}}}(a_2|s)=0.5, clip range ϵ=0.2\epsilon=0.2, and we observe action a1a_1 was taken with advantage estimate A^=+2.0\hat{A}=+2.0 (a good action), while a separate sample of action a2a_2 had A^=−1.5\hat{A}=-1.5 (a bad action).

QuantityAction a1a_1 (A^=+2.0\hat A=+2.0)Action a2a_2 (A^=−1.5\hat A=-1.5)
πθold(a∣s)\pi_{\theta_{\text{old}}}(a|s)0.500.50
suppose new πθ(a∣s)\pi_\theta(a|s) after a large gradient step0.900.10
ratio r(θ)=πθ/πθoldr(\theta)=\pi_\theta/\pi_{\theta_{\text{old}}}0.90/0.50=1.80.90/0.50=1.80.10/0.50=0.20.10/0.50=0.2
clip bounds [1−ϵ,1+ϵ][1-\epsilon,1+\epsilon][0.8,1.2][0.8,1.2][0.8,1.2][0.8,1.2]
clipped ratioclip(1.8)=1.2\mathrm{clip}(1.8)=1.2clip(0.2)=0.8\mathrm{clip}(0.2)=0.8
unclipped term rA^r\hat A1.8×2.0=3.61.8 \times 2.0 = 3.60.2×(−1.5)=−0.30.2 \times (-1.5) = -0.3
clipped term clip(r)A^\mathrm{clip}(r)\hat A1.2×2.0=2.41.2 \times 2.0 = 2.40.8×(−1.5)=−1.20.8 \times (-1.5) = -1.2
LCLIPL^{\text{CLIP}} per sample = min⁡(⋅,⋅)\min(\cdot,\cdot)min⁡(3.6,2.4)=2.4\min(3.6, 2.4) = 2.4min⁡(−0.3,−1.2)=−1.2\min(-0.3,-1.2) = -1.2

Reading the table: for the good action (a1a_1, positive advantage), the policy tried to push the probability far above the old value (0.5→0.90.5 \to 0.9, ratio 1.81.8), but the objective clips the reward for doing so at ratio 1.21.2 — the gradient of LCLIPL^{\text{CLIP}} with respect to θ\theta becomes zero once r>1.2r>1.2, so further increases stop being reinforced. For the bad action (a2a_2, negative advantage), the policy correctly decreased its probability, but the min⁡\min picks the more negative (unclipped) term −0.3-0.3 only when it is smaller — here −1.2<−0.3-1.2 < -0.3 so the min picks −1.2-1.2, meaning the clipped, more pessimistic value is used, which still penalizes overshooting far past the trust region in the direction of decreasing a2a_2's probability. This asymmetric pessimism (always take the worse of the two candidate objectives) is exactly what prevents a single minibatch of updates from driving the policy arbitrarily far from πθold\pi_{\theta_{\text{old}}}, no matter how extreme the raw advantage estimate. Compare to what an unclipped surrogate (r(θ)A^r(\theta)\hat A alone) would do: it keeps rewarding ratio 1.81.8 fully at value 3.63.6, giving unlimited incentive to keep increasing πθ(a1∣s)\pi_\theta(a_1|s) toward 11 every epoch the minibatch is replayed — precisely the runaway behavior that destabilizes vanilla policy gradient with importance-weighted reuse of old data.

Common pitfalls & traps

PitfallWhy it happensFix
Reusing rollouts for too many epochsRatio rt(θ)r_t(\theta) drifts far outside [1−ϵ,1+ϵ][1-\epsilon,1+\epsilon] before the clip can react, causing effective off-policy blowupLimit epochs (typically 3–10), monitor approximate KL and stop early if it exceeds a threshold
Not normalizing advantagesRaw advantage scale varies across batches/tasks, destabilizing the gradient magnitudeStandardize A^\hat A to zero mean, unit variance per batch
Wrong sign or missing bootstrap in GAEForgetting to zero the recursion at episode boundaries leaks value across episodesReset A^t+1=0\hat A_{t+1}=0 at terminal states; bootstrap with VϕV_\phi for truncated (non-terminal) episode ends
Treating PPO's clip as a hard trust-region guaranteeThe clip is a heuristic surrogate, not a proven monotonic-improvement bound like TRPO'sTrack empirical KL divergence as a diagnostic even when using PPO
Sharing actor/critic weights carelesslyValue loss gradients can dominate and distort the policy's feature representationWeight the value loss coefficient c1c_1 appropriately, or use separate networks when tasks conflict
Entropy bonus too high or too lowToo high prevents convergence to a deterministic optimum; too low causes premature convergence to a bad local policyAnneal the entropy coefficient over training; tune c2c_2 per environment

Pioneers & history

Origins · 1 minJohn Schulman and how this was discovered
JS
John Schulman
1988–2024 · UC Berkeley, OpenAI — trust-region and proximal policy optimization

Schulman led the development of TRPO (2015) and PPO (2017) while a PhD student and later researcher, building on the actor-critic and natural-gradient traditions to make deep policy-gradient training practical at scale. PPO in particular became one of the most widely deployed RL algorithms in industry, later forming a core component of reinforcement learning from human feedback pipelines used to align large language models.

History
1992
Ronald Williams introduces REINFORCE, the foundational Monte Carlo policy-gradient algorithm.
1999–2000
Sutton, McAllester, Singh, and Mansour establish the policy gradient theorem and actor-critic framework rigorously.
2015
Schulman et al. introduce Trust Region Policy Optimization (TRPO) with a monotonic-improvement guarantee.
2015
Schulman et al. introduce Generalized Advantage Estimation (GAE) for low-variance advantage estimates.
2017
Schulman et al. introduce Proximal Policy Optimization (PPO), the clipped-objective simplification of TRPO.

Where this matters

Deep policy gradient methods underlie some of the most visible successes of modern reinforcement learning. OpenAI Five, which learned to play the multiplayer game Dota 2 at a professional level, was trained with a large-scale distributed version of PPO. Robotics research groups use PPO and TRPO to train locomotion and manipulation policies, both in simulation and increasingly with sim-to-real transfer. In natural language processing, PPO is the workhorse optimizer inside reinforcement learning from human feedback (RLHF) pipelines that fine-tune large language models toward human preferences, treating the language model itself as the policy and a learned reward model as the environment's reward signal. Continuous-control benchmarking suites such as MuJoCo and physics-based simulators for autonomous driving research routinely use PPO as the default baseline algorithm because of its reliability and minimal hyperparameter sensitivity relative to earlier methods. The trust-region idea itself — constraining policy drift via KL divergence — recurs in later algorithms including Soft Actor-Critic, which folds entropy maximization directly into the objective, and informs methods used in Imitation and Inverse RL, where matching a policy's behavioral distribution to expert demonstrations raises exactly the same drift-control concerns that TRPO and PPO were built to solve.

Ask the tutor: How would you adapt the clipped PPO objective for continuous action spaces with a learned Gaussian policy, and what extra care does the log-probability ratio require there?

Why can't we just use a smaller learning rate to stabilize vanilla policy gradient?

A smaller learning rate shrinks steps in parameter space, but the mapping from parameters to policy behavior is highly nonlinear and state-dependent in a deep network. The same parameter-space step size can correspond to a tiny behavioral change in one region of state space and a huge one in another, especially near decision boundaries where action probabilities are sensitive to small logit shifts. Shrinking the learning rate uniformly slows down learning everywhere to guard against the worst case, which is wasteful. Trust-region methods instead directly measure and constrain the behavioral distance (via KL divergence or the clipped ratio), which is the quantity that actually determines whether the next batch of collected data remains valid and useful.

Is PPO strictly better than TRPO in practice?

Not strictly — it is a different tradeoff. TRPO offers a real, provable monotonic-improvement bound (under its approximations) and can be more robust on tasks sensitive to catastrophic policy collapse. PPO discards the formal guarantee for a much simpler, cheaper optimization loop compatible with standard deep learning tooling, and it empirically matches or beats TRPO's sample efficiency on most common benchmarks while being far easier to implement, tune, and parallelize. In practice PPO's simplicity has made it the default choice in most production and research pipelines, with TRPO now used mainly as a theoretical reference point or in settings demanding stronger guarantees.

What role does the critic play, and could you run PPO without one?

The critic Vϕ(s)V_\phi(s) estimates the state-value function used inside the GAE recursion to compute advantages A^t\hat A_t with much lower variance than raw Monte Carlo returns. Without a critic, you would fall back to using discounted returns directly as the advantage signal (equivalent to setting λ=1\lambda=1 and subtracting only a constant baseline), which is unbiased but typically far noisier, requiring many more samples to converge. In principle PPO's clipped mechanics do not require a critic, but in practice every widely used implementation pairs the clipped policy loss with a learned value function precisely to keep gradient variance manageable at deep-network scale.

Why is the advantage estimate normalized before computing the PPO loss?

Raw advantage magnitudes can vary wildly across batches, tasks, and stages of training — early in training returns might span a huge range, while later they compress near an optimum. Because the clipped objective's gradient scale depends directly on A^t\hat A_t, unnormalized advantages can cause wildly inconsistent effective step sizes across updates, making the entropy and value-loss coefficients (which are typically tuned assuming a roughly fixed advantage scale) behave inconsistently. Standardizing A^t\hat A_t to zero mean and unit variance per batch keeps the gradient magnitudes comparable across training stages and across different environments, which is one reason PPO's default hyperparameters transfer reasonably well without per-task retuning.

How does the clip range ε in PPO relate to the KL constraint δ in TRPO?

Both parameters control how far the new policy is allowed to drift from the old one, but they operate differently. TRPO's δ is an explicit bound on the average KL divergence, enforced by a constrained optimization with a provable connection to the policy-improvement bound. PPO's ε instead bounds the probability ratio rt(θ)r_t(\theta) directly, which only indirectly limits KL divergence and does so non-uniformly across states depending on the action distribution's shape. There is no exact algebraic conversion between ε and δ; practitioners typically tune ε (commonly 0.1–0.3) empirically per task rather than deriving it from a target KL budget, though monitoring empirical KL during PPO training is a common sanity check.

What breaks if you skip the importance-sampling ratio and just reuse old log-probabilities as if they were current?

The entire justification for reusing a rollout across multiple gradient epochs depends on correcting for the fact that the data was generated by πθold\pi_{\theta_{\text{old}}}, not the current πθ\pi_\theta being optimized. The ratio rt(θ)=πθ(at∣st)/πθold(at∣st)r_t(\theta)=\pi_\theta(a_t|s_t)/\pi_{\theta_{\text{old}}}(a_t|s_t) reweights each sample to approximate what the objective would be under the current policy. If you skip this and treat the stored log-probabilities as always current, you are silently computing gradients as though every epoch were on-policy, which both invalidates the surrogate objective's connection to the true policy-improvement bound and removes any signal telling the optimizer to slow down as the policy diverges from the data-generating distribution.

Does clipping alone prevent all instability in PPO?

No. Clipping controls the policy loss's incentive to overshoot the trust region, but instability can still enter through other channels: an unclipped or poorly scaled value-function loss can dominate a shared network's gradients, an entropy bonus that decays too slowly can keep the policy overly stochastic and stall convergence, and numerical issues in computing log-probabilities (especially for continuous action distributions with learned variances collapsing to near zero) can produce exploding ratios before clipping even applies. Robust PPO implementations therefore also clip the value loss, apply gradient norm clipping, and carefully initialize and constrain the policy's output distribution parameters.

Before this

Where this leads