Sam Babichenko

Reading notes / Running RL at scale

Trust regions in LLM reinforcement learning

Policies and tokens
ssprefix: the prompt and the response tokens before the current one
aaa token
πold\pi_{\rm old}policy that sampled the batch
πθ\pi_\thetapolicy being trained
ρ\rhotoken ratio πθ(a∣s)/πold(a∣s)\pi_\theta(a\mid s)/\pi_{\rm old}(a\mid s)
A^\hat Aadvantage of the token's response
ppπold(a∣s)\pi_{\rm old}(a\mid s) for the token in question
TTresponse length in tokens
πold(a),\pi_{\rm old}(a), πθ(a),\pi_\theta(a), ρ(a)\rho(a)the same quantities for token aa at a fixed prefix
Δπ\Delta\pichange πθ(a)−πold(a)\pi_\theta(a)-\pi_{\rm old}(a) of a token's probability
ρt,\rho_t, sts_tratio of a response's tt-th token and the prefix before it
RRreward of a response, given at its end
JJexpected reward of a policy
LLsurrogate gain before clipping, Eπold[R∑t(ρt−1)]\mathbb E_{\pi_{\rm old}}\big[R\sum_t(\rho_t-1)\big]
MtM_tDPPO's mask on token tt: 0 when D^t>τ\hat D_t\gt\tau and (ρt−1)A^>0(\rho_t-1)\hat A\gt0, else 1
Divergences
DKL(πold∥πθ)D_{\rm KL}(\pi_{\rm old}\|\pi_\theta)KL divergence ∑aπold(a)log⁡(πold(a)/πθ(a))\sum_a\pi_{\rm old}(a)\log(\pi_{\rm old}(a)/\pi_\theta(a)) at one prefix
DfD_fff-divergence ∑aπold(a)f(ρ(a))\sum_a\pi_{\rm old}(a)f(\rho(a)), for a convex ff with f(1)=0f(1)=0
FFFisher information matrix of πθ\pi_\theta in its parameters
χ2\chi^2Pearson χ2=∑aπold(a)(ρ(a)−1)2=Var⁡πoldρ\chi^2=\sum_a\pi_{\rm old}(a)(\rho(a)-1)^2=\operatorname{Var}_{\pi_{\rm old}}\rho
χ22\chi^2_2χ2\chi^2 of moving one token to pρp\rho and rescaling the rest, p(ρ−1)2/(1−p)p(\rho-1)^2/(1-p)
DTV(s)D_{\rm TV}(s)total variation 12∑a∣πθ(a∣s)−πold(a∣s)∣\tfrac12\sum_a|\pi_\theta(a\mid s)-\pi_{\rm old}(a\mid s)| at prefix ss
DTVmax⁡D^{\max}_{\rm TV}largest per-prefix total variation, max⁡sDTV(s)\max_sD_{\rm TV}(s)
D^t\hat D_tDPPO's binary or top-KK estimate of the divergence at sts_t
Constants
δ\deltatrust-region budget on χ2\chi^2; RIPO's default 0.05, 0.02 in the examples
ε\varepsilonPPO's clip range, 0.2; DCPO's bound in its own rule
τ\tauDPPO's threshold on D^t\hat D_t, 0.15 to 0.2 for total variation; DRPO's on ∣πθ(a∣s)−p∣|\pi_\theta(a\mid s)-p|
ξ\xilargest absolute reward
KKtokens kept separately in DPPO's top-KK estimate, 20
Paper symbols
rrwhat PPO, RIPO, DRPO and DPPO write for ρ\rho
μ,\mu, L′L'what DPPO's paper writes for πold\pi_{\rm old} and LL
δ\deltaRIPO's δ\delta is the χ2\chi^2 budget here; TRGPPO's is a KL budget

