↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Loading the recording…

What RLOO is

Reinforcement learning with verifiable rewards samples answers, scores them with a rule, and makes the well-scored answers more likely. The simplest way to do the last step is REINFORCE: raise of each sampled answer in proportion to its reward. Its gradient estimate is unbiased but very noisy, so practical methods subtract a baseline from the reward. PPO (the RLHF tab) learns a value model as its baseline; GRPO (the GRPO tab) uses the mean reward of a group of answers to the same prompt. REINFORCE leave-one-out (RLOO) also samples answers per prompt, but gives each answer a baseline built from the other only.

This page runs eight real RLOO updates of Qwen2.5-0.5B-Instruct with TRL's RLOOTrainer settings, on the GRPO tab's two GSM8K problems (test rows 1 and 3), its system prompt and its rewards: 1 if the number in the last \boxed{} is the reference answer, plus 0.5 if there is a \boxed{} at all. Each round samples answers per problem at temperature 1, scores them and takes one AdamW step at a learning rate of ; a ninth round is only sampled, to show where the policy ended up.

k samples, verifiable rewards

The k = 8 samples panel lists one problem's answers with their reward chips. Round 1 uses the GRPO tab's random seed and starts from the same weights, so its 16 answers are the GRPO tab's round-1 answers, token for token; the RLOO and GRPO pages can therefore be read side by side on identical samples. Later rounds differ, because each method has changed the policy differently by then.

In round 1 the starting model gets 2 of 8 answers right on each problem and puts a final answer in a box in 5 and 6 of them; the mean reward is 0.59.

The leave-one-out baseline

For answer of a prompt with rewards , the baseline is the mean of the others and the advantage is what is left:

Because does not depend on answer itself, subtracting it leaves the expected gradient unchanged: the estimate stays unbiased, as Kool et al. showed for sampling without a learned critic. The group mean that GRPO subtracts includes , which shrinks every advantage by but changes nothing else. The Leave-one-out baseline panel works this out for the selected answer and draws all advantages; they always sum to 0, and a group whose answers all score the same gets everywhere and teaches nothing.

GRPO goes one step further and divides by the group's standard deviation, . The GRPO's advantages on the same samples table sets the two side by side: within a group they have the same order and signs and differ by the factor . Across groups they differ. GRPO rescales every group to unit spread, so a group where one answer out of eight is right pushes as hard in total as a group split four to four; RLOO keeps rewards in their own units. Liu et al. point to this per-group scaling, and to GRPO's length averaging, as biases.

The REINFORCE update

RLOO treats a whole answer as one action. The loss TRL's RLOOTrainer minimises uses the sequence ratio , clipped as in PPO:

With one update per sample (TRL's default), the policy being updated is the one that sampled, so , nothing is clipped, the loss value is , and the gradient is plain REINFORCE, with summed over the answer's tokens. Every token of an answer gets the same weight . GRPO averages each answer's tokens instead, weight , so a long answer pulls harder in RLOO.

The REINFORCE update panel shades the selected answer's tokens by how much the update changed their log-probability and lists each answer's total change. Across all eight updates, 67 of the 81 answers with became more likely right after their update and 38 of the 39 with less likely: through shared weights one step does not move every answer the way its own asks. On round 1, which both tabs train on, one RLOO step and the GRPO tab's first step move the 16 answers almost identically (row 1's answer 5, for example, by +23.7 and +20.5 nats), because AdamW's first step moves every weight by about lr however the gradient is scaled. After round 1 each method samples its own answers.

Eight updates

The strip follows the run. The mean reward of each fresh sample rises from 0.59 in round 1 to 1.31 after one update and to 1.5 after eight, when all 16 answers of the final sample are correct and boxed; the GRPO tab, with two updates on each sample, stood at 1.06 after its eight. With eight answers per problem these means also carry sampling luck. In round 7 all eight answers to row 3 were right, so that group's advantages were all 0. Every update's loss is 0 to within , while the gradient's norm before clipping to 1 lay between 198 and 876: log-probabilities summed over about 200 tokens, scaled by rewards in their own units.

RLOO usually puts a KL penalty into the reward, , and TRL's default is . This run uses , so that RLOO and GRPO see the same rewards; the third strip chart shows the penalty TRL's default would have subtracted, computed from the recorded log-probabilities of the policy and the starting model. It grows as the policy drifts: the summed log-ratio averages 8.7 nats over round 2's answers and 30.7 over the final sample's, so would subtract about 1.5 per answer by the end, as much as a correct, boxed answer earns. Only its differences within a group would change the advantages, since the leave-one-out baseline removes anything all answers share.

Where RLOO came from

Williams (1992) introduced REINFORCE and the idea of subtracting a baseline. Kool, van Hoof and Welling (2019) showed that with several samples per input each sample can use the others' mean as a baseline without bias. Ahmadian et al. (2024) argued that for fine-tuning language models from human feedback PPO's machinery is unnecessary: treating the whole completion as one action and using RLOO's baseline matched or beat PPO with less memory. GRPO (Shao et al., 2024, the GRPO tab) uses the group mean and standard deviation instead, DAPO (the DAPO tab) changes GRPO's clipping, sampling and loss, and Dr. GRPO (Liu et al., 2025) removes GRPO's length and standard-deviation normalisation, which brings it back close to RLOO.

Papers

  1. Back to Basics: Revisiting REINFORCE Style Optimization for Learning from Human Feedback in LLMs Arash Ahmadian et al. · ACL 2024 Argues that REINFORCE with a whole completion as one action and the leave-one-out baseline (RLOO) matches or beats PPO for RLHF.
  2. Buy 4 REINFORCE Samples, Get a Baseline for Free! Wouter Kool, Herke van Hoof, Max Welling · ICLR Workshop 2019 Introduces the leave-one-out baseline for several samples per input, unbiased with no learned critic.
  3. Simple statistical gradient-following algorithms for connectionist reinforcement learning Ronald J. Williams · Machine Learning 1992 REINFORCE, the score-function gradient estimator, and the observation that any baseline independent of the action keeps it unbiased.
  4. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models Zhihong Shao et al. · arXiv 2024 GRPO, whose group-normalised advantages this page compares with RLOO's on the same samples (see the GRPO tab).
  5. Understanding R1-Zero-Like Training: A Critical Perspective Zichen Liu et al. · arXiv 2025 Dr. GRPO: shows GRPO's per-group standard-deviation and per-answer length normalisation bias the update and removes them.
  6. Training Verifiers to Solve Math Word Problems Karl Cobbe et al. · arXiv 2021 GSM8K, the grade-school maths problems whose test rows 1 and 3 this page trains on.
  7. Qwen2.5 Technical Report Qwen Team · arXiv 2024 Qwen2.5-0.5B-Instruct, the policy on this page.

See also