Skip to content

Understanding R1-Zero-Like Training: A Critical Perspective

optionalcorefrontierpaperrubric 12/122025 · ~45 min

Zichen Liu, Changyu Chen, Wenjun Li, … Min Lin

Read first: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models

Status

TL;DR. GRPO’s loss contains two normalizers that look harmless: it averages each response’s token losses (dividing by the response length) and divides each group’s centred rewards by their standard deviation. This paper shows that the first biases training toward long wrong answers and short right ones, and the second up-weights questions that are nearly always solved or nearly never solved. Dr. GRPO (“GRPO Done Right”) deletes both. It also re-examines R1-Zero-style training and finds that base models and prompt templates explain much of what was attributed to RL.

Why it matters now. Whenever you RL-train an agent whose outputs vary in length, such as a search agent with 3 or 30 tool calls, how you average the loss decides which trajectories get reinforced. The paper also shows how to read RL claims critically. Response length rising during training and “aha” phrases appearing are not, by themselves, evidence that reasoning was learned.

Start from the GRPO objective, with the two terms marked:

JGRPO=1G∑i=1G1∣oi∣⏟length∑t=1∣oi∣min⁡(ρi,tA^i, clip⁡(ρi,t)A^i),A^i=Ri−mean⁡(R)std⁡(R)⏟difficulty\mathcal J_{\text{GRPO}} = \frac1G\sum_{i=1}^{G}\underbrace{\frac{1}{|o_i|}}_{\text{length}}\sum_{t=1}^{|o_i|}\min\big(\rho_{i,t}\hat A_{i},\ \operatorname{clip}(\rho_{i,t})\hat A_{i}\big), \qquad \hat A_i = \frac{R_i-\operatorname{mean}(R)}{\underbrace{\operatorname{std}(R)}_{\text{difficulty}}}

To see why they matter, compare with the textbook policy gradient for a reward on the whole sequence. Here bb is any baseline that does not depend on the sampled answer:

∇J=E[(R−b) ∇log⁡πθ(o∣q)]=E[(R−b)∑t=1∣o∣∇log⁡πθ(ot∣q,o<t)].\nabla J = \mathbb E\Big[(R-b)\,\nabla\log\pi_\theta(o\mid q)\Big] = \mathbb E\Big[(R-b)\sum_{t=1}^{|o|}\nabla\log\pi_\theta(o_t\mid q,o_{\lt t})\Big].

Every token of an answer gets the same weight R−bR-b, and nothing else. Take one update per batch, so the ratio is 1 and the clip is inactive. Then GRPO gives token tt of answer ii the weight

1G⋅1∣oi∣⋅Ri−mean⁡(R)std⁡(R).\frac{1}{G}\cdot\frac{1}{|o_i|}\cdot\frac{R_i-\operatorname{mean}(R)}{\operatorname{std}(R)} .

The two extra factors are the biases.

Length bias, from 1/∣oi∣1/|o_i|. The weight on an answer’s whole log-probability is A^i/∣oi∣\hat A_i/|o_i|, so it shrinks as the answer gets longer.

  • For a correct answer (A^>0\hat A>0), short answers get a larger push up, which favours brevity among correct answers.
  • For a wrong answer (A^<0\hat A\lt 0), long answers get a smaller push down, which favours length among wrong answers.

In the running example (G=4G=4, rewards [1,0,0,0][1,0,0,0], so A^=−0.58\hat A=-0.58 for each wrong answer), a 100-token wrong answer gets −0.0058-0.0058 per token. A 1000-token wrong answer gets −0.00058-0.00058 per token, a push down ten times weaker. Over many steps, failing answers drift longer.

Difficulty bias, from std⁡(R)\operatorname{std}(R). With binary rewards and a fraction pp of the group correct, std⁡=p(1−p)\operatorname{std}=\sqrt{p(1-p)}. Dividing by it multiplies each question’s gradient by 1/p(1−p)1/\sqrt{p(1-p)}. With G=8G=8 that factor is about 3.0 when 1 or 7 answers are correct and 2.0 when 4 are correct. Questions that are almost always solved, or almost never, get more weight than the unbiased gradient would give them. The paper notes that advantage normalization is usually done across a whole batch, where it rescales all questions equally. Done per question, it reweights questions.