Context. Policy-gradient training of a language model samples responses from one policy, the policy that sampled the current batch of responses, frozen while the batch is used, and updates another, πθ\pi_\theta. For token aa after prefix ss, the update maximizes a surrogate that weights each sampled token's how much better the token's response scored than expected, for example its reward minus the mean reward of the responses sampled for the same prompt by its probability ratio ρ\rho=πθ(a∣s)/πold(a∣s){}=\pi_\theta(a\mid s)/\pi_{\rm old}(a\mid s). That surrogate is accurate only while πθ\pi_\theta stays close to πold\pi_{\rm old}. In language-model RL, the two already differ before the first gradient step, so training is trained on samples from a policy other than the one being updated, here because each batch is reused for several updates, sampling runs ahead of training, and the sampling engine computes slightly different probabilities from the trainer. Reading notes: μ-GRPO, Weighting stale samples in off-policy RL. A trust region holds the update where the surrogate stays valid. PPO clips every token's ratio to the same box [1−ε,1+ε][1-\varepsilon,1+\varepsilon]. Recent rules replace that flat box with a band whose width depends on the token's probability under the sampler.

A trust region keeps the surrogate's error small by bounding a divergence between the old and new next-token distributions. To second order, every smooth divergence reduces up to a constant factor to the same quadratic form, the the quadratic form ∑a(dπ(a))2/π(a)\sum_a(d\pi(a))^2/\pi(a) on a small change dπd\pi of a distribution π\pi; in the parameters it is dθ⊤F dθd\theta^\top F\,d\theta, with FF the covariance of ∇θlog⁡πθ(a)\nabla_\theta\log\pi_\theta(a) under πθ\pi_\theta. That metric fixes the shape of a per-token band: for a token with sampler probability p=πold(a∣s)p=\pi_{\rm old}(a\mid s), the probability the sampler gave the token in question and a trust-region budget the size of the trust region, a small number such as 0.02, made precise as a χ2\chi^2 budget below, the band is ∣ρ−1∣≲δ/p|\rho-1|\lesssim\sqrt{\delta/p}, the clip of Riemannian isometric policy optimization (Cai et al., 2026), a GRPO variant whose clip range for each token is δ/p\sqrt{\delta/p} in place of a constant. PPO's box is flat in pp, so in the Fisher metric it lets likely tokens move far while holding rare ones almost fixed. From there, principled rules differ in two choices. One is which divergence governs where the quadratic approximation fails, for rare tokens and for tokens holding nearly all the mass. The other is what gets bounded: the sampled token alone, the whole next-token distribution at a position, or the total along a response, which the error bound for long responses charges.

Whatever band a rule uses, it must measure distance from the probabilities the sampler recorded. divergence proximal policy optimization (Qi et al., 2026): PPO's objective with the ratio test replaced by a mask that blocks a token's update when an estimate of the divergence at its position passes a threshold τ\tau and the update moves further away masks tokens using a direct estimate of the divergence at their position. It trains stably when that estimate uses the sampler's recorded probabilities, and collapses when it uses the trainer's recomputed ones instead.

The surrogate matches the true objective's value and gradient at πθ=πold\pi_\theta=\pi_{\rm old}. Because it evaluates πθ\pi_\theta on prefixes drawn by πold\pi_{\rm old}, it ignores how the update shifts which prefixes occur. TRPO (Schulman et al., 2015) bounds the resulting error by a constant times the largest advantage times the largest KL divergence over states. CPO (Achiam et al., 2017) replaces that worst-case maximum with the DTV(s)=12∑a∣πθ(a∣s)−πold(a∣s)∣D_{\rm TV}(s)=\tfrac12\sum_a|\pi_\theta(a\mid s)-\pi_{\rm old}(a\mid s)|, half the summed absolute change of the next-token probabilities at a prefix ss DTV(s)=12∑a∣πθ(a∣s)−πold(a∣s)∣D_{\rm TV}(s)=\tfrac12\sum_a|\pi_\theta(a\mid s)-\pi_{\rm old}(a\mid s)| averaged over states visited by πold\pi_{\rm old}, which a batch can estimate.

