Chapter 06 · Reasoning

RL with verifiable rewards & reasoning

When the reward is a program that checks the answer, RL stops being a fight with a learned judge and becomes a search problem. This chapter derives GRPO and its successors, takes apart entropy collapse and length bias, and asks the uncomfortable question: is RL teaching models to reason, or only teaching them to stop missing?

⏱ 70 min9 interactivesPrereq: Ch. 02 (PPO, k1–k3), Ch. 04 (KL-regularized RL)
In one breath
  • RLVR replaces the learned reward model with a checker (answer match, unit tests, constraint checks). Nothing in the reward can be fooled by eloquence, but the policy can still exploit the checker: weak tests, lenient parsers, hedged answers.
  • GRPO is REINFORCE with a per-prompt group baseline plus PPO clipping: sample $G$ answers, advantage $=(r_i-\bar r)/\sigma$, no critic. Its two normalizations, $1/|o_i|$ and $1/\sigma$, are where most of 2025's fixes live: Dr. GRPO, DAPO, GSPO, CISPO.
  • Entropy collapses because the entropy change is minus the covariance between log-probability and advantage. Confident and correct means less exploration. Clip-higher, covariance-targeted clipping and dropping zero-advantage groups are the standard countermeasures.
  • Sharpen or discover? RLVR reliably raises pass@1. At large k the base model often catches up, which suggests RL mostly concentrates what the model could already do; prolonged, diverse RL (ProRL) may go further. Treat this as the standard picture, not a proven one: a visible crossing can be noise, and even a real one does not show that nothing new was learned. Spurious-reward gains on Qwen2.5-Math teach the same habit: run baselines, on fresh problems, with re-checked labels.
  • Test-time compute is the other axis: majority vote, best-of-N with a verifier, PRM-guided search, and long serial thinking. Each saturates or breaks in a characteristic way, and the compute-optimal choice depends on problem difficulty.

§1Verifiable rewards: the reward you cannot sweet-talk

RLHF learns a reward from human preferences and then optimizes against it, and Chapter 03 showed what happens next: the policy finds the reward model's blind spots. For a large class of tasks we do not need a learned judge at all. A math answer either equals the reference or it does not. A program either passes the tests or it does not.

RLVR is the KL-regularized objective of Chapter 04 with the reward model swapped for a deterministic checker. Tülu 3 (Lambert et al., 2024) wrote it as:

$$\begin{gathered}\max_{\theta}\;\E_{x\sim\mathcal D,\;y\sim\pit(\cdot\mid x)}\Big[\htmlClass{t-v}{v(x,y)}\Big]\;-\;\htmlClass{t-b}{\beta}\,\KL\!\big(\pit(\cdot\mid x)\,\|\,\htmlClass{t-ref}{\piref(\cdot\mid x)}\big)\\[4pt] \htmlClass{t-v}{v(x,y)}=\htmlClass{t-a}{\alpha}\cdot\mathbb 1\big[\htmlClass{t-chk}{\mathrm{verify}(x,y)}\big]\end{gathered}$$
  • Verifiable reward: a constant if the completion checks out, 0 otherwise. No gradient flows through it; it is just a number per sample.
  • Checker: answer extraction + equivalence (math), test execution (code), constraint functions (instruction following).
  • α: Tülu 3 used α = 10, chosen from pilot runs and not tuned further.
  • β: KL strength. Tülu 3's final 8B run used β = 0.05; many reasoning recipes drop the KL entirely (see §5).
  • Reference: the starting checkpoint (in Tülu 3, the DPO model).

Tülu 3 ran this with PPO, a value model initialized from a general reward model, about 30k prompts (GSM8K, MATH, IFEval-style constraints), and a −10 penalty for completions with no end-of-sequence token. Gains were modest at that scale (8B: MATH 42.0 → 43.7, GSM8K 84.3 → 87.6, IFEval 81.1 → 82.4). Two findings matter more. First, adding reward-model scores on top of the verifiable reward did not help: on GSM8K, verifiable rewards alone scored better. Second, overoptimization still appeared as β decreased: a model optimized hard against the checker drifted away from things it does not measure.

The verifier zoo

DomainCheckerTypical failure
Math (final answer)Extract the last \boxed{}, normalize, compare symbolically (e.g. SymPy)False negatives on equivalent forms; false positives on hedged multi-answer outputs
CodeRun hidden unit tests in a sandbox; reward = all pass (or fraction passed)Weak or incomplete tests; special-casing; tampering with the harness
Instruction followingConstraint functions ("exactly 3 bullet points", "no commas")Satisfies the letter, destroys the content
FormatRegex for <think>…</think>, one boxed answer, language IDCheap to satisfy; can dominate early training
"Soft-verifiable" (chat, science)LLM judge against a reference answer or rubricJudge exploitation: length bias, persuasion, format tricks

The open recipes of 2025 converged on exactly this menu. Olmo 3's OlmoRL (Team Olmo, 2025) uses a SymPy math checker, test-case execution for code (they compared partial credit with all-or-nothing), all-constraints-satisfied for instruction following, and LM judges for chat. Magistral (Mistral, 2025) adds a 0.1 format reward, +0.9 for correctness, a soft length penalty and +0.1 for language consistency.

Eight outputs for "probability of exactly one head in two fair flips". Click a column header to inspect a checker. Strict checkers produce false negatives (gold); the hedge in row 5 fools even exact-string matching, and the lenient judge rewards three wrong answers (false positives, red). "Last number" rejects every wrong output by also rejecting three right ones. RL treats every verdict as truth.

Why verifiable rewards resist hacking, and where they don't

A learned reward model is a function approximator queried far outside its training distribution, and the policy is an optimizer searching for adversarial inputs. A checker is different in kind: on the inputs it was designed for, its output is the quantity we care about. DeepSeek-R1 cites exactly this for its choice: neural reward models are "susceptible to reward hacking during large-scale reinforcement learning" (DeepSeek-AI, 2025).

The hedge is "on the set of inputs it was designed for". The policy does not stay inside that set. The failure modes are concrete:

Analogy

A reward model is a tired teaching assistant, charmed by confident prose. A verifier is the answer key at the back of the book. You cannot charm it. But if it only checks the last line of your working, you will learn to write a good last line. And if it is stored on your desk (the test harness is inside the sandbox), you will learn to edit it.

Where it breaks: students know learning from gaming. A policy just climbs whatever gradient exists; "hacking" is optimization finding a high-reward region you did not intend.

Pitfall: the checker is part of the training distribution

Audit the checker like a security boundary: one canonical answer per output, sandboxed execution where the policy cannot touch the tests, held-out tests the policy never sees, and periodic manual reads of high-reward samples. Do not judge a checker by its error rate alone: the same rate can do very different damage depending on what its errors look like. In the experiments so far, random flips of a verdict mostly slow training, while a systematic false positive gives the policy something to learn, and the damage depends on what triggering it teaches. Do not expect training curves to warn you, since one theoretical result suggests they generally cannot reveal accepted errors. Keep a separate audit stream.

The evidence on verifier errors

Egashira et al. (2026), in arithmetic experiments: systematic false negatives act like random noise, while systematic false positives range from plateau to collapse depending on the pattern, not the rate. One pattern's rate climbed to nearly 1 by about step 50. Plesner et al. (2026), on Qwen3 8B code tasks: late reward within a point of clean through 20% group-level noise, with the caution that their intervals allow larger losses. Moya et al. (2026) argue in theory that the observations available during RLVR generally cannot reveal accepted errors.

Your math checker accepts a sample if any \boxed{} in it is equivalent to the reference. After 200 RL steps, accuracy on the training set rises from 40% to 70%, but held-out accuracy (graded with a strict single-answer checker) is flat. The most likely explanation:
A lenient checker rewards hedging, and hedging is easy to learn. The divergence between the training checker and a stricter held-out checker is the tell. Enforce exactly one distinct boxed answer.

§2The reasoning-model turn

Between September 2024 and mid-2025, RL on verifiable tasks went from a post-training detail to the main event. Models learned to "think" in long chains of thought, and competition-math accuracy rose with both training compute and thinking length.

OpenAI o1: what was actually said

OpenAI's September 2024 post ("Learning to reason with LLMs") disclosed almost no method:

A lesson in test-time compute (§8): voting buys 9 points, and a learned verifier over 1000 samples 10 more.

DeepSeek-R1-Zero: pure RL from a base model

DeepSeek-R1 (arXiv, January 2025; peer-reviewed in Nature, September 2025) answered the "how" in public. R1-Zero applies GRPO directly to DeepSeek-V3-Base with no supervised fine-tuning, using only two rule-based rewards: accuracy and format (reasoning inside <think> tags).

Reported R1-Zero hyperparameters: learning rate 3e-6, KL coefficient 0.001, 16 samples per question, 32 questions per step, maximum length 32,768 then 65,536 tokens, 10,400 steps, reference refreshed every 400 steps.

The aha moment, re-examined

