Sam Babichenko

Reading notes / Reinforcement learning for reasoning

Tricks or traps in RL for reasoning

Liu et al., 2025

Advantages
K;K; rkr_kresponses per prompt; reward of response k (1 correct, 0 wrong)
meangroup,\mathrm{mean}_{\rm group}, stdgroup\mathrm{std}_{\rm group}mean and standard deviation of the prompt's K rewards
meanbatch,\mathrm{mean}_{\rm batch}, stdbatch\mathrm{std}_{\rm batch}mean and standard deviation of all rewards in the batch
A^kgroup,\hat A^{\rm group}_k, A^kbatch,\hat A^{\rm batch}_k, A^klite\hat A^{\rm lite}_kadvantages standardized per group, per batch, and Lite PPO's mix
ppfraction of correct responses in a group
Loss
ρt\rho_ta token's probability ratio, current over sampling policy
ϵlow,\epsilon_{\rm low}, ϵhigh\epsilon_{\rm high}lower and upper clipping thresholds of the ratio
Constants
128 × 8prompts per step × responses per prompt
8,192length limit of the baseline, in tokens
10−610^{-6}learning rate of every run
5,000problems in each of the easy, medium and hard sets
0.2; 0.28; 0.32default ϵhigh\epsilon_{\rm high}; DAPO's; best tried for Qwen3-4B (Step 6)
0.003clip rate of the base models (Step 5)
8K; 20Klength limits compared for overlong filtering (Step 8)

Context. RL recipes for reasoning built on group relative policy optimization: PPO-style clipped updates without a value model, where each response's advantage is its reward standardized within the group of responses to the same prompt stack many small techniques, and published recipes disagree about them. GRPO standardizes rewards within each prompt's group while a critic-free RL method for language models that standardizes advantages over the whole batch standardizes over the batch; GRPO divides by the standard deviation while a GRPO variant that removes the division by each answer's length and by the group's standard deviation, arguing that both bias the gradient argues against it; GRPO averages the loss within each response while a GRPO variant that raises the upper limit of the ratio clip, averages the loss over all tokens, drops groups with all-equal rewards, and softly penalizes overlong responses averages over all tokens of the batch. Each recipe was tested on its own models, data and settings, so the disagreements may come from the settings. Liu et al. rerun the common techniques one at a time in one framework and on one baseline, with base and post-trained Qwen3 models at 4B and 8B and training sets of three difficulty levels. Most techniques help in some settings and hurt in others, and three properties of the setting decide which: whether the starting model is a base model or an already post-trained one, how often all responses to a prompt get the same reward, and how much of the length limit the reasoning needs. A recipe should be chosen by checking these, and a short one chosen this way (two techniques on the plain PPO loss) trained base models better than GRPO and DAPO. The study extends the argument behind Dr. GRPO, that dividing by the group's standard deviation reweights prompts by difficulty, into an account of when each technique matters.

Dividing advantages by a standard deviation of the rewards enlarges the updates more the more uniform the rewards are, which on easy data they become, and the run destabilizes; with the mean taken per group and the standard deviation over the whole batch, the scale stays bounded (Steps 2 to 4). Raising the ϵhigh\epsilon_{\rm high} in PPO's clip of each token's probability ratio to [1−ϵlow,1+ϵhigh][1-\epsilon_{\rm low},1+\epsilon_{\rm high}]; a token whose ratio passes it with positive advantage stops contributing gradient slows the collapse of the average entropy of the policy's next-token distribution over generated tokens; its collapse means the policy has become nearly deterministic and stops exploring in post-trained models and improves their accuracy, while in base models, where the clip is rarely active, it changes little or hurts (Steps 5 and 6). Averaging the loss over tokens helps base models and loses to averaging within responses on post-trained ones (Step 7). Leaving truncated responses out of the loss helps when the length limit is short, where many of them are valid reasoning stopped early, and does little when it is long, where they are mostly repetitive text that never ends (Step 8). the clipped PPO objective without a value model, with advantages (rk−group mean)/batch standard deviation(r_k-\text{group mean})/\text{batch standard deviation} and the loss averaged over all tokens of the batch, which keeps only the batch-scale standardization and token averaging, trains base models more stably than GRPO and DAPO (Step 9).