Qi et al. (2026) adapt these bounds to responses of at most TT tokens with one terminal reward RR satisfying ∣R∣≤ξ|R|\le\xi. Write JJ for expected reward, ρt\rho_t for the ratio of token tt after prefix sts_t, DTVmax⁡=max⁡sDTV(s)D^{\max}_{\rm TV}=\max_sD_{\rm TV}(s), and L=Eπold[R∑t(ρt−1)]L=\mathbb E_{\pi_{\rm old}}\big[R\sum_t(\rho_t-1)\big] for the unclipped surrogate gain. Then the true improvement J(πθ)−J(πold)J(\pi_\theta)-J(\pi_{\rm old}) is at least bothL−2ξT(T−1)(DTVmax⁡)2 andL−4ξ Eπold∑tDTV(st).\begin{aligned}&L-2\xi T(T-1)\big(D^{\max}_{\rm TV}\big)^2\ \text{and}\\&L-4\xi\,\mathbb E_{\pi_{\rm old}}\textstyle\sum_tD_{\rm TV}(s_t).\end{aligned}The first bound matches TRPO's form with horizon TT. The second grows only linearly with length and charges the per-position divergences summed along a sampled response. Neither gives a usable certificate at LLM lengths. For multi-thousand-token responses, T(T−1)T(T-1) runs into the millions. For the second bound, ∣L∣≤2ξ Eπold∑tDTV(st)|L|\le2\xi\,\mathbb E_{\pi_{\rm old}}\sum_tD_{\rm TV}(s_t) (computed here, not in the paper), so its right side is never positive and only limits how far reward can fall.

The quadratic Fisher form comes from expanding the KL divergence at one prefix. Fix ss and drop it from the notation, writing πold(a)\pi_{\rm old}(a), πθ(a)\pi_\theta(a), and ρ(a)\rho(a) for token aa. In DKL(πold∥πθ)=∑aπold(a)(−log⁡ρ(a))D_{\rm KL}(\pi_{\rm old}\|\pi_\theta)=\sum_a\pi_{\rm old}(a)(-\log\rho(a)), expand −log⁡ρ=−(ρ−1)+12(ρ−1)2−…-\log\rho=-(\rho-1)+\tfrac12(\rho-1)^2-\dots. The first-order term is ∑aπold(a)(ρ(a)−1)=∑a(πθ(a)−πold(a))=0\sum_a\pi_{\rm old}(a)(\rho(a)-1)=\sum_a(\pi_\theta(a)-\pi_{\rm old}(a))=0, since both distributions sum to one. The second-order term can be written three ways:DKL(πold∥πθ)≈12∑aπold(a)(ρ(a)−1)2=12∑a(πθ(a)−πold(a))2πold(a)≈2∑a(πθ(a)−πold(a))2.\begin{aligned}&D_{\rm KL}(\pi_{\rm old}\|\pi_\theta)\\&\approx\tfrac12\textstyle\sum_a\pi_{\rm old}(a)\big(\rho(a)-1\big)^2\\&=\tfrac12\textstyle\sum_a\dfrac{\big(\pi_\theta(a)-\pi_{\rm old}(a)\big)^2}{\pi_{\rm old}(a)}\\&\approx2\textstyle\sum_a\big(\sqrt{\pi_\theta(a)}-\sqrt{\pi_{\rm old}(a)}\big)^2.\end{aligned}The middle expression is the Fisher metric. In the last expression, π\sqrt{\pi} lies on the unit sphere because ∑a(π(a))2=1\sum_a(\sqrt{\pi(a)})^2=1. The metric is therefore Euclidean distance on that sphere, and a small trust region is a spherical cap around πold\sqrt{\pi_{\rm old}}. A probability change Δπ\Delta\pi moves a token's sphere coordinate by about Δπ/(2p)\Delta\pi/(2\sqrt{p}), so the same probability shift costs more on a rarer token.