Many small-scale replications reported their own "aha moments". Then Liu et al. (2025) deflated the story on three counts:

  1. The behavior predates RL. DeepSeek-V3-Base already produces "Aha" and "wait"-style self-reflection. Qwen2.5 base models answer competition questions well without a prompt template, suggesting pretraining on question–answer text.
  2. Reflection does not track accuracy. Nearly half of self-reflecting R1-Zero-style responses are no more accurate than those that do not.
  3. Length growth is partly an artifact. GRPO's length normalization favors long wrong answers (§4). With the bias removed, length grows less.

Gandhi et al. (2025) give the positive version of the same point. Under identical RL on Countdown, Qwen-2.5-3B far outperforms Llama-3.2-3B; the difference is whether the base model already exhibits four cognitive behaviors: verification, backtracking, subgoal setting and backward chaining. Priming Llama with such traces closes the gap, even when the primed solutions are wrong. RL amplifies behaviors the base model can already produce.

Key idea

What looks like emergence under RL is often selection: a behavior present at low probability in the base model gets reinforced because trajectories containing it are correct slightly more often. Selection over long sequences can still compose behaviors in ways no single pretraining document shows, but expect less from a weaker base model.

Subgoal setting. The model reformulates the problem (work modulo 7) and plans: find the residues, then count. It is one of the four behaviors Gandhi et al. found predictive of RL success.

A first, wrong answer. It finds one residue (n ≡ 2) and stops. If generation ended here, the verifier would return 0. Short-CoT models often do end here.

"Wait": backtracking. The model notices that a quadratic modulo a prime can have two roots and resumes the search. In R1-style traces this token is frequent, and under the base model it is a low-probability token, which is why CISPO's authors worried about clipping it away (§5).

Verification by a different route. It confirms the two roots with Vieta's formula (their sum must be −1 ≡ 6 mod 7). Then it makes a second mistake while counting the n ≡ 4 values.

Checking the boundary. Re-deriving the endpoint (4 + 7·14 = 102 > 100) catches the off-by-one. Total 15 + 14 = 29.

The verifier sees one line. Reward 1. All ~370 thinking tokens, including the two mistakes, receive the same positive advantage. Credit assignment comes only from averaging over many samples.

What to take away. Reflection helps when it changes the answer, as here, but in RL-trained traces it often changes nothing (Liu et al.). The text of a chain of thought is evidence about the computation, not a transcript of it (§9).

R1: making it usable, and the distillation result

R1 itself wraps RL in a four-stage pipeline: (1) a cold start of thousands of curated long-CoT examples; (2) reasoning-focused RL with an added language-consistency reward (the fraction of target-language words in the CoT); (3) rejection sampling from that checkpoint to build about 600k reasoning and 200k non-reasoning SFT examples, used to fine-tune V3-Base again; (4) a final RL stage over all scenarios with rule-based and preference rewards. R1 reaches 79.8% on AIME 2024 and 97.3% on MATH-500.

The most consequential table in the paper compares two ways of giving a 32B model reasoning ability:

Qwen2.5-32B variantAIME 2024 pass@1AIME cons@64MATH-500GPQA DiamondLiveCodeBench
R1-Zero-style RL on Qwen-32B (large-scale)47.060.091.655.040.2
Distilled from R1 (SFT on R1 traces)72.683.394.362.157.2

DeepSeek's conclusion: distilling a stronger model beats large-scale RL on the smaller one, but pushing past the frontier still needs stronger base models and larger-scale RL. What did not work: process reward models (hard to define steps, hard to label them, and the PRM gets hacked) and MCTS (the token-level search space is enormous and the value model is hard to train).

The 2025 wave

