RLOO generates k rollouts per prompt and uses the mean of the other k-1 as each rollout's baseline. It needs no critic, keeps each rollout out of its own baseline, and gives unbiased advantages.
Imagine four students each solve the same math problem, and a teacher scores all four. To decide how good Alice's solution is compared to the rest, you average the scores of the other three students and compare Alice to that average. You do not include Alice's own score in the average, because that would bias the comparison toward her. Then you do the same for Bob, comparing him to the average of the other three. That tiny statistical trick is the whole heart of RLOO. The model generates several attempts at the same prompt and scores them. It learns more from the attempts that beat the typical attempt and less from the ones that lagged behind.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
RLOO solves a small problem with a clean trick. Policy gradient methods need a baseline to reduce gradient variance. PPO trains a separate critic network to produce that baseline, which works well but adds infrastructure: a value head, a separate loss, clipping, GAE. RLOO replaces all of that with a statistical operation over a small group of rollouts. It takes k rollouts per prompt and uses the leave-one-out mean as each rollout's baseline.
The name is literal. For rollout i, the baseline is the average reward of the other k-1 rollouts in the same group. The rollout's own reward is left out, which is what keeps the baseline unbiased and the gradient clean.
The payoff is that RLOO matches PPO on standard RLHF benchmarks with substantially simpler infrastructure. There is no critic network to train, no value loss to balance against the policy loss, no clipping epsilon to tune. The algorithm fits on a page and holds no critic weights or critic optimizer state in memory.
The leave-one-out formula
Start from the policy-gradient form. For each prompt, the policy generates k rollouts. The reward model scores each rollout, giving rewards r_1 through r_k. The policy gradient is the advantage-weighted log-probability of each rollout, summed across the group.
The advantage for rollout i is its reward minus a baseline. The baseline should be a reasonable estimate of the expected reward at this prompt, independent of rollout i's own action. RLOO computes the baseline as the mean of the other k-1 rewards:
The sum explicitly excludes index i. With k=4 and rewards [0.8, 0.5, 0.6, 0.7], the baseline for rollout 1 is (0.5 + 0.6 + 0.7) / 3 = 0.6, and the advantage is 0.8 - 0.6 = 0.2. For rollout 2 the baseline is (0.8 + 0.6 + 0.7) / 3 = 0.7, and the advantage is 0.5 - 0.7 = -0.2.
Each rollout has its own baseline, and that baseline depends only on the other rollouts in its group. The advantages of the k rollouts sum to zero by construction. So the policy gradient sees both positive (above the group's leave-one-out average) and negative (below it) signals, balanced symmetrically. This is the variance-reduction property baselines are supposed to deliver.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Method | Baseline source | Critic network? | Infrastructure complexity |
|---|---|---|---|
| PPO (actor-critic) | Learned value function | Yes (trained jointly) | High; value head, clipping, GAE |
| RLOO | Mean of other k-1 rollouts in same group | No | Low; just rollouts + REINFORCE |
| Vanilla REINFORCE | Running average or none | No | Lowest but highest variance |
| RAFT / expert iteration | Best-of-k filtering, supervised on top | No | Low; not a policy gradient |
Real products, models, and research that use this idea.
- Hugging Face TRL implements RLOOTrainer alongside DPOTrainer and GRPOTrainer. Current TRL sets the group size with num_generations; the older rloo_k parameter was deprecated in v0.22.0 and later removed.
- ReMax, another critic-free REINFORCE method, uses the reward of the greedy response as its baseline and reports about 46% GPU memory saving versus PPO for a 7B model.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does RLOO differ from GRPO, and when would you pick each?
GRPO (Group Relative Policy Optimization) also generates k rollouts per prompt but normalizes advantages by the group's standard deviation, scaling per-prompt variability. RLOO subtracts the leave-one-out mean without standardization. GRPO's scaling keeps the signal comparable across prompts; RLOO is simpler when reward variance is well-behaved.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Including rollout i's own reward in the baseline (the group mean of all k), which biases the advantage toward zero and reduces signal. Leave-One-Out excludes the rollout's own score by definition.
60 second bullets to scan on the way to the call.
The exact formula for the RLOO baseline as the mean of the other k-1 rewards
Why excluding the rollout's own reward keeps the baseline unbiased
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.