The two normalization terms in GRPO that Dr. GRPO removes, and the bias each one creates Top: the GRPO objective, with the per-response length divisor one over the length of output i highlighted, and the advantage defined as the reward minus the group mean, divided by the group standard deviation, which is also highlighted. Left: the length divisor sets each token's weight to the advantage divided by the response length. A wrong answer of 100 tokens gets minus 0.0058 per token, while a wrong answer of 1000 tokens gets minus 0.00058 per token, a ten times weaker push down, so wrong answers drift longer; short correct answers get larger pushes up. Right: with binary rewards and G equal to 8, the standard deviation is the square root of p times one minus p, where p is the fraction correct. Dividing by it multiplies the gradient by about 3.0 for questions with one or seven correct answers, by 2.0 for four correct, and a fully solved question gives no signal. Bottom: Dr. GRPO drops both terms, uses reward minus group mean as the advantage, sums token losses and divides by a constant. J = (1/G) Σᵢ 1/|oᵢ| Σₜ min(ρᵢₜ·Âᵢ, clip(ρᵢₜ, 1−ε, 1+ε)·Âᵢ) Âᵢ = (Rᵢ − mean(R)) ÷ std(R) Two normalizers in the GRPO loss length bias difficulty bias Length bias: the 1/|oᵢ| term per-token weight = Âᵢ / |oᵢ| (here  = −0.58) wrong answer, 100 tokens −0.0058 per token wrong answer, 1000 tokens −0.00058 per token: 10× weaker short correct answers get bigger pushes up; long wrong answers escape, so length grows Difficulty bias: the std term binary rewards, G = 8: std = √(p(1 − p)) p = 1/8 (hard) × 3.0 p = 4/8 × 2.0 p = 7/8 (easy) × 3.0 p = 8/8 std = 0: no signal near-solved and near-hopeless questions get the most weight per unit of reward gap Dr. GRPO: delete both. Âᵢ = Rᵢ − mean(R); sum over tokens, then divide by a constant (the generation budget), not by each |oᵢ|
Original sketch. The per-response length divisor sets each token's weight to Â/|oᵢ|, so long wrong answers escape most of the penalty. The per-question std divisor multiplies the gradient by 1/std, up-weighting lopsided questions. Dr. GRPO removes both.

The fix. Dr. GRPO uses A~i=Ri−mean⁡(R)\tilde A_i = R_i-\operatorname{mean}(R), sums token losses, and divides by a constant (the generation budget, MAX_TOKENS) instead of by each ∣oi∣|o_i|. A constant divisor only rescales the learning rate. Multiplying A~i\tilde A_i by G/(G−1)G/(G-1) gives exactly the leave-one-out baseline of RLOO (App. A). In the running example the advantages become +0.75+0.75 and −0.25-0.25; times 4/34/3 they are RLOO’s +1+1 and −1/3-1/3. The paper also sets the KL coefficient to 0, arguing that a rule-based verifier does not need the reference anchor that a learned reward model needs.

The length bias is not only in GRPO. The paper checked several open-source PPO implementations and found that all of them normalize the loss by response length (Table 2). They do this either per response (for example OpenRLHF) or per batch (for example trl and verl). So PPO runs inherit a version of the same artefact, even though the PPO objective on paper does not have it. DAPO’s “token-level” loss divides by the total number of tokens across all G answers (its eq. 12). That removes the bias between answers to the same question, but the scale still changes from group to group with the group’s total length.