Every smooth Df(πθ∥πold)=∑aπold(a) f(ρ(a))D_f(\pi_\theta\|\pi_{\rm old})=\sum_a\pi_{\rm old}(a)\,f(\rho(a)) for a convex ff with f(1)=0f(1)=0; KL in either direction, the squared Hellinger distance ∑a(πθ(a)−πold(a))2\sum_a(\sqrt{\pi_\theta(a)}-\sqrt{\pi_{\rm old}(a)})^2, Pearson χ2\chi^2 and total variation are of this form Df(πθ∥πold)=∑aπold(a)f(ρ(a))D_f(\pi_\theta\|\pi_{\rm old})=\sum_a\pi_{\rm old}(a)f(\rho(a)) with ff twice differentiable at 1 shares that second-order term scaled by f′′(1)f''(1). To second order, all of them define the same trust region. Pearson χ2\chi^2 has f′′(1)=2f''(1)=2, KL in either direction has 1, and squared Hellinger distance ∑a(πθ(a)−πold(a))2\sum_a(\sqrt{\pi_\theta(a)}-\sqrt{\pi_{\rm old}(a)})^2 has 12\tfrac12. For small steps, ∣ρ−1∣≪1|\rho-1|\ll1, a χ2\chi^2 budget δ\delta therefore matches a KL budget δ/2\delta/2 and a squared-Hellinger budget δ/4\delta/4. On a single token's band, that small-step condition needs pp well above δ\delta. By p≈δp\approx\delta, the band already reaches ∣ρ−1∣≈1|\rho-1|\approx1 and the exact bands have parted. Total variation, with f(u)=12∣u−1∣f(u)=\tfrac12|u-1|, has a kink at 1 and is the exception. Because it grows to first order in the change, no budget on it matches δ\delta to second order.

Spending the entire budget on one token produces the square-root band. Measure the trust region by χ2=∑aπold(a)(ρ(a)−1)2\chi^2=\sum_a\pi_{\rm old}(a)(\rho(a)-1)^2, the second-order form above without its 12\tfrac12, so that to second order it is twice the KL divergence. Because Ea∼πoldρ(a)=∑aπθ(a)=1\mathbb E_{a\sim\pi_{\rm old}}\rho(a)=\sum_a\pi_\theta(a)=1, it equals the variance of the ratio under the sampler:χ2=∑aπold(a)(ρ(a)−1)2=Var⁡a∼πoldρ(a).\begin{aligned}\chi^2&=\textstyle\sum_a\pi_{\rm old}(a)\big(\rho(a)-1\big)^2\\&=\operatorname{Var}_{a\sim\pi_{\rm old}}\rho(a).\end{aligned}Capping the sampled token's own term at the full budget δ\delta givesp (ρ−1)2≤δ  ⟺  ∣ρ−1∣≤δ/p.\begin{aligned}p\,(\rho-1)^2&\le\delta\\\iff|\rho-1|&\le\sqrt{\delta/p}.\end{aligned}This is RIPO's clip, derived from second-order KL with the factor 2 absorbed into δ\delta. At the band's edge every token contributes δ\delta to Var⁡ρ\operatorname{Var}\rho, which RIPO calls homoscedasticity. Without any expansion, χ2\chi^2 also bounds a KL divergence exactly by Jensen's inequality:DKL(πθ∥πold)=Eπθlog⁡ρ≤log⁡Eπθρ=log⁡(1+χ2)≤χ2.\begin{aligned}D_{\rm KL}(\pi_\theta\|\pi_{\rm old})&=\mathbb E_{\pi_\theta}\log\rho\\&\le\log\mathbb E_{\pi_\theta}\rho\\&=\log(1+\chi^2)\le\chi^2.\end{aligned}PPO's flat box ∣ρ−1∣≤ε|\rho-1|\le\varepsilon instead takes a fixed step in log⁡π\log\pi, so the token's χ2\chi^2 share pε2p\varepsilon^2 grows with pp. At ε=0.2\varepsilon=0.2, PPO lets a token at probability 0.8 rise to 0.96 while holding one at 0.01 to 0.012. At δ=0.02\delta=0.02, the square-root band gives 0.93 and 0.024, a principled form of DAPO's asymmetric clip, which raises PPO's upper clip range from 0.2 to 0.28 and keeps the lower one, so that rare tokens can rise further. Reading notes: DAPO and Dr. GRPO, Popular and rare tokens. PPO itself was not derived from a divergence. It takes the minimum of clipped and unclipped surrogates as a pessimistic lower bound, so pushing ρ\rho past the box earns nothing.