Setting. All runs use the ROLL framework and one baseline: the each token's loss is −min⁡(ρtA^, clip(ρt,1−ϵlow,1+ϵhigh)A^)-\min(\rho_t\hat A,\ \mathrm{clip}(\rho_t,1-\epsilon_{\rm low},1+\epsilon_{\rm high})\hat A), with ρt\rho_t the token's probability ratio between the current policy and the one that sampled it and A^\hat A the response's advantage with no value model and advantages computed from the rewards alone, as in REINFORCE; 128 prompts with 8 responses each per step, responses of up to 8,192 tokens, learning rate 10−610^{-6}, and sampling at temperature 0.99 (top-pp 0.99, top-kk 100). The reward is 1 for a correct final answer and 0 otherwise. The models are Qwen3-4B-Base and Qwen3-8B-Base, which are pretrained only, and Qwen3-4B and Qwen3-8B, which the paper calls the released post-trained Qwen3 models, which already reason at length; the paper's term, used here as post-trained. There are three training sets of 5,000 problems each: easy (from SimpleRL-Zoo's easy split, GSM8K and MATH level 1), medium (the easiest 5,000 of DeepMath-103K) and hard (DeepMath-103K sampled in proportion to difficulty), all with most True/False questions removed, since models often reach the right Boolean through wrong reasoning. Test accuracy is averaged over MATH-500, OlympiadBench, Minerva Math, AIME 2024 and 2025 and AMC 2023. For a prompt with the number of responses per prompt, 8 responses and rewards r1,…,rKr_1,\dots,r_K, the standardizations differ in where the mean and the standard deviation are taken: A^kgroup=rk−meangroupstdgroup,A^kbatch=rk−meanbatchstdbatch,A^klite=rk−meangroupstdbatch,\begin{aligned}\hat A^{\rm group}_k&=\frac{r_k-\mathrm{mean}_{\rm group}}{\mathrm{std}_{\rm group}},\\ \hat A^{\rm batch}_k&=\frac{r_k-\mathrm{mean}_{\rm batch}}{\mathrm{std}_{\rm batch}},\\ \hat A^{\rm lite}_k&=\frac{r_k-\mathrm{mean}_{\rm group}}{\mathrm{std}_{\rm batch}},\end{aligned} with group statistics over the prompt's KK rewards and batch statistics over all rewards in the batch. average each response's token losses, then average over responses, so every response has the same total weight and sum all token losses in the batch and divide by the total number of tokens, so every token has the same weight differ in how token losses are combined. clipping the ratio to [1−ϵlow,1+ϵhigh][1-\epsilon_{\rm low},1+\epsilon_{\rm high}] with ϵhigh>ϵlow\epsilon_{\rm high}\gt\epsilon_{\rm low}; the default is 0.2 on both sides, DAPO's upper value 0.28 raises only the upper threshold, and leaving responses truncated at the length limit out of the loss instead of scoring them as wrong changes how truncated responses count.

Main findings (all empirical). Post-trained models start far higher than base models and gain only about 2 points of accuracy from RL in this setup. With 0/1 rewards, standardizing within groups was more stable than standardizing over the batch, whose runs sometimes collapsed when a few outlying responses dominated a skewed batch. On easy data the batch's reward standard deviation fell from about 0.48 to below 0.25, and runs that divided by it collapsed while runs that only subtracted the mean kept improving; on hard data it stayed near 0.5 and both behaved alike. With the mean taken per group, dividing by the batch's standard deviation beat dividing by the group's on most benchmarks for both base models, on easy and hard data. Raising ϵhigh\epsilon_{\rm high} from 0.2 to 0.28 slowed the fall of entropy and raised accuracy for post-trained models and had little effect on base models or slightly lowered their accuracy; Qwen3-4B kept improving up to 0.32, the largest value tried, and Qwen3-8B did best at 0.28. Token-level aggregation beat sequence-level for Qwen3-8B-Base and lost to it for Qwen3-8B. Overlong filtering helped Qwen3-8B-Base clearly at a limit of 8K tokens and little at 20K. Lite PPO beat GRPO and DAPO on both base models, most clearly on Qwen3-4B-Base, where GRPO and DAPO collapsed after their peak.

Consequences and limits. The guidance reads as a short decision list. From a base model, standardize with the group mean and the batch standard deviation, average the loss over tokens, and keep the symmetric clip, which is Lite PPO. From a post-trained reasoning model, raise the upper clipping threshold (0.28, higher for a 4B model), average within responses, and expect small gains. When most groups are all right or all wrong, as on data that is easy for the model, avoid dividing by a group's standard deviation: drop the division, or divide by the batch's with the group mean, as Lite PPO does (though the runs that collapsed on easy data also divided by the batch's standard deviation, and which mean they subtracted is unclear; Technical notes). When the length limit is short for the reasoning the task needs, filter truncated responses out of the loss; when it is long, filtering matters less but keeps the model from drifting into repetition that never ends. The evidence has limits, some of which the authors state: one model family (Qwen3), one smoothed curve per setting with no repeated seeds, comparisons read off curves on six benchmarks of which two have 30 problems, and Lite PPO tested only on base models against GRPO and DAPO in their standard forms. Base and post-trained models differ in several ways at once (accuracy, entropy, response length), so a finding labeled by model type may follow any of them.

Step 1

The starting model and the difficulty of the data set decide how much RL can add. Accuracy curves differ strongly across the three training sets, and on harder problems the models respond by generating more tokens. Post-trained models start with much higher accuracy and longer responses than base models and gain only about 2 points over training. The comparisons of standardization methods therefore use the base models, whose low starting scores leave room to tell techniques apart, and the other techniques are checked on both kinds.

Step 2

Standardizing within groups is the more stable default with 0/1 rewards. Group-level standardization compares each response only with the other responses to the same prompt, and batch-level standardization compares it with every response in the batch. With 0/1 rewards, group-level standardization gave more stable training and higher final accuracy than batch-level standardization or none, on both base models; batch-level runs were sensitive to skewed batches and sometimes collapsed when a few outlying responses dominated the advantages. The first version also reports that batch-level standardization worked well again with rewards of ±1\pm1, which the formula cannot explain (Technical notes). This note follows the current version; the comparison of this step is from the first version, since the current one keeps its main figure and lists it among the contributions but has dropped its text and the main figure of the ±1\pm1 runs.

Step 3

Dividing by the standard deviation enlarges updates once rewards concentrate. When almost every response gets the same reward, the standard deviation of the rewards is small, and dividing by it multiplies the advantages by a factor that grows as the model masters the data. On the easy set the batch's reward standard deviation fell from about 0.48 to below 0.25 (read off the paper's figure), so the factor 1/std1/\mathrm{std} by which the division multiplies every advantage rose from about 2 to above 4; runs with the division improved and then collapsed, on OlympiadBench from about 40% to about 20% (same figure), while runs that only subtracted the mean kept improving. On the hard set the standard deviation stayed near 0.5, its largest possible value for 0/1 rewards, and the two runs were close. Within a group with a fraction pp of correct responses, the standard deviation of the rewards is p(1−p)\sqrt{p(1-p)}, so dividing by the group's value enlarges most the prompts the model almost always or almost never solves, the difficulty weighting of the argument behind Dr. GRPO.

Step 4

The group mean with the batch standard deviation is the most robust combination. With the mean taken per group, the paper compares dividing by the group's standard deviation and by the batch's. The batch version gave higher accuracy on most benchmarks for Qwen3-4B-Base and Qwen3-8B-Base, on both easy and hard data. The batch's standard deviation pools prompts of different difficulty, so it does not shrink when one group's rewards are nearly uniform and gives the whole batch one scale, while the group mean still gives each response a baseline from its own prompt. This supports the claim of REINFORCE++ that a per-group mean with a batch-wide standard deviation can work better.

Step 5

Raising the upper clipping threshold helps post-trained models and does little for base models. In base models the ratio clip is rarely active, at a clip rate of about 0.003, so successive policies are already close; raising ϵhigh\epsilon_{\rm high} from 0.2 to 0.28 barely changed their entropy and slightly lowered their accuracy. In post-trained models entropy fell quickly under the symmetric clip, and the higher threshold slowed that fall and raised test accuracy on medium and easy data. At 0.2 the tokens clipped most often were connectives at the start of sentences, such as "therefore", "if" and "but", which often open a new direction in the reasoning; at 0.28 clipping was rarer and fell mostly on function tokens such as "is", "the" and the comma. The authors read this as the higher threshold letting the model vary the structure of its reasoning while still restraining common tokens.

Step 6

The best upper threshold depends on model size. On medium data with ϵhigh\epsilon_{\rm high} in {0.20,0.24,0.28,0.32}\{0.20,0.24,0.28,0.32\}, Qwen3-4B's accuracy rose steadily with the threshold and was best at 0.32, the largest value tried, while Qwen3-8B showed no trend and did best at 0.28, DAPO's default. The paper calls the 4B pattern a "scaling law"; with four values and one run each it is a monotone trend, and where it stops is unknown.

Step 7

Averaging over tokens helps base models, and averaging within responses is better for post-trained ones. Under sequence-level aggregation every response has the same total weight, so a token of a long response counts less than a token of a short one; under token-level aggregation every token counts the same. For Qwen3-8B-Base, token-level aggregation improved convergence, peak accuracy and robustness, most on hard data. For Qwen3-8B, sequence-level aggregation converged faster and ended higher on most benchmarks. The authors' reading is that post-trained models already produce stable, well-formed reasoning, which sequence-level weighting preserves.

Step 8

Filtering truncated responses helps when the length limit is short. With Qwen3-8B-Base and limits of 8K, 16K and 20K tokens, filtering helped clearly at 8K and little at 20K. At 8K many truncated responses are long but valid reasoning, so scoring them 0 penalizes useful work; with filtering the model learned to answer more briefly. At 20K the truncated responses were mostly repetitive text that never terminates, so filtering removed little useful signal, and filtered models produced longer responses than unfiltered ones. On post-trained Qwen3-8B without filtering, the share of repetitive outputs among truncated ones grew during training, to about 0.5 by step 1,500, a sign that the model was losing the ability to end its responses; with filtering it stayed near 0.1 to 0.15 (read off the paper's figure).

Step 9

Two techniques on the plain PPO loss beat GRPO and DAPO on base models. Lite PPO combines the group-mean, batch-standard-deviation advantage of Step 4 with the token-level aggregation of Step 7, on the clipped PPO loss without a value model, and replaces or drops the rest of DAPO (per-group standardization, the higher upper threshold, removal of all-equal groups, the overlong penalty). On Qwen3-4B-Base it rose steadily on easy and hard data while GRPO and DAPO peaked and collapsed; on easy data its accuracy reached about 43% against about 26% for the collapsed runs, and on Qwen3-8B-Base with hard data about 48% against about 40% for GRPO and DAPO (read off the paper's first figure). On Qwen3-8B-Base with easy data the three were close. The authors attribute the gains to the batch-scale standardization, which does not inflate the advantages of groups with nearly uniform rewards, and, for the 8B model on hard data, to the absence of overlong filtering, which leaves it free to produce long outputs.

Terms

Group vs batch standardization
subtract the mean and divide by the standard deviation of the prompt's rewards, or of the whole batch's
Standard deviation and concentrated rewards
a group's std is p(1−p)\sqrt{p(1-p)}; dividing by a small std enlarges updates; on easy data the batch std fell below 0.25 and runs collapsed
Group mean, batch std
the most robust standardization for base models: per-prompt baseline, one scale for the batch
Clip-higher
raise only ϵhigh\epsilon_{\rm high}; helps post-trained models (0.28, 0.32 for 4B) and does little for base models, whose clip rate is about 0.003
Token vs sequence aggregation
token-level for base models; sequence-level for post-trained models
Overlong filtering
leave truncated responses out of the loss; helps at an 8K limit, little at 20K; prevents growth of never-ending repetition
Lite PPO
PPO clipped loss without a value model, group-mean batch-std advantages, token-level aggregation; beat GRPO and DAPO on base models
Aligned (the paper's term)
the released post-trained Qwen3 models; they gain about 2 points from RL here
Decision rule
check the starting model, how often groups have all-equal rewards, and the length limit before choosing techniques

Quiz

  1. Which loss aggregation does the paper recommend for a post-trained reasoning model, and why?
  2. A practitioner starts RL from Qwen3-8B, a post-trained model, on data where most groups are all correct. Which setup follows the paper?
  3. Why might a finding labeled 'base model versus aligned model' not be about post-training itself?

Sources