Keep this separate from clipping. The clip in PPO and GRPO limits how far each token’s ratio moves; it is a different mechanism. The length bias here comes purely from how token losses are averaged, and it exists even when the clip never fires.

  • Training dynamics (Fig. 5, Qwen2.5-1.5B base, R1 template). Both methods get longer as reward rises, as in R1-Zero. GRPO keeps getting longer after reward improvement slows. Dr. GRPO’s length levels off, and its incorrect answers on benchmarks are much shorter, at similar or better accuracy.
  • Ablation (App. C, Figs. 8–9). This compares GRPO, GRPO without length normalization, GRPO without std normalization, and Dr. GRPO. Removing the length divisor is what shortens responses. All three ablated variants beat vanilla GRPO on reward and accuracy. The gains are consistent over three seeds.
  • Minimal recipe (Table 4). The model, Oat-Zero-7B, starts from Qwen2.5-Math-7B and trains with Dr. GRPO on MATH level 3–5 questions using the Qwen-Math template. It took about 27 hours on 8 A100s with a 3,000-token budget. Scores: AIME24 43.3, AMC 62.7, MATH500 80.0, Minerva 30.1, OlympiadBench 41.0, average 51.4. This compares with 46.6 for SimpleRL-Zero-7B, 48.0 for PRIME-Zero-7B and 45.1 for Qwen2.5-Math-7B-Instruct, all evaluated at 3,000 tokens. Two caveats: much of the lead comes from AIME24, which has only 30 problems (43.3% is 13 of them), and R1-Distill-Qwen-7B scores 54.7 when given 8,000 tokens.
  • Templates and base models (§2). Qwen2.5-Math base models answer questions best without any template, which suggests they were pretrained on question–answer text. On Qwen2.5-Math-1.5B, RL from different templates ends near the same average of about 40%, given a suitable question set (Fig. 6). With the Qwen-Math template, RL on easy GSM8K questions nearly doubled accuracy on harder benchmarks.
  • “Aha” in the base model (§2.3). DeepSeek-V3-Base already produces self-reflection. In DeepSeek-R1-Zero’s outputs, self-reflection was not positively correlated with accuracy.
  • The main ablations use small Qwen models on math with binary rewards. Whether the std term hurts with graded rewards, larger models or other domains is not settled.
  • Up-weighting hard-but-solvable questions is sometimes desirable, as curriculum or prioritized sampling (see Kimi k1.5). Calling it a “bias” means it differs from the expected-reward gradient, not that it is always worse.
  • A constant divisor makes the gradient grow with the number of generated tokens. Gradient clipping and Adam partly normalize this away, so the effective learning rate still depends on length.
  • Length is also shaped by truncation, overlong penalties and the maximum budget. The paper isolates one factor; real runs mix several.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Running example: G = 4, rewards [1, 0, 0, 0], lengths [200, 100, 400, 1000] tokens, ratio 1. Compute the weight multiplying each token's ∇log π under GRPO (Â/|oᵢ|, population std) and under Dr. GRPO (R − mean, divided by a constant 3000). Drop the common 1/G. Which wrong answer is pushed down least under each method?

    What a strong answer covers
    • GRPO advantages: +1.73 and −0.58. Per-token weights: correct 1.73/200 ≈ +0.0087; wrong 100-token −0.0058; wrong 400-token −0.00145; wrong 1000-token −0.00058.
    • The whole-sequence log-probability gradient of answer i is scaled by Âᵢ/|oᵢ|, so the 1000-token wrong answer is pushed down 10× less than the 100-token one.
    • Dr. GRPO advantages: +0.75 and −0.25. Per-token weights: +0.75/3000 = +0.00025 and −0.25/3000 ≈ −0.000083 for every wrong token, whatever the answer length.
    • Under Dr. GRPO each wrong answer's sequence gradient is pushed down with weight proportional to −0.25 per token, so longer wrong answers receive more total push-down, as in the true policy gradient Σₜ (R − b)∇log π.
    • Least pushed down: the longest wrong answer under GRPO; no answer is favoured per token under Dr. GRPO.
  2. Derive / compute

    For binary rewards with G = 8 and k correct answers (p = k/8), derive the question-level multiplier that GRPO's std division applies relative to mean-only centring. Evaluate it for k = 1, 4, 7 and 8, and compute the summed |advantage| per question under both methods for k = 1 and k = 4.

    What a strong answer covers
    • std = √(p(1 − p)). GRPO's advantage is the centred reward times 1/std, so the multiplier is 1/√(p(1 − p)).
    • k = 1 or 7: std ≈ 0.331, multiplier ≈ 3.0. k = 4: std = 0.5, multiplier 2.0. k = 8: std = 0, the group gives no signal under either method.
    • Summed |centred reward| = 2G·p(1 − p): k = 1 gives 1.75, k = 4 gives 4.0. With std: 2G·√(p(1 − p)): k = 1 gives about 5.3, k = 4 gives 8.0.
    • So both methods still give a hard question less total gradient than a 50/50 one, but GRPO shrinks the gap (0.66 of the k = 4 total rather than 0.44). Lopsided questions are up-weighted relative to the unbiased gradient.
    • The same 1/std also inflates tiny reward differences when rewards are graded or noisy, since a near-zero std divides them.
  3. Mechanism

    Explain, at the level of what gradient each sequence receives, why GRPO's 1/|oᵢ| term makes incorrect responses grow longer over training while correct ones are pushed toward brevity. Why does the paper argue that some of the "emergent long chain of thought" in R1-Zero-style runs is confounded by this term?

    What a strong answer covers
    • The policy gradient of a sequence is (R − b)·Σₜ ∇log π(oₜ). Dividing by |oᵢ| turns this into an average, so each sequence's total weight no longer grows with its length.
    • For a negative advantage, a longer wrong answer spreads the same penalty over more tokens, so each token is discouraged less and long failing behaviours survive.
    • For a positive advantage, a short correct answer concentrates its credit on fewer tokens, so brevity is rewarded among correct answers.
    • As accuracy saturates, wrong answers dominate the length signal, and GRPO keeps getting longer even when reward stops improving (Fig. 5). Dr. GRPO's length plateaus and its wrong answers are shorter.
    • So "response length goes up with RL" is partly an optimizer artefact, not only evidence of learned reflection.
  4. What if…

    Appendix C ablates GRPO, GRPO without length normalization, GRPO without std normalization, and Dr. GRPO on Qwen2.5-1.5B. What did each variant show about length and accuracy, and what would you still want before concluding that the std term is harmful in general?

    What a strong answer covers
    • Removing the 1/|o| term (alone or with std) gives shorter responses, so the length divisor drives most of the length growth (Fig. 8).
    • All three ablated variants beat vanilla GRPO in training reward and evaluation accuracy, so removing either term helped here.
    • Three-seed runs (Fig. 9) show Dr. GRPO's gains in token efficiency and accuracy are consistent across seeds.
    • Missing: larger models, non-math tasks, graded or noisy rewards, and multiple inner epochs where clipping is active. Difficulty weighting could help as a curriculum in other regimes.
  5. Critique

    Dr. GRPO is described as unbiased. Unbiased for which objective, and does dividing by a constant MAX_TOKENS fully remove length effects? Name one way the fixed constant or DAPO's per-group token count still changes the effective learning rate, and design an experiment that would separate the two.

    What a strong answer covers
    • Unbiased for the policy gradient of expected sequence reward (β = 0) with a Monte Carlo baseline; mean-centring times G/(G − 1) equals the RLOO advantage, which is unbiased.
    • A constant divisor only rescales the learning rate. But the total gradient now grows with the number of generated tokens, so long batches give larger steps, which gradient clipping and Adam then partly undo.
    • DAPO divides by the total tokens across the G answers: no per-response bias within a group, but the scale changes from group to group with total length.
    • Experiment: train with length-matched and length-skewed batches under each aggregation, log the gradient norm and the per-sequence effective weight, and check whether accuracy and length trends differ at equal tuned learning rates.
  6. Design

    You train a multi-turn search agent with GRPO. A trajectory has model tokens and much longer tool-output tokens (retrieved passages), the reward is answer F1, and trajectory lengths vary from 300 to 20,000 tokens. Choose the loss aggregation and advantage normalization, and justify each choice using the two Dr. GRPO biases.

    What a strong answer covers
    • Mask tool-output tokens: the policy did not generate them, so they get no log-probability gradient and should not count in any length divisor.
    • Do not divide by each trajectory's length; otherwise long failing searches are barely penalized and the agent learns to search forever. Sum over model tokens and divide by a fixed budget.
    • Answer F1 is graded and often nearly tied within a group; dividing by a tiny std inflates noise. Use mean-centring, or batch-level rather than group-level std.
    • Add an explicit, measured cost for tool calls or tokens if shorter search is desired, instead of relying on a normalization artefact.
    • Monitor the length of failed versus successful trajectories over training as the diagnostic Dr. GRPO uses.

Done with this page?

Status