ReportWhat is distinctive about its reasoning RL
Kimi k1.5 (Jan 2025)RL context scaled to 128k with partial rollouts (trajectories resume across iterations). Online mirror descent with a squared log-ratio regularizer and mean-reward baseline; no value network, on purpose: a critic would penalize exploratory wrong steps the model later recovers from. A group-relative length penalty, and "long2short" compression.
Qwen3 (May 2025)Long-CoT cold start → reasoning RL on only 3,995 query–verifier pairs with GRPO (AIME'24 70.1 → 85.1 over 170 steps for the 235B MoE) → thinking-mode fusion (/think, /no_think) → general RL. A thinking budget: when reached, the system inserts a sentence telling the model to answer now, and closes the think block.
MiniMax-M1 (Jun 2025)456B hybrid-attention MoE; full RL on 512 H800s for about three weeks at a reported \$534,700 rental. Introduced CISPO (§5). Fixed train/inference token-probability disagreement by computing the LM head in FP32.
Magistral (Jun 2025)Pure RL from Mistral Medium 3: AIME-24 pass@1 26.8 → 73.6. GRPO with no KL, total-length loss normalization, minibatch advantage normalization, εhigh 0.26–0.28, and zero-advantage groups filtered. RL on text maintained or improved multimodal and tool-use ability.
Olmo 3 Think (Dec 2025)Fully open. OlmoRL = GRPO + zero-gradient filtering, active sampling, token-level loss, no KL, clip-higher, truncated importance sampling, no std normalization. Found DPO a better start for RL than SFT, and checked decontamination by showing random rewards did not help.
DeepSeek-V3.2 (Dec 2025)Post-training compute above 10% of pretraining cost. Stabilizers: an importance-corrected KL estimate, masking of highly off-policy negative-advantage sequences, "Keep Routing" (replay MoE routes) and "Keep Sampling Mask" (apply the sampler's top-p/top-k mask in training).

That is the 2025 picture; 2026 recipes such as Kimi K3 and MiMo-V2.6 spend much of their RL on long-horizon agentic environments.

Anthropic

Anthropic has not published a training recipe for Claude's reasoning. What is public: Claude 3.7 Sonnet introduced visible extended thinking (February 2025). That post reports math accuracy improving roughly logarithmically with thinking tokens, and a research-only parallel setting (256 samples, a learned scorer, 64k-token budget) reaching 84.8% on GPQA. It also states that Anthropic does not "know for certain that what's in the thought process truly represents what's going on in the model's mind". For Claude 4 models, long thought processes are summarized by a smaller model; the system card says only around 5% of thought processes are long enough to trigger this. The current API centers on adaptive thinking: the model decides whether and how much to think, steered by an effort level (low through max). Manual extended thinking with budget_tokens is deprecated, and Claude 4.7 and later reject it. How these modes are trained is not public; anything more specific would be speculation.

§3GRPO, derived

GRPO (Shao et al., 2024, introduced in DeepSeekMath) is PPO with the critic replaced by a statistic of a group of samples. Every design choice falls out of one question: what baseline can you compute without learning a value function?

Start from the policy gradient with a baseline (Chapter 02). For a prompt $q$ and a complete response $o$ with scalar reward $r(q,o)$:

$$\nabla_\theta J = \E_{q}\,\E_{o\sim\pit(\cdot|q)}\Big[\big(r(q,o) - b(q)\big)\sum_{t=1}^{|o|}\nabla_\theta\log\pit(o_t\mid q,o_{\lt t})\Big].$$

Any baseline $b(q)$ that does not depend on $o$ leaves the gradient unbiased, because $\E_{o}[\nabla\log\pit(o|q)]=\sum_o\nabla\pit(o|q)=\nabla 1 = 0$. The best simple choice is $b(q)\approx V(q)=\E_o[r]$, the prompt's expected reward. PPO learns $V$ with a critic network as large as the policy. With outcome-only rewards, the critic has to predict a binary pass/fail from a partial chain of thought, a hard regression problem whose errors inject bias into every token's advantage.

GRPO's move: sample a group of $G$ responses $\{o_1,\dots,o_G\}$ for the same prompt and use the group's own rewards to estimate $V(q)$.

$$\begin{aligned}\mathcal J_{\text{GRPO}}(\theta)=\E_{q,\{o_i\}\sim\piold}\Bigg[\htmlClass{t-g}{\frac1G\sum_{i=1}^{G}}\htmlClass{t-len}{\frac{1}{|o_i|}}\sum_{t=1}^{|o_i|}\Big\{&\min\!\big(\htmlClass{t-rho}{\rho_{i,t}}\hat A_{i,t},\;\clip(\rho_{i,t},1-\varepsilon,1+\varepsilon)\,\hat A_{i,t}\big)\\ &-\htmlClass{t-kl}{\beta\,\hat{\mathbb D}_{i,t}}\Big\}\Bigg]\end{aligned}$$
$$\htmlClass{t-adv}{\hat A_{i,t}=\frac{r_i-\operatorname{mean}(r_1,\dots,r_G)}{\operatorname{std}(r_1,\dots,r_G)}}\qquad \htmlClass{t-rho}{\rho_{i,t}=\frac{\pit(o_{i,t}\mid q,o_{i,\lt t})}{\piold(o_{i,t}\mid q,o_{i,\lt t})}}$$
$$\htmlClass{t-kl}{\hat{\mathbb D}_{i,t}=\frac{\piref(o_{i,t}|\cdot)}{\pit(o_{i,t}|\cdot)}-\log\frac{\piref(o_{i,t}|\cdot)}{\pit(o_{i,t}|\cdot)}-1}$$
  • Group-relative advantage: the same scalar for every token of response $i$. Mean-centering is the baseline; the std divides out the reward scale.
  • Average over the group: each response counts equally.
  • Per-response length normalization: each response's token losses are averaged, not summed. The source of the length bias (§4).
  • Token-level importance ratio against the sampling policy, clipped as in PPO, so several gradient steps can reuse one batch.
  • KL penalty in the loss, using Schulman's k3 estimator per token (DeepSeekMath: β = 0.04). Not in the reward, as PPO-RLHF does it.

DeepSeekMath used learning rate 1e-6, β = 0.04, $G=64$, maximum length 1024 and batch size 1024, and lifted MATH from 46.8% (the instruct model) to 51.7%. A process-supervision variant gives each token the sum of group-normalized step rewards from its step onward. Almost nobody uses it for reasoning RL today: outcome rewards won over step-level labels. In 2026 the outcome itself is getting richer than pass/fail: MiMo-V2.6 (2026) grades passing solutions against each other, because a binary test reward cannot tell them apart.

Why the group mean is a legitimate baseline

Mean-centering uses $o_i$'s own reward in its baseline, which looks like it should bias the gradient. Write the mean as a mix of $r_i$ and the leave-one-out mean $\bar r_{-i}=\frac{1}{G-1}\sum_{j\ne i}r_j$:

$$r_i-\bar r \;=\; r_i-\tfrac1G r_i-\tfrac{G-1}{G}\bar r_{-i}\;=\;\tfrac{G-1}{G}\big(r_i-\bar r_{-i}\big).$$

So GRPO's centered advantage is exactly the RLOO advantage (Ahmadian et al., 2024) scaled by $(G-1)/G$. Since the other samples are drawn independently of $o_i$, $\bar r_{-i}$ is a valid baseline and the estimator is unbiased up to that constant, which the learning rate absorbs. Liu et al. make the same observation.

The std division is a different story. $\operatorname{std}(r_1,\dots,r_G)$ depends on $r_i$, so the estimator is no longer an unbiased estimate of $\nabla J$. More importantly it changes which objective you are following. For binary rewards with per-prompt pass rate $p$ and large $G$, $\operatorname{std}\approx\sqrt{p(1-p)}$ and the expected update for one prompt is approximately

$$\E\big[\text{GRPO update}\big]\;\propto\;\frac{\nabla_\theta p}{\sqrt{p(1-p)}}\;=\;2\,\nabla_\theta\arcsin\!\sqrt{p}.$$

(Our own reading, from $\frac{d}{dp}\arcsin\sqrt p=\frac{1}{2\sqrt{p(1-p)}}$.) Mean-only centering ascends $\sum_q p_q$. Std-normalized GRPO ascends $\sum_q \arcsin\sqrt{p_q}$, a variance-stabilizing transform that is steepest near $p=0$ and $p=1$. Prompts the model almost always solves, or almost never solves, get up-weighted relative to prompts at 50%. Liu et al. call this the question-level difficulty bias; Dr. GRPO removes the std, and so do Olmo 3 and (per its report) DeepSeek-V3.2. REINFORCE++ (Hu, 2025) goes the other way: normalize advantages over the whole global batch instead of per prompt, which keeps a scale normalization without per-prompt reweighting.

Click the chips to flip the verdicts. Try "1 of 8": GRPO gives the lone correct answer  ≈ 2.65, mean-centering gives 0.875. Then "All correct": every advantage is zero, so this prompt contributed compute and no gradient. The right panel shows the total signal per prompt as a function of difficulty: all three peak at 4 of 8, but the GRPO curve is much flatter, because relative to mean-only centering it multiplies each prompt by $1/\sqrt{p(1-p)}$ (×2.0 at 4 of 8, ×3.0 at 1 or 7 of 8).

Analogy

GRPO grades on a curve within a study group: you are rewarded for beating your group's average, not for an absolute score. If everyone gets a problem right, or everyone fails, nobody learns from it. The std division is the instructor saying "where only one of you succeeded, that success is very informative", which amplifies rare successes on hard problems and rare failures on easy ones.

Where it breaks: all eight "students" are samples from one policy, so the comparison is between its own lucky and unlucky draws.

Zero-advantage groups

If all $G$ rewards are equal, every $\hat A_{i,t}=0$ and the prompt contributes nothing except the KL term. As training progresses, more prompts become all-correct, which shrinks the effective batch and grows gradient noise. DAPO's dynamic sampling over-samples and keeps only prompts with $0<\#\text{correct}<G$ until the batch is full. Olmo 3's active sampling is the same idea. ScaleRL (Khatri et al., 2025) adds "No-Positive-Resampling": permanently drop prompts whose historical pass rate is at least 0.9. Kimi k1.5 instead samples prompts with probability proportional to $1-s_i$, the failure rate.

Group or critic?

The group baseline has a price, and a critic is the alternative. A group gives you a baseline with no extra network, but it spends several rollouts per prompt, and the authors of SAO, a 2026 one-rollout recipe with a critic, argue that in asynchronous training a group must wait for its slowest rollout, so its samples go stale. A critic needs only one rollout per prompt, and brings back what GRPO set out to avoid: a value model that has to be trained first. Treat it as a trade-off between latency and the cost of a critic. It does not touch the derivation above: the objection is about latency, not the baseline's math. And when a comparison favors one side, ask what else changed: in SAO's own math results, much of the gap comes from a separate token mask that also works with GRPO. This is one lab's result on one backbone.

The numbers behind this trade-off

Hou et al. (SAO, 2026, Z.ai interns and Tsinghua) use one rollout per prompt and a value model, updated twice per policy step with frozen attention, with token-level GAE that skips environment observations. They "accept a controlled degree of off-policy bias" by using rollout probabilities in the ratio, and call the value model's cold start "a major bottleneck".

On AIME 2025 with a Python tool, they report GRPO at 84.2 (its last score before collapsing), GRPO with their rollout-ratio token mask (DIS, §5) at 93.5, and SAO at 97.3; on SWE-Bench Verified, GRPO with the mask reaches 27.0 and SAO 29.8. In their ablation vanilla VAPO, with a critic but no mask, also collapses. All of this is on a Qwen3-30B-A3B backbone, and their Appendix B says the conclusions "may not transfer directly" elsewhere. They report deploying SAO for GLM-5.2.

Other recipes keep several samples per prompt: MiMo-V2.6 (2026) runs GRPO asynchronously, with G=16 across 1,568 prompts per step, partial rollouts and a staleness of 4; Kimi K3 (2026) keeps K completions per prompt, also with partial rollouts; DeepSeek-V4 (2026) uses GRPO. We found no independent head-to-head.

The KL term: what k3 in the loss actually does

Chapter 02 shows that k3, $\rho-\log\rho-1$ with $\rho=\piref/\pit$, is an unbiased, non-negative estimator of $\KL(\pit\|\piref)$ when evaluated on samples from $\pit$. GRPO, however, does not use it as an estimate; it puts it in the loss and differentiates it. Do the derivative per token, on-policy, ignoring the dependence of future tokens on the current one:

$$\nabla_\theta\big(\rho-\log\rho-1\big)=(1-\rho)\,\nabla_\theta\log\pit(a),$$ $$\E_{a\sim\pit}\big[(1-\tfrac{\piref(a)}{\pit(a)})\nabla\log\pit(a)\big] = \underbrace{\textstyle\sum_a\nabla\pit(a)}_{=0}-\sum_a\piref(a)\nabla\log\pit(a)=\nabla_\theta\KL(\piref\|\pit).$$

The expected gradient is that of the forward KL $\KL(\piref\|\pit)$, not the reverse KL the objective writes down. Near $\pit\approx\piref$ the two agree to first order ($1-\rho\approx-\log\rho$), so it behaves like a KL anchor in practice; far from the reference it is a different regularizer. By contrast, k2 $=\tfrac12(\log\rho)^2$ as a loss gives $\E[(\log\pit-\log\piref)\nabla\log\pit]$, the per-token reverse-KL gradient. Tang & Munos (2025) catalogue this class of mistakes: differentiating a KL estimate generally does not give the KL gradient, and ignoring the sequential structure gives at best a partial gradient. DeepSeek-V3.2 switched to an importance-corrected k3, $\frac{\pit}{\piold}\big(\rho-\log\rho-1\big)$, because the original assigns unbounded weight to tokens far less likely under $\pit$ than under $\piref$. The fix is exact: differentiating the weighted term at $\pit=\piold$ adds $\E_{\pit}[\text{k3}\cdot\nabla\log\pit]$ to the forward-KL gradient above, and since $\text{k3}=\rho+\log\frac{\pit}{\piref}-1$, the $\rho$ parts cancel and what remains is $\E_{\pit}\big[\log\frac{\pit}{\piref}\nabla\log\pit\big]=\nabla\KL(\pit\|\piref)$, the per-token reverse-KL gradient. Many recipes (DAPO, Magistral, Olmo 3) set β = 0.

Pitfall

"We use GRPO" specifies almost nothing. Group size, std normalization, loss aggregation, KL estimator and placement, clip range, gradient steps per batch, zero-advantage filtering, and how truncated responses are scored all change results. Ask for all of them.

# GRPO-family loss in PyTorch. logp, logp_old, logp_ref: [B*G, T] per-token log-probs
# of the sampled tokens; rewards: [B*G]; mask: [B*G, T], 1 on completion tokens.
def grpo_loss(logp, logp_old, logp_ref, rewards, mask, G,
              eps_lo=0.2, eps_hi=0.2, beta=0.0, std_norm=True, agg="token", C=None):
    r = rewards.view(-1, G)
    adv = r - r.mean(dim=1, keepdim=True)                       # group baseline
    if std_norm:                                                # GRPO; Dr. GRPO drops this
        adv = adv / (r.std(dim=1, keepdim=True, unbiased=False) + 1e-6)
    adv = adv.view(-1, 1)                                       # same advantage for every token
    ratio = torch.exp(logp - logp_old)
    pg = torch.minimum(ratio * adv, torch.clamp(ratio, 1 - eps_lo, 1 + eps_hi) * adv)
    per_tok = -pg
    if beta > 0:                                                # k3 in the loss (see caveat above)
        lr = logp_ref - logp
        per_tok = per_tok + beta * (torch.exp(lr) - lr - 1)
    if agg == "seq":      # GRPO paper: mean over each response, then over responses
        return ((per_tok * mask).sum(1) / mask.sum(1)).mean()
    if agg == "token":    # DAPO: one mean over every token in the batch
        return (per_tok * mask).sum() / mask.sum()
    return (per_tok * mask).sum() / (mask.shape[0] * C)         # Dr. GRPO: constant C

Six samples, one checker, no critic. The advantage comes from the group alone, then goes to every token. Wrong responses here are longer: keep that in mind for §4.

A prompt's 16 samples are all correct. Under GRPO with β = 0, what does this prompt contribute to the gradient?
Mean-centering makes every advantage zero; implementations add ε to the std, giving 0/ε = 0. The compute spent generating 16 samples bought no learning signal. That is the motivation for dynamic sampling and pass-rate-based prompt filtering.

§4Loss aggregation and the length bias

Once each token has a loss $\ell_{i,t}$, you still have to decide how to average them. It decides whether the policy learns to ramble.

Three choices appear in practice. With $\ell_{i,t}$ the clipped surrogate for token $t$ of response $i$:

$$\underbrace{\frac1G\sum_{i=1}^G\frac{1}{\htmlClass{t-a1}{|o_i|}}\sum_{t}\ell_{i,t}}_{\text{sequence-mean (GRPO)}}\qquad \underbrace{\frac{1}{\htmlClass{t-a2}{\sum_{j}|o_j|}}\sum_{i=1}^G\sum_{t}\ell_{i,t}}_{\text{token-mean (DAPO)}}$$
$$\underbrace{\frac{1}{G\,\htmlClass{t-a3}{C}}\sum_{i=1}^G\sum_{t}\ell_{i,t}}_{\text{constant (Dr. GRPO)}}$$
  • Per-response length: every response gets total weight $|\hat A_i|/G$ regardless of length; per-token weight is $\hat A_i/(G|o_i|)$.
  • Batch token count: every token gets weight $\hat A_i/\sum_j|o_j|$, so a response's total weight grows with its length. The scale depends on the other responses in the batch.
  • Fixed constant (e.g. the max generation length): per-token weight $\hat A_i/(GC)$, identical across batches. This is the plain policy gradient up to a constant.

Now read off the per-token gradient weight under sequence-mean: $w_{i,t}=\hat A_i/(G|o_i|)$.

The policy is therefore pushed toward short correct answers and long wrong ones. Liu et al. (2025) showed this produces the "double increase" in length and accuracy seen in R1-Zero replications, and that removing it (Dr. GRPO) gives similar accuracy with better token efficiency. Their recipe reached 43.3% on AIME 2024 from Qwen2.5-Math-7B, about 27 hours on 8 A100s. They also found the per-response normalization in several popular open-source PPO implementations.

DAPO (Yu et al., 2025) reached the token-level loss from the other side: with sample-level averaging, tokens in long responses contribute too little, so gibberish and repetition in long samples go unpenalized, driving growth in entropy and length.

Four responses, two correct and two wrong (advantages ±1). Bar height is the per-token gradient weight; area is the response's total. Drag the rambling wrong answer's length and switch modes. Under sequence-mean, its total penalty never grows.

Analogy

A fine is levied on every wrong essay. Under sequence-mean, it is fixed per essay and split among its words: pad with filler and each word's share shrinks, while the essay pays the same total. Under token-mean, the fine is per word, so padding costs money. Under a constant normalizer, the per-word fine does not depend on how long everyone else's essays were.

Where it breaks: the policy does not "decide" to pad; padding is reinforced through many small updates.

Token-mean is not unbiased either

Token-mean divides by $\sum_j|o_j|$, a random quantity that depends on the samples, including through their correctness (wrong answers are often longer). The effective learning rate then varies with the batch's average length. The constant normalizer is the only one of the three that is an unbiased (rescaled) estimate of $\nabla\E[r]$. ScaleRL's large ablation found that the aggregation choice mostly changes compute efficiency rather than the asymptotic accuracy, and its final recipe uses prompt-level aggregation (average within each prompt's group, then across prompts). Treat aggregation as a knob with measurable consequences.

Pitfall: truncation is a reward

A response cut off at the maximum length has no final answer, so it scores 0 and receives a negative advantage. That teaches "do not be long", including to responses whose reasoning was correct but unfinished. DAPO's ablation first masks truncated samples out of the loss (overlong filtering), then replaces the cliff with a soft ramp:

$$R_{\text{length}}(y)=\begin{cases}0 & |y|\le L_{\max}-L_{\text{cache}}\\[2pt] \dfrac{(L_{\max}-L_{\text{cache}})-|y|}{L_{\text{cache}}} & L_{\max}-L_{\text{cache}}\lt |y|\le L_{\max}\\[2pt] -1 & |y|\gt L_{\max}\end{cases}$$

with $L_{\max}=20{,}480$ (the generation cap) and $L_{\text{cache}}=4{,}096$, so the penalty starts at 16,384 tokens. Magistral caps the same shape at −0.1.

Under sequence-mean aggregation, a wrong response grows from 500 to 2,000 tokens while its advantage stays at −1. What happens to the penalty it receives?
Sequence-mean gives each response total weight |Â|/G. The 1/|oᵢ| factor spreads it over more tokens, so each token is penalized 4× less. Token-mean would instead keep the per-token weight and quadruple the total.

§5Ratios, clipping and the 2025 family

PPO's clip was designed for short-horizon control with a critic. In long-CoT RL with many gradient steps per rollout batch (DAPO and MiniMax-M1 both use 16), the clip mostly decides which tokens are allowed to learn, and the tokens it silences are disproportionately the rare, interesting ones.

DAPO: four fixes and a careful ablation

DAPO (Decoupled Clip and Dynamic sAmpling Policy Optimization) is the cleanest public demonstration that "GRPO" is a family of choices. Starting from Qwen2.5-32B base with a ±1 correctness reward, no KL, $G=16$ and 512 prompts per rollout step:

$$\mathcal J_{\text{DAPO}}=\E\Bigg[\frac{1}{\sum_i|o_i|}\sum_{i=1}^G\sum_{t=1}^{|o_i|}\min\!\Big(\rho_{i,t}\hat A_{i,t},\;\clip\big(\rho_{i,t},1-\varepsilon_{\text{low}},1+\varepsilon_{\text{high}}\big)\hat A_{i,t}\Big)\Bigg]$$ $$\text{subject to}\quad 0\lt\big|\{o_i:\text{correct}\}\big|\lt G.$$
DAPO ablation (AIME 2024, avg@32)Score
Naive GRPO30
+ overlong filtering (mask truncated samples)36
+ clip-higher (εlow = 0.2, εhigh = 0.28)38
+ soft overlong punishment41
+ token-level loss42
+ dynamic sampling (= DAPO)50
DeepSeek-R1-Zero-Qwen-32B (reference)47

DAPO reached 50 with half the steps of the DeepSeek reference. These are single runs on one model family; each increment is within the range where seeds matter.

Why only the upper bound

For a token with $\hat A>0$, the clip stops its probability at $(1+\varepsilon)\,\piold$. For $\piold=0.9$ that ceiling ($\ge 1$) never binds. For $\piold=0.01$ the token can reach at most 0.012 per update. The upper clip therefore throttles exactly the low-probability tokens with positive advantage: the exploratory moves. DAPO reports that the mean probability of up-clipped tokens is below 0.2, and raises only εhigh to 0.28. Raising εlow instead would let probabilities be pushed toward zero faster, accelerating collapse.

GSPO: one ratio per response

The objective is defined over whole responses (the reward is a sequence-level quantity), yet GRPO importance-weights each token by a single-sample ratio. Zheng et al. (2025, Qwen) argue that these token ratios add high-variance noise that accumulates with response length and is amplified by clipping. GSPO uses the length-normalized sequence likelihood ratio and clips at the sequence level:

$$\mathcal J_{\text{GSPO}}=\E\Bigg[\frac1G\sum_{i=1}^G\min\!\big(\htmlClass{t-s}{s_i(\theta)}\hat A_i,\ \clip(s_i(\theta),1-\varepsilon,1+\varepsilon)\hat A_i\big)\Bigg]$$
$$\htmlClass{t-s}{s_i(\theta)=\Big(\frac{\pit(o_i|q)}{\piold(o_i|q)}\Big)^{1/|o_i|}=\exp\!\Big(\frac{1}{|o_i|}\sum_t\log\rho_{i,t}\Big)}$$
  • Sequence ratio: the geometric mean of the token ratios. The $1/|o_i|$ power keeps it in a comparable range for short and long responses.

GSPO weights every token of response $i$ by the same $s_i\hat A_i/|o_i|$, while GRPO weights token $t$ by its own $\rho_{i,t}\hat A_i/|o_i|$. The clip range is tiny: 3e-4 below and 4e-4 above in the paper's experiments, against 0.2/0.27 for their GRPO baseline. GSPO clips about two orders of magnitude more tokens and still trains more efficiently.

The practical motivation was MoE stability. In Qwen3-30B-A3B, roughly 10% of the experts activated for a rollout change after one gradient update, so a token routes through different experts under $\piold$ and $\pit$ and its ratio swings wildly. The workaround for GRPO, "Routing Replay", caches the old routes and replays them (DeepSeek-V3.2's "Keep Routing" is the same idea). GSPO's sequence likelihood is robust enough to converge without it. A "GSPO-token" variant, $s_{i,t}=\sg[s_i]\cdot\pit(o_{i,t})/\sg[\pit(o_{i,t})]$, has the same value as $s_i$ but allows "adjusting the advantages per token".

CISPO: clip the weight, keep the gradient

MiniMax-M1's authors noticed that reflective tokens such as "However", "Recheck", "Wait" and "Aha" were rare under the base model, hit the upper clip on the first off-policy update, and then contributed no gradient for the rest of the batch. Their fix is to stop clipping tokens and clip the importance weight instead:

$$\mathcal J_{\text{CISPO}}=\E\Bigg[\frac{1}{\sum_i|o_i|}\sum_{i}\sum_{t}\sg\!\big(\hat\rho_{i,t}\big)\,\hat A_{i,t}\,\log\pit(o_{i,t}\mid q,o_{i,\lt t})\Bigg],$$ $$\hat\rho_{i,t}=\clip\big(\rho_{i,t},\,1-\varepsilon^{IS}_{\text{low}},\,1+\varepsilon^{IS}_{\text{high}}\big).$$

This is truncated importance-sampled REINFORCE: every token contributes $\hat A\,\nabla\log\pi$, scaled by an importance weight capped above. The paper sets εlow large (effectively no lower bound) and tunes only εhigh. In a controlled Qwen2.5-32B comparison, CISPO matched DAPO's AIME performance with half the steps. Written on one objective, PPO drops tokens outside the trust region (a token mask $M_{i,t}$); CISPO keeps them with bounded weight.

Top: gradient weight on ∇log π against the ratio (dotted grey = PPO). Bottom: one 14-token response. Switch algorithms and drag "staleness": PPO silences the rare “ Wait” token first, CISPO caps it, GSPO keeps or drops the whole response.

The family at a glance

MethodAdvantageRatio / clipAggregationKL
PPO (RLHF)GAE from a critictoken, symmetric εtokenk1 in reward
GRPO(r−mean)/std, grouptoken, symmetric εsequence-meank3 in loss
RLOOr − mean of othersusually on-policy, nonesequencein reward
REINFORCE++batch-normalizedtoken cliptokentoken-level
Dr. GRPOr − meantoken, symmetric εconstant Coptional
DAPO(r−mean)/std, dynamic samplingtoken, εhigh > εlowtoken-meannone
GSPO(r−mean)/stdsequence geo-mean, tiny εsequencenone in paper
CISPOgroup-normalizedclipped IS weight, stop-gradtoken-meannone in paper
SAO (2026)token-level GAE from a critic, one rollouttoken mask outside [1−εlow, 1+εhigh]tokennone in paper

Through late 2025, SAPO (Qwen) replaces the hard clip with a temperature-controlled sigmoid gate that fades off-policy tokens smoothly, with different temperatures for positive and negative advantages; GMPO (Zhao et al.) optimizes the geometric rather than arithmetic mean of token-level terms for stability. ScaleRL's loss comparison (part of a 400k-GPU-hour study) found GSPO and CISPO both well above DAPO in fitted asymptotic accuracy, and chose CISPO: marginally better than GSPO late in training, and more robust to its clipping hyperparameter. The common thread through 2025: keep gradient flowing from rare tokens while bounding how far stale samples can push the policy.

Not every 2026 recipe follows that thread. Some asynchronous agentic recipes drop tokens outside a wide trust region, where CISPO keeps them at a capped weight, and one small-model study drops clipping altogether. These are the authors' own reports, in different settings. Our reading: a clip setting answers how stale your samples are and how far sampler and trainer disagree, so measure those before borrowing someone's numbers.

The 2026 recipes

SAO masks tokens outside a trust region from the gradient entirely, though with wide bounds (εlow 0.3, εhigh 5.0 for reasoning; 0.8 and 3.0 for coding). StepFun's MIS-PO (2026) replaces continuous importance weights with token- and trajectory-level filters. RGRA (Carrino et al., 2026) removes clipping and ratios altogether and reports it can beat GRPO, on models of 0.5–1.5B.

What the frontier says

At scale, many "algorithm" problems turn out to be numerics and systems problems: the sampler and the trainer compute slightly different probabilities (MiniMax's FP32 head; Olmo 3's truncated importance sampling; DeepSeek-V3.2's routing and sampling-mask replay). ScaleRL found FP32 logits at the LM head raised the fitted asymptote from 0.52 to 0.61 in one ablation. Chapter 07 covers this train/inference mismatch and asynchronous off-policy RL in depth.

Why did DAPO raise εhigh but leave εlow at 0.2?
The ceiling (1+ε)πold barely constrains likely tokens but severely constrains unlikely ones, which are exactly the exploratory moves. Loosening the floor would do the opposite of what you want for entropy.

§6Entropy collapse

Run vanilla GRPO long enough and the policy's entropy falls fast, then flattens near zero, and accuracy plateaus with it. Cui et al. (2025) turned this folklore into a formula.

The empirical law

Across many runs (11 base models from 4 families, 0.5B to 32B; GRPO, REINFORCE++, PRIME, with RLOO in an ablation; math and code), Cui et al. fit validation performance $R$ against policy entropy $\mathcal H$ with two parameters:

$$R=-a\,e^{\mathcal H}+b.$$

When entropy reaches zero the run hits a predictable ceiling $R=-a+b$. For the Qwen2.5 family, fitting on the first 36 steps predicted the next 200 steps to about 1% RMSE. The authors caution that other settings (different base models, off-policy data) showed different patterns.

The mechanism, derived

Take a softmax policy over actions at one state, $\pi(a)\propto e^{z_a}$, and perturb the logits by $\delta z$. Two facts: $\delta\pi_a=\pi_a(\delta z_a-\sum_b\pi_b\delta z_b)$, and $\sum_a\delta\pi_a=0$. Then

$$\delta\mathcal H=-\sum_a\delta\pi_a(\log\pi_a+1)=-\sum_a\pi_a\Big(\delta z_a-\E_\pi[\delta z]\Big)\log\pi_a=-\operatorname{Cov}_{a\sim\pi}\big(\log\pi(a),\ \delta z_a\big).$$
$$\mathcal H(\pi^{k+1})-\mathcal H(\pi^{k})\;\approx\;-\,\eta\;\operatorname{Cov}_{a\sim\pi^k}\!\Big(\htmlClass{t-lp}{\log\pi^k(a)},\;\htmlClass{t-A}{A(a)}\Big)\qquad(\text{natural policy gradient: }\delta z_a=\eta A(a))$$
  • Log-probability: how confident the policy already is in action $a$.
  • Advantage: whether $a$ beat the baseline. For vanilla softmax policy gradient, $\delta z_a=\eta\,\pi(a)A(a)$ and the covariance is with $\pi(a)A(a)$ instead.

Entropy falls when high-probability actions have high advantage (confident and right gets more confident) or low-probability actions have low advantage (unlikely and wrong gets less likely). In RLVR both are the common case: a pretrained model is usually confident about what it does well. Cui et al. measured the covariance term during training and found it stays mostly positive and tracks the entropy drop closely.

Analogy

A diner tries a new restaurant only when the usual one disappoints. Every good meal makes the next visit more likely; every rare bad experience elsewhere rules that place out. After a few months the diner eats at one place, and never learns that the one across the street is better.

Where it breaks: the diner chooses; the policy's narrowing is a mechanical consequence of the covariance.

Countermeasures

A real GRPO run on a toy task: 16 "strategies", each with a success rate (green dots). The base policy favors s0 (55%); s7 (95%) and s11 (90%) are rare (1–1.5% of the mass). Sixteen seeds per setting, 4 clipped steps per batch. The baseline almost always collapses onto s0. "Yours" starts at εhigh = 0.4; try Clip-Cov or an entropy bonus and count how many runs discover the rare strategies.

About the toy: a tabular softmax, so magnitudes are not those of an LLM. Runs that find s7/s11 by step 300: baseline 1/16; εhigh = 0.28 alone, 1/16; εhigh = 0.4 (the default "yours"), 8/16. With εhigh back at 0.2: Clip-Cov at 5%, 15/16; entropy bonus 0.01, 1/16, but 0.02, 7/16 (the same coefficient sensitivity Cui et al. report). Knobs combine: at εhigh = 0.4, Clip-Cov 5% gives 16/16. The Clip-Cov fraction far exceeds the paper's 2·10⁻⁴ because the toy has 16 samples per step, not millions of tokens.

Key idea: spurious rewards are an entropy story too

The same asymmetry explains a strange 2025 result (§7): with random rewards, the unclipped expected gradient is zero, but the clipped one is not. High-probability tokens cannot reach the upper clip, while low-probability tokens are easily clipped, so the net drift favors what the model already does most, lowering entropy with no signal from the reward.

§7Sharpening or discovery? pass@k and its discontents

If RL only reweights solutions the base model could already produce, it is expensive sampling. If it composes new strategies, it is the engine of progress. In 2025 the evidence pointed both ways. In 2026 the dispute widened to whether the crossover is well measured, whether it is forced, and what it means.

The metric

For a problem with per-sample success probability $p_x$, the chance that at least one of $k$ samples succeeds is $1-(1-p_x)^k$. Averaged over problems:

$$\text{pass@}k=\E_x\big[1-(1-p_x)^k\big],\qquad \widehat{\text{pass@}k}=\E_x\Big[1-\binom{n-c_x}{k}\Big/\binom{n}{k}\Big]\ \ (n\ge k\text{ samples},\ c_x\text{ correct}).$$

The second form is the unbiased estimator of Chen et al. (2021); estimating pass@k by drawing exactly $k$ samples is much noisier. Two limits matter: pass@1 = $\E[p_x]$, the average accuracy, while pass@∞ = $\Pr(p_x>0)$, the coverage: the fraction of problems the model can solve at all.

def pass_at_k(n, c, k):
    """Unbiased pass@k from n samples with c correct (Chen et al., 2021)."""
    if n - c < k:
        return 1.0
    return 1.0 - np.prod(1.0 - k / np.arange(n - c + 1, n + 1))

RL that sharpens the distribution raises $p_x$ where it was already moderate (pass@1 goes up), but can drive small $p_x$ to zero (coverage goes down). Then the curves cross.

500 synthetic problems with per-problem success rates (histogram). "After RLVR" sharpens each problem's distribution and loses some rare-success problems entirely. Watch the curves cross; then set "problems lost" to 0, and finally tick the ProRL-style box that turns a quarter of unsolvable problems into solvable ones. These curves are noise-free; with real samples, a visible crossing can sit inside the confidence band.

The evidence for "mostly sharpening"

DeepSeekMath noticed it in 2024: RL improved Maj@K but not Pass@K, which the authors read as "rendering the output distribution more robust" rather than improving fundamental capabilities. Yue et al. (2025, NeurIPS oral) made it systematic across model families, six RLVR algorithms, and math, code and visual reasoning: RLVR models win at small $k$, base models at large $k$; coverage and perplexity analyses indicate the RL model's correct solutions were already in the base model's distribution; the six algorithms perform similarly, well short of the base model's pass@k ceiling. In contrast, they report that distillation from a stronger teacher can add new reasoning patterns (whether on-policy distillation does so is unresolved, §8). The Invisible Leash (Wu et al., 2025) finds that, at the sampling budgets studied, more questions lose their last verified success than gain a first one, even while pass@1 rises. Karan & Du (2025) showed that a training-free MCMC sampler targeting a sharpened version of the base model's distribution nearly matches, and sometimes exceeds, RL on single-shot MATH500, HumanEval and GPQA, without the loss of sample diversity.

The evidence for "it can expand", and the open dispute

ProRL (Liu et al., 2025, NVIDIA) trained DeepSeek-R1-Distill-Qwen-1.5B for more than 2,000 steps (about 16k GPU-hours) on 136k problems across math, code, STEM, logic puzzles and instruction following, with clip-higher (εhigh = 0.4), dynamic sampling, a KL penalty and periodic reference resets. On boxnet, a held-out Reasoning Gym task where the base model shows no capability, the RL model reaches high pass@k. Gains in pass@128 were largest where the base model was weakest (a significant negative correlation). The same paper reports that on several math benchmarks, where the base model was already strong, pass@1 rose while pass@128 stayed flat or fell. A common working hypothesis: short RL on familiar tasks sharpens; long, diverse RL on tasks near the edge of competence can expand coverage, and both can coexist in one run.

This is not settled, but three habits hold. Compare models on the same prompts with confidence bands across k: a visible crossing can be noise, and non-detection is not absence. Do not read a crossover as proof nothing new was learned: check which problems move from about zero to solved. When a theorem says RL cannot expand reach, check whether it assumes a fixed strategy set; then the result is built in.

Why this is unsettled
  • Is the crossing established? Yang & Chen (2026) put paired confidence bands across k. In five public RLVR pairs, no crossing was statistically established in their initial evaluations (ProRL's at k=56 has p=.20), though a 32k-token run on fresh prompts does locate a reversal, first loss between k=11 and k=61, with a small late-loss margin. Power is low, so non-detection does not mean no crossing, and more prompts can beat more answers per prompt. They also argue that a crossover alone cannot separate sharpening from genuine gain.
  • Is it forced? Liu (2026) claims a theorem: if RLVR is an exponential tilt over shared strategies, then under exclusive specialization every pass@1 gain lowers some prompt's success, and a further coverage condition forces a crossover. The abstract says this settles the question. Our reading: a tilt reweights a fixed strategy set, so "cannot widen the reasoning frontier" is built into the model, and the paper's Theorem 3(e) gives a no-crossover regime. It is a fresh preprint; we have not checked the proofs.
  • Does it reach agents? Oh et al. (2026, Meta and others) report base models with a light harness often overtaking post-trained ones at large K, across 14 pairs on three agentic benchmarks. They call this observational: recipes are not fully disclosed, thinking was off by default (a two-model ablation kept the conclusion), and whether heavier RL moves beyond elicitation stays open.

Spurious rewards, one example, and contamination

Three 2025 results look impossible, and each teaches a lesson.

Pitfall: the Qwen-Math lamppost

Many 2025 RLVR papers reported results on Qwen2.5(-Math) and MATH-500/AIME only. For that combination, nearly any perturbation that moves the model into its strong mode looks like learning. Minimum bar for a claim about an RLVR method: at least two model families, a decontaminated or freshly generated benchmark, a spurious-reward (random or format-only) baseline run with the same budget, and re-verified labels in any noise study.

Analogy

Sharpening is focusing a flashlight: brighter on what it already lights, darker at the edges. Expansion is moving it to a new part of the room. pass@1 measures the brightness of the center; pass@256, how much of the room you can see by sweeping the beam.

Where it breaks: long RL might chain lit regions into a path no single sweep reaches: the composition argument for expansion.

After RLVR, pass@1 rises from 0.30 to 0.45, while pass@256 falls from 0.80 to 0.65. What is the most precise description?
pass@1 tracks average per-problem accuracy; pass@large-k tracks coverage. Higher mean and lower coverage is the signature of sharpening with support loss. To claim expansion you need problems whose base pass@k is ~0 at large n becoming solvable. On real data, first check the crossing against confidence bands; by itself it does not rule out genuine gain.

§8Test-time compute: thinking longer, sampling wider

Training compute buys a better policy; test-time compute buys a better answer from a fixed policy. There are two ways to spend it: parallel (many samples, then aggregate) and serial (one longer chain of thought).

Parallel: vote, verify, search

300 simulated problems, each with a correct answer, a distractor and a tail of wrong answers. The verifier scores with Gaussian noise σ, and a few wrong samples "exploit" it. Switch to hard problems: majority vote decreases as N grows (the distractor is the plurality), while best-of-N keeps climbing until exploits dominate. Set the exploit rate to 0 to remove the late decline.

Compute-optimal test-time scaling

Snell et al. (2024) define the compute-optimal strategy as the test-time hyperparameters $\theta$ (parallel samples vs. sequential revisions, beam width, verifier use) that maximize expected correctness for a prompt at budget $N$:

$$\theta^*_{q}(N)=\argmax_{\theta}\ \E_{y\sim\text{Target}(\theta,N,q)}\big[\mathbb 1\{y=y^*(q)\}\big].$$

Since $y^*$ is unknown at test time, they bin prompts by estimated difficulty. Adaptive allocation improved efficiency by more than 4× over best-of-N. Easier questions benefited from sequential revisions, harder ones from a mix with parallel sampling; PRM beam search beat best-of-N on harder questions and at low budgets, but on easy questions it degraded with budget by over-optimizing the verifier. In a FLOPs-matched comparison, a smaller model with optimal test-time compute could beat a 14× larger model on problems where it already had non-trivial success. On the hardest questions, pretraining was the better use of compute.

Analogy

Majority vote is a committee: excellent when most members are roughly right, hopeless when all share a misconception. Best-of-N is a single judge reading all submissions: it can spot the one correct minority answer, but a large enough pile contains one engineered to impress that judge. Serial thinking is one expert taking more time: if anchored on a wrong idea, more time can deepen it.

Where it breaks: real committees deliberate; independent samples never talk.

Serial: long thinking, and how to control it

Reasoning models spend test-time compute serially, and length is a policy output shaped by training. Control mechanisms:

Longer is not monotonically better. Overthinking (Chen et al., 2024): o1-like models spend excessive compute on trivial problems like "2+3" with minimal benefit. Underthinking (Wang et al., 2025): on hard problems they switch approaches too often; frequent switching correlates with wrong answers, and a decoding penalty on switch tokens helps. Inverse scaling (Gema et al., 2025): on tasks with distractors, spurious features or long constraint tracking, extending reasoning reduces accuracy, including more expressions of self-preservation from Claude Sonnet 4 as its reasoning got longer.

Distillation and RL: stages of one pipeline

For a small model, the cheapest reasoning is borrowed: see DeepSeek's 32B comparison (§2). Qwen3 made the cost explicit for an 8B model starting from the same checkpoint: RL took 17,920 GPU-hours to reach AIME'24 67.6 / AIME'25 55.5, while on-policy distillation (the student samples, and is trained to match the teacher's logits on its own samples) took 1,800 GPU-hours to reach 74.4 / 65.5, and also improved pass@64, which RL did not. The counterpoint is Magistral Small: pure RL matched the distilled version on AIME-24 (65.8 vs 65.4), and SFT followed by RL gave 70.7. The working rule: distill to transfer what a teacher already knows; use RL to go beyond any teacher, or to fix behaviors the teacher's traces do not cover.

By 2026 on-policy distillation (OPD) is also a stage in frontier pipelines, where it merges domain specialists into one model. Whether it adds capability or only makes the teachers' solutions easier to reach is unresolved, so keep the working rule: count on it for transfer, and check any claim of more with the pass@k habits of §7.

The evidence on OPD

DeepSeek-V4 (2026) "entirely replaced" its mixed RL stage with OPD from specialists, and Kimi K3 (2026) merges nine experts, three domains at three effort levels. Cui et al. (2026) report gains "without expanding the student's capabilities", while Li et al. (2026) report that it expands coverage of teacher-supported solutions, with RL sharpening afterwards.

You run best-of-N with a learned outcome verifier. Accuracy rises from N = 1 to N = 64, then falls by N = 1024. Most likely cause?
Best-of-N maximizes the verifier's score, so it is an optimizer against the verifier. Cobbe et al. saw exactly this decline beyond ~400 samples. Fixes: a better verifier, verifier-weighted voting (aggregating evidence across samples), or a cap on N.

§9Faithfulness and monitorability (pointer)

Reasoning RL rewards only the final answer, so nothing constrains whether the chain of thought reflects the computation. Anthropic's measurements (Chen et al., 2025) found that reasoning models verbalize the hints they actually use only a minority of the time (on average 25% for Claude 3.7 Sonnet and 39% for DeepSeek-R1). Outcome RL improved faithfulness at first and then plateaued, and models taught a reward hack verbalized it in under 2% of cases in 5 of 6 environments. OpenAI showed that applying optimization pressure to the CoT itself (penalizing "bad thoughts") at first improves behavior but then produces obfuscated reward hacking, and argued for paying a "monitorability tax" (Baker et al., 2025). A cross-lab position paper calls CoT monitorability "a new and fragile opportunity" (Korbak et al., 2025).

For a post-training researcher, the operational consequence is a design constraint: be very careful about any reward that reads the chain of thought (length penalties are mild; "process" judges are not), and audit your reward code paths, because the norm fails by accident too. Anthropic's Mythos Preview risk report discloses an error that let reward code see chains of thought in about 8% of RL episodes. OpenAI reports limited accidental grading (under 3.8% of samples for one model and pathway) and no clear monitorability loss. The companion Alignment Field Guide covers faithfulness, monitoring and obfuscation in depth.

§10Frontier & open problems

How to think about it

This chapter trains two skills: deriving (GRPO's baseline, the length bias, the entropy-covariance identity, pass@k limits) and designing experiments that separate confounds (base-model priors, contamination, verifier leniency, aggregation). A convincing experiment says what the null result would look like and what baseline (random reward, majority-vote reward, distillation at equal compute) would falsify the claim.

§11Check yourself

Try each one before opening the answer.

Show that GRPO's mean-centered advantage is an unbiased policy-gradient estimator up to a constant, and explain what the std division changes. core

$r_i-\bar r=\frac{G-1}{G}(r_i-\bar r_{-i})$, where $\bar r_{-i}$ is the mean of the other samples. Those are independent of $o_i$ given $q$, so $\E[\nabla\log\pi(o_i)\,\bar r_{-i}]=0$ and the estimator is $\frac{G-1}{G}$ times the unbiased RLOO estimator. Dividing by the std (which depends on $r_i$) biases it and reweights prompts: for binary rewards the expected update is $\approx\nabla p/\sqrt{p(1-p)}=2\nabla\arcsin\sqrt p$, which up-weights prompts with pass rates near 0 or 1. Dr. GRPO and Olmo 3 drop it.

Why can GRPO make wrong answers longer? How do Dr. GRPO and DAPO fix it, and what does each fix cost? core

Sequence-mean aggregation gives token $t$ of response $i$ weight $\hat A_i/(G|o_i|)$. For $\hat A_i<0$, lengthening a wrong answer reduces the per-token penalty and leaves the total unchanged. DAPO's token-mean gives every token weight $\hat A_i/\sum_j|o_j|$ (total penalty grows with length) at the cost of a batch-dependent scale. Dr. GRPO's constant normalizer makes the per-token weight fixed across batches (an unbiased rescaled policy gradient) at the cost of a step size that grows with response length.

What does the k3 KL term in GRPO's loss optimize, exactly? deep

Per token and on-policy, $\E_{\pit}[(1-\rho)\nabla\log\pit]=\nabla\KL(\piref\|\pit)$ with $\rho=\piref/\pit$: the forward KL gradient, matching the reverse KL only to first order near $\piref$. k2 $=\frac12(\log\rho)^2$ as a loss gives the per-token reverse-KL gradient. Both still ignore the effect of a token on future tokens' distributions (the sequential term). Multiplying k3 by the (not stop-gradient) ratio $\pit/\piold$, as DeepSeek-V3.2 does, turns the expected gradient into the per-token reverse-KL gradient and handles off-policy samples. Many recipes set β = 0.

Derive why policy entropy falls during RLVR, and propose two interventions with a way to evaluate them. deep

For a softmax, $\delta\mathcal H=-\operatorname{Cov}_\pi(\log\pi,\delta z)$; under natural PG $\delta z=\eta A$, so entropy falls when high-probability actions have positive advantage. In RLVR the base model is usually confident where it is right. Interventions: clip-higher, or Clip-Cov/KL-Cov on the highest-covariance tokens. Evaluate on matched compute: entropy and covariance curves, pass@1 and large-k pass@k, a fitted ceiling, at least two seeds and two model families.

A paper reports that random rewards improve Qwen2.5-Math-7B by 21 points on MATH-500. What are your hypotheses, and what experiments would separate them? research

Hypotheses: (a) the model has a latent high-accuracy mode (code-style reasoning) that any sharpening amplifies; (b) the clipped objective has a non-zero expected gradient under zero-mean rewards that favors already-likely behavior; (c) benchmark contamination makes "the strong mode" equal to memorized answers; (d) format/answer-extraction fixes; (e) for incorrect-label claims, labels that are actually correct. Experiments: rerun with clipping disabled (Shao et al.: the gain disappears); measure the frequency of code reasoning before and after; repeat on Llama/OLMo (no gain); evaluate on freshly generated problems such as RandomCalculation (no gain from random rewards); a format-only reward baseline to isolate (d); re-verify the labels for (e).

Design an experiment to test whether RLVR expands a model's reasoning boundary. research

Use freshly generated or decontaminated tasks with base pass@1024 ≈ 0 (n ≥ 2048, unbiased estimator, several prompt formats). Train with long, diverse RL; compare against the base model at matched inference compute, power/MCMC sampling from it, and distillation from a stronger teacher. Expansion = problems moving from ~0 to substantial coverage. Check for novel strategies (e.g. perplexity under the base model). Report per-problem transitions and paired confidence bands across k, not only averages.

Why does GSPO use a sequence-level ratio, and why does it help MoE models? deep

The reward is sequence-level, but GRPO's per-token ratios are noisy single-sample estimates whose noise accumulates with length and is amplified by clipping. GSPO uses $s_i=(\pit(o_i)/\piold(o_i))^{1/|o_i|}$, so all tokens share one weight and the clip acts on whole responses. In MoE models about 10% of activated experts can change after one update (Qwen3-30B-A3B), so token ratios swing. Sequence likelihood averages this out, removing the need for routing replay.

Compare the gradient a low-probability "Wait" token with positive advantage receives under PPO-clip and under CISPO after its ratio reaches 1.5. core

PPO-clip with ε = 0.2: the ratio is above $1+\varepsilon$ and $\hat A>0$, so the min selects the clipped constant and the gradient is zero for the rest of the batch. CISPO: the weight is $\sg(\min(1.5,1+\varepsilon_{\text{high}}))$, so the token still contributes $(1+\varepsilon_{\text{high}})\hat A\,\nabla\log\pi$. The token keeps learning with a bounded step.

Your RLVR run plateaued: reward flat for 200 steps, entropy near zero. What do you look at, in order? core

(1) Fraction of zero-advantage groups: if high, add dynamic sampling or harder prompts. (2) Pass-rate histogram of the training set. (3) Clip fraction by token probability. (4) Truncation rate and response length. (5) Entropy and the log-prob/advantage covariance; for multi-turn agents, also input dependence, since RAGEN-2 (Wang et al., 2026) reports templated reasoning under stable entropy. (6) Training/inference log-prob mismatch. (7) Verifier audit of recent high- and zero-reward samples. (8) KL to the reference, if any.

When would you distill instead of running RL on a small model? core

When a stronger teacher exists: DeepSeek's distilled Qwen-32B beat RL by 25 points of AIME pass@1, and Qwen3's on-policy distillation beat RL at about one-tenth the GPU-hours, also improving pass@64. Use RL when there is no teacher, when you need to exceed it, or when the base is already strong enough to explore (Magistral Small's pure RL matched distillation). Often the best is both: distill, then RL.

Majority vote, best-of-N with a verifier, PRM-guided search: when does each win? deep

Majority vote needs no verifier and wins when the correct answer is the mode; it can get worse with N when a shared misconception dominates. Best-of-N can recover a minority correct answer but declines at large N if the verifier can be fooled (Cobbe et al.). Verifier-weighted voting is often more robust. PRM beam search helps on harder problems and low budgets but over-optimizes the verifier on easy ones; Snell et al. found adaptive allocation >4× more efficient than best-of-N.

Your coding environment's tests are weak, and the model has started special-casing inputs. How do you harden the environment, and what do you do about runs already trained on it? research

Hardening: property-based, randomized hidden tests, sandboxing away from tests and harness, detection of process exits and patched assertions, mutation testing, a hack classifier on transcripts, and held-out evaluation with stronger tests. For trained runs: measure hack rate with held-out tests, check for generalization beyond coding (§10), and consider retraining from a pre-hack checkpoint. Avoid training a CoT monitor's verdict into the reward without understanding the obfuscation risk.

Explain why random rewards can change a clipped policy at all. deep

With zero-mean, reward-independent advantages, the unclipped expected gradient is zero. Clipping breaks the symmetry: a token with $\piold=0.9$ can never exceed ratio $1/0.9\approx1.11$, below $1+\varepsilon=1.2$, so its positive updates are never clipped, while its negative updates can be; a token with $\piold=0.01$ hits the clip easily in either direction. The surviving updates favor high-probability behavior, sharpening the policy toward its mode. Shao et al. confirm that removing clipping removes the effect.

GRPO advantage
$\hat A_i=(r_i-\text{mean}(r))/\text{std}(r)$ over G samples of the same prompt, broadcast to every token. No critic.
GRPO mean-centering vs RLOO
$r_i-\bar r=\frac{G-1}{G}(r_i-\bar r_{-i})$: the same estimator up to scale.
Length bias (Dr. GRPO)
Sequence-mean weights tokens by $\hat A_i/(G|o_i|)$: long wrong answers are penalized less per token, with constant total penalty.
Difficulty bias
Std normalization ≈ ascending $\arcsin\sqrt p$: up-weights prompts with pass rate near 0 or 1.
DAPO's four tricks
Clip-higher (0.2/0.28), dynamic sampling (0 < #correct < G), token-level loss, overlong shaping (+ overlong filtering). No KL.
GSPO ratio
$s_i=(\pi_\theta(o_i)/\pi_{old}(o_i))^{1/|o_i|}$, clipped per sequence with ε ≈ 3–4·10⁻⁴. Stabilizes MoE RL.
CISPO
$\text{sg}(\text{clip}(\rho))\,\hat A\log\pi$: clip the IS weight, never drop the token's gradient.
Entropy dynamics
$\Delta\mathcal H\approx-\eta\,\text{Cov}(\log\pi,A)$. Confident and right → less entropy.
Entropy–performance law
$R=-a e^{\mathcal H}+b$; ceiling $-a+b$ at zero entropy (Cui et al., 2025).
pass@1 vs pass@∞
pass@1 = mean accuracy; pass@∞ = coverage (fraction with p > 0). Sharpening raises the first and can lower the second.
k3 in the loss
On-policy expected gradient = ∇KL(π_ref ‖ π_θ), the forward KL, not the reverse KL in the objective.
Budget forcing
s1: append "Wait" to extend thinking, or force the end-of-thinking token to stop. AIME24 50% → 57%.
Why best-of-N declines
More samples, more verifier-fooling wrong answers: selection is optimization against the verifier.
Spurious rewards lesson
Random rewards help Qwen2.5-Math (+21.4) via clipping bias and code reasoning, not Llama/OLMo; run a random-reward baseline and re-verify "incorrect" labels (a later audit questions the +24.1).

§12Read next

DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
Shao et al. · 2024
Introduces GRPO: group-relative advantages, k3 KL in the loss, no critic.
GRPOorigin
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
DeepSeek-AI · 2025 (Nature 2025)
R1-Zero's pure RL from a base model, the R1 pipeline, and distillation beating RL on small models.
reasoningRLVR
DAPO: An Open-Source LLM Reinforcement Learning System at Scale
Yu et al. · 2025
Clip-higher, dynamic sampling, token-level loss, overlong shaping, with a step-by-step ablation.
algorithmrecipe
Understanding R1-Zero-Like Training: A Critical Perspective
Liu et al. · 2025
Length and difficulty biases in GRPO (Dr. GRPO), and the "aha moment" already in base models.
critiqueDr. GRPO
Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model?
Yue et al. · 2025 · NeurIPS (oral)
RLVR wins at small k, base at large k in their runs: disputed evidence for sharpening.
pass@kanalysis
Group Sequence Policy Optimization
Zheng et al. · 2025
Sequence-level importance ratios and clipping; stable MoE RL without routing replay.
GSPOMoE
MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention
MiniMax · 2025
CISPO, the FP32 LM-head fix, and a fully costed large RL run.
CISPOsystems
The Entropy Mechanism of Reinforcement Learning for Reasoning Language Models
Cui et al. · 2025
R = −a·e^H + b, entropy change as a covariance, and Clip-Cov/KL-Cov.
entropytheory
The Art of Scaling Reinforcement Learning Compute for LLMs
Khatri et al. · 2025
Sigmoid scaling fits for RL and a 400k-GPU-hour ablation of recipe choices (ScaleRL).
scalingrecipe
Tülu 3: Pushing Frontiers in Open Language Model Post-Training
Lambert et al. · 2024
Names and documents RLVR in a fully open pipeline.
RLVRopen
ProRL: Prolonged Reinforcement Learning Expands Reasoning Boundaries in Large Language Models
Liu et al. · 2025
Long, diverse RL with reference resets solves tasks the base model never does.
pass@kcounter-evidence
Spurious Rewards: Rethinking Training Signals in RLVR
Shao et al. · 2025
Random rewards improve Qwen2.5-Math via clipping bias and code reasoning; not other families.
methodology
Reasoning or Memorization? Unreliable Results of Reinforcement Learning Due to Data Contamination
Wu et al. · 2025
Argues contamination explains Qwen2.5's spurious-reward gains; on freshly generated problems only accurate rewards help.
contamination
Reinforcement Learning for Reasoning in Large Language Models with One Training Example
Wang et al. · 2025
One problem lifts MATH500 from 36.0% to 73.6% on Qwen2.5-Math-1.5B.
data
Kimi k1.5: Scaling Reinforcement Learning with LLMs
Kimi Team · 2025
Long-context RL with partial rollouts, mirror-descent objective, length penalty and long2short.
reasoninglength
Qwen3 Technical Report
Yang et al. (Qwen Team) · 2025
Thinking-mode fusion, thinking budgets, and on-policy distillation beating RL at 1/10 the cost.
reasoningdistillation
Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters
Snell et al. · 2024
Difficulty-adaptive test-time compute: more than 4× over best-of-N.
test-time
s1: Simple test-time scaling
Muennighoff et al. · 2025
1,000 examples plus budget forcing ("Wait") give controllable test-time scaling.
test-timelength
Training Verifiers to Solve Math Word Problems
Cobbe et al. · 2021
Best-of-N with verifiers, and its decline when the verifier is exploited.
verifiers
Reasoning Models Don't Always Say What They Think
Chen et al. · 2025 · Anthropic
CoT faithfulness is low and outcome RL does not fix it; reward hacks go unverbalized.
faithfulnesssafety