The divergences part where second order breaks down, first when one token holds nearly all the probability. Moving that token from pp to pρp\rho forces the other tokens to absorb the shift out of their small remaining mass 1−p1-p. The cheapest way to make that move scales every other token by (1−pρ)/(1−p)(1-p\rho)/(1-p), which minimizes both KL by the log-sum inequality and χ2\chi^2 by Cauchy-Schwarz. Every other token's ratio shifts by −p(ρ−1)/(1−p)-p(\rho-1)/(1-p), adding its cost to the two-outcome χ2\chi^2:χ22=p(ρ−1)2+(1−p)(p(ρ−1)1−p)2=p(ρ−1)21−p.\begin{aligned}\chi^2_2&=p(\rho-1)^2\\&\quad+(1-p)\Big(\frac{p(\rho-1)}{1-p}\Big)^2\\&=\frac{p(\rho-1)^2}{1-p}.\end{aligned}Near p=1p=1, the factor 1/(1−p)1/(1-p) dominates and the band shrinks as δ(1−p)/p\sqrt{\delta(1-p)/p}. Exact DKL(πold∥πθ)D_{\rm KL}(\pi_{\rm old}\|\pi_\theta) never lets the token take all mass, since it diverges once other tokens hit zero. RIPO counts only the token's own term, so its upper limit 1+δ/p1+\sqrt{\delta/p} passes the maximum possible ratio 1/p1/p at p≈0.87p\approx0.87 for δ=0.02\delta=0.02, and at p=0.8p=0.8 for its default δ=0.05\delta=0.05. Above that point a likely token can take all the probability in one update, just as PPO's box allows for p≥1/(1+ε)p\ge1/(1+\varepsilon). The same 1/(1−p)1/(1-p) factor makes PPO's box loose on the way down. Lowering a token from 0.99 to 0.80 gives a ratio of 0.81, which stays inside the box, yet moves 0.19 of mass and incurs χ22≈3.6\chi^2_2\approx3.6.

For rare tokens the order reverses. Once a token's gain is much larger than pp, exact DKL(πold∥πθ)D_{\rm KL}(\pi_{\rm old}\|\pi_\theta), squared Hellinger, and total variation all charge roughly the absolute probability moved. Each therefore allows a gain near its own budget regardless of pp, whereas the χ2\chi^2 band allows only δp\sqrt{\delta p}. At p=10−4p=10^{-4} and δ=0.02\delta=0.02, the matched KL budget δ/2\delta/2 lets the token gain 0.010 of probability against 0.0014 for the χ2\chi^2 band. A total-variation radius of δ/2\delta/2, giving ρ−1≤δ/(2p)\rho-1\le\delta/(2p), matches the KL band's rare-token limit. TRGPPO (Wang et al., 2019) uses the exact two-outcome KL band, solved per token and widened to contain PPO's box. DCPO (Yang et al., 2025) bounds ∣ρ−1∣ πθ(a∣s)≤ε|\rho-1|\,\pi_\theta(a\mid s)\le\varepsilon, giving ρ≈ε/p\rho\approx\sqrt{\varepsilon/p} for rare tokens. It reaches the same square-root scaling from an importance-sampling variance argument.

DPPO arrives at a probability-difference band directly from total variation. At a prefix, DTV=12Ea∼πold∣ρ(a)−1∣D_{\rm TV}=\tfrac12\mathbb E_{a\sim\pi_{\rm old}}|\rho(a)-1|. PPO's check on the sampled token's ∣ρ−1∣|\rho-1| is therefore a one-sample estimate of twice the distance, while the token's actual share of the sum is p ∣ρ−1∣=∣Δπ∣p\,|\rho-1|=|\Delta\pi|. The ratio overstates a rare token's share by 1/p1/p (computed here; the paper argues from examples). Raising a token from 10−410^{-4} to 10−210^{-2}, roughly what the matched KL budget allows, gives a ratio of 100 and is clipped. DPPO's binary total variation ∣πθ(a∣s)−p∣≤τ|\pi_\theta(a\mid s)-p|\le\tau instead allows the same absolute change at every pp.

DPPO keeps PPO's objective and replaces only the clipping test with a divergence mask. It maximizes E[∑tMtρtA^]\mathbb E\big[\sum_tM_t\rho_t\hat A\big] with the mask held fixed in the gradient,Mt={0,D^t>τ, (ρt−1)A^>0,1,otherwise,M_t=\begin{cases}0,&\hat D_t\gt\tau,\ (\htmlData{gr=gn7}{\rho_t}-1)\hat A\gt0,\\1,&\text{otherwise,}\end{cases}where DPPO's estimate of the total variation or KL divergence between πold\pi_{\rm old} and πθ\pi_\theta at the prefix sts_t, binary or top-KK, computed from the probabilities the sampler recorded estimates the divergence at prefix sts_t. The mask blocks an update only when the divergence has passed τ\tau and the ratio pushes further in the advantage's direction. A move back toward ratio 1 is never blocked. Setting D^t=∣ρt−1∣\hat D_t=|\rho_t-1| and τ=ε\tau=\varepsilon recovers PPO's clipped objective.

Computing a full-vocabulary divergence at every token takes too much memory, so DPPO groups tokens to form D^t\hat D_t. The binary version compares the sampled token against all others, giving the binary total variation above or two-outcome KL. The top-KK version keeps the sampled token and the K=20K=20 most likely tokens under the sampler, merging the remaining tail. That limit comes from vLLM, which reports at most 20 log-probabilities per position. By the triangle inequality for total variation and the log-sum inequality for KL, merging can only hide mass moving within a group. Both estimates are therefore lower bounds. The mask blocks no update the exact divergence would allow, though it may allow some the exact divergence would block. For top-KK total variation, the gap comes solely from the merged tail and is at most the average tail probability under the two policies. In one of DPPO's large settings, the binary estimate matched top-20.

Bounding the sampled token's term is necessary for χ2≤δ\chi^2\le\delta at its position, since every term is nonnegative, but not sufficient because unsampled tokens can move freely. Truly PPO (Wang et al., 2019) proves that with three or more actions, constraining the sampled action's ratio leaves state KL unbounded. DPPO's top-KK estimate closes this gap approximately, while TRM (Li et al., 2025) closes it exactly by computing full-vocabulary KL from stored sampler logits. Because the averaged error bound sums divergences along the response, a fixed cap at each position still lets the total grow with length. TRM drops any response whose largest per-position KL exceeds a threshold, and can also cap the mean. CPPO (Mao et al., 2026) sets tighter per-position caps at early positions, whose effects persist longer, and caps a weighted average along every prefix. second-moment trust policy optimization (Zheng et al., 2025), which masks the tokens with the largest (log⁡ρ)2(\log\rho)^2 until the mean of (log⁡ρ)2(\log\rho)^2 over the batch's tokens that a clip could act on is at most 0.04, and weights the rest by their plain ratio. Reading note: Weighting stale samples in off-policy RL caps the batch mean of (log⁡ρ)2(\log\rho)^2 over clip-eligible tokens, which to second order estimates the mean per-position χ2\chi^2.

A sequence ratio does not bound a divergence. group sequence policy optimization: one ratio per response, exp⁡\exp of the mean of the token log-ratios, clipped to within 4×10−44\times10^{-4} of 1. Reading note: Group Sequence Policy Optimization clips exp⁡\exp of the mean of log⁡ρ\log\rho over a response. Each log⁡ρ\log\rho takes either sign, with expectation −DKL(πold∥πθ)-\htmlData{gr=gn10}{D_{\rm KL}(\pi_{\rm old}\|\pi_\theta)} under the sampler. Tokens that rose cancel tokens that fell, so a response can sit near ratio 1 while many of its tokens moved far.

A mask stops a token's gradient at the band's edge, whereas a penalty keeps a gradient pulling the token back. PPO's paper found an adaptive KL penalty worse than clipping on MuJoCo. MDPO (Tomar et al., 2022) instead penalizes DKL(πθ∥πold)D_{\rm KL}(\pi_\theta\|\pi_{\rm old}) with an annealed step size and full-batch steps, and beat PPO on every reported task. A per-token quadratic penalty places its band at its stationary point, where the derivative of ρA^\rho\hat A minus the penalty vanishes. SPO (Xie et al., 2025) subtracts ∣A^∣2ε(ρ−1)2\frac{|\hat A|}{2\varepsilon}(\rho-1)^2 and stops at PPO's box ρ=1±ε\rho=1\pm\varepsilon. DRPO (Yao et al., 2026) subtracts ∣A^∣2τ p (ρ−1)2\frac{|\hat A|}{2\tau}\,p\,(\rho-1)^2 and stops at ∣πθ(a∣s)−p∣=τ|\pi_\theta(a\mid s)-p|=\tau, DPPO's band.

DPPO's stability tests show that the reference policy matters as much as the band. Training R1-Distill-Qwen-1.5B on MATH with 4 gradient steps per batch in BF16 exposes the mismatch between the sampling and training engines. Without a trust region, or with each token's ratio capped at 3 as in a policy-gradient loss that keeps every token's gradient and multiplies it by the importance ratio truncated at a cap; it masks no token. Reading note: Scaling RL compute, that engine gap grows until training collapses. DPPO with binary total variation or KL keeps the gap small and reaches near-perfect training reward. Measured from the trainer's recomputation of πold\pi_{\rm old} instead of the sampler's recorded probabilities, the trust region fails. MiniRL, which clips against the recomputation, collapses despite clipping, and DPPO collapses as well when only its reference is swapped. Divergence from the recomputation is zero before the first update regardless of mismatch, so it leaves engine drift unchecked. Using the sampler's recorded probabilities also skips the recomputation pass, saving about 25% of training cost by a cited estimate.

Ablations in the same setup isolate which updates drive instability. Starting from the unconstrained run, masking only updates on wrong responses that lower a token's probability by at least 0.5 restores stability. Those updates are at most 0.5% of the total, and raising the threshold to 0.8 fails. Truncation hurts. Capping the whole ratio πθ/πold\pi_\theta/\pi_{\rm old} at 3 made the unconstrained and MiniRL runs collapse sooner. The authors attribute this, without a direct test, to the cap falling mostly on rare tokens, whose ratios vary most. Relaxing PPO's box where it is strictest also helps. Removing both clip ends for tokens below probability 0.1 made Qwen3-1.7B-Base learn substantially faster than GRPO with clip-higher while staying stable. Removing only the lower end let wrong responses push rare tokens down until entropy collapsed.

How much the band's shape matters depends on how off-policy training is. The Qwen team's stabilization study (Zheng et al., 2025) trained a cold-start fine-tune of Qwen3-30B-A3B-Base with one gradient step per batch. There, the plain policy gradient, corrected only by the engine importance weight, ran most stably and scored highest. Once each batch was split into two or more minibatches, both clipping and recording which experts each token was routed to and reusing those choices when its probability is recomputed, so that a small weight change cannot switch a token's experts. Reading note: Group Sequence Policy Optimization became necessary to prevent collapse. Khatri et al. (2025): a compute-scaling study of RL recipes for language models that fits sigmoid curves of reward against compute and compares design choices by their fitted ceiling and efficiency. Reading note: Scaling RL compute tested samples up to 8 updates old and found that PPO's upper clip shifts the reward ceiling, whereas a truncated importance-weighted policy gradient was insensitive to its cap. Both leveled off at similar reward on a fixed recipe.

At 8 updates per batch, RIPO achieved the best average over seven math benchmarks on all four models it trained, beating the strongest of five other clipping rules by 0.6 to 3.2 points. DPPO learned faster and finished higher on AIME 2024 and 2025 than both CISPO and GRPO with clip-higher across all five large settings on Qwen3-30B-A3B and Qwen3-8B. Its results changed little across total-variation thresholds from 0.10 to 0.20, and it beat both baselines even without routing replay when the baselines used it.

The evidence has clear limits. RIPO's and DPPO's results are single runs. RIPO's default δ\delta is the best value from an ablation scored on AIME24, one of its test benchmarks. DPPO's large-scale comparisons are read off curves on 30-problem AIME sets, and its account of collapse rests on which masks stabilize one 1.5B model. TRM, CPPO, and DRPO report no seeds either. TRGPPO, Truly PPO, MDPO, and SPO were tested only on control benchmarks such as MuJoCo and Atari, not on language models.

Terms

Second-order divergence
DKL≈12∑a(Δπ(a))2/πold(a)≈2∑a(Δπ(a))2D_{\rm KL}\approx\tfrac12\sum_a(\Delta\pi(a))^2/\pi_{\rm old}(a)\approx2\sum_a(\Delta\sqrt{\pi(a)})^2, the Fisher metric, Euclidean on the sphere of π\sqrt\pi
Calibration
for ∣ρ−1∣≪1|\rho-1|\ll1, a χ2\chi^2 budget δ\delta is a KL budget δ/2\delta/2 and a squared-Hellinger budget δ/4\delta/4; total variation has no second-order term
Finite-horizon bounds
J(πθ)−J(πold)≥L−4ξ E∑tDTV(st)J(\pi_\theta)-J(\pi_{\rm old})\ge L-4\xi\,\mathbb E\sum_tD_{\rm TV}(s_t), linear in length; it never certifies a gain
Square-root band
p(ρ−1)2≤δp(\rho-1)^2\le\delta, so ∣ρ−1∣≤δ/p|\rho-1|\le\sqrt{\delta/p}: RIPO's clip
χ2\chi^2 as a variance
χ2=Var⁡πoldρ\chi^2=\operatorname{Var}_{\pi_{\rm old}}\rho, and DKL(πθ∥πold)≤log⁡(1+χ2)D_{\rm KL}(\pi_\theta\|\pi_{\rm old})\le\log(1+\chi^2)
PPO's box
a fixed step in log⁡π\log\pi; the token's share pε2p\varepsilon^2 of χ2\chi^2 grows with pp
Dominant tokens
the exact cost p(ρ−1)2/(1−p)p(\rho-1)^2/(1-p) carries 1/(1−p)1/(1-p); RIPO's band stops binding near p=0.87p=0.87 at δ=0.02\delta=0.02
Rare tokens
exact KL, Hellinger and total variation allow a gain of about their budget; χ2\chi^2 allows δp\sqrt{\delta p}
Ratio as one sample
DTV=12Eπold∣ρ−1∣D_{\rm TV}=\tfrac12\mathbb E_{\pi_{\rm old}}|\rho-1|; PPO tests one draw, which overstates a rare token's share p∣ρ−1∣p|\rho-1| by 1/p1/p
DPPO's mask
block a token when D^t>τ\hat D_t\gt\tau and (ρt−1)A^>0(\rho_t-1)\hat A\gt0; binary and top-KK estimates are lower bounds
Reference
measure from the sampler's recorded probabilities; measured from the trainer's recomputation, DPPO and PPO clips collapsed
What is bounded
the sampled token (PPO, RIPO), the whole distribution at a position (DPPO, TRM), or a response or batch (TRM's response mask, CPPO's prefix averages, M2PO's batch mean)
Sequence ratio
GSPO clips a signed mean of log⁡ρ\log\rho, where rises and falls cancel
Penalty or mask
a per-token quadratic penalty's stationary point is its band: SPO gives PPO's box, DRPO gives DPPO's
Where the rule matters
off-policy updates; one step per batch did best with the plain importance-corrected policy gradient

Sources

Connected notes

  • Under covariate shift each calibration point is weighted by w(xi)=dP~X/dPXw(x_i)=d\tilde P_X/dP_X, and the test point's own weight sits on +∞+\infty, so a test point far from the training data gets an infinite band, which correctly signals that the method cannot extrapolate to it.

  • With two gradient steps per batch the PPO loss is clipped on fewer than 5% of tokens, and turning clipping off, then dropping the ratio as well, does not hurt, since the policy has little room to move far from the one that sampled the data.

  • A change in base rates multiplies the old posterior by the prior ratio and renormalizes, which in logits adds logit⁡π−logit⁡πt\operatorname{logit}\pi-\operatorname{logit}\pi_t and uses nothing about the learner.

  • Because a token's ratio satisfies ρ≤1/πold\rho\le 1/\pi_{\rm old}, any token above 1/(1+ε)≈0.831/(1+\varepsilon)\approx 0.83 can never hit GRPO's upper clip, so even under zero-mean random rewards downward steps clip and rebound while upward steps drift unchecked, raising Qwen2.5-Math-7B by 21.4 points on MATH500 until clipping is removed.

Threads