Frontier Foundry

RL with Verifiable Rewards

The Training Gym · Post-training, RL & Reasoning

RL where a program can check the answer (tests pass, math is right), so rewards are cheap and honest.

Also called: RLVR, verifiable reward, verifiable rewards, rl with verifiable. In the glossary.

How it works, as a machineThe Training Gym · tasks

Follow one task from a trace pulled from the logs to a stronger model's exam, in a GPU cluster hall with a drill floor and a coach's booth.

  1. Plant the answer
  2. Write the reward
  3. Deal the attempts
  4. Start the attempt
  5. Check the end state
  6. Stamp the reward
Play RL with Verifiable Rewards

RL with Verifiable Rewards in plain words

RL with verifiable rewards trains a model on tasks a program can check. Each task is tried many times in a sandbox, a checker scores every attempt, and the weights move toward what beat the group. Tasks are kept at the edge of what the model can do, and the result is tested on tasks it never saw.

An analogy

Practising free throws with a hoop instead of a coach's opinion. The ball goes in or it does not, the count is free and never kind, and a thousand shots a day slowly change the arm. A bent hoop would teach a bent shot just as faithfully.

How RL with Verifiable Rewards connects

19 typed relations in the knowledge graph

Builds on

Built on by

  • AI for Math: Solved problems are reused as open RL environments; self-play writes related problems.
  • Formal Verification: A Lean proof is a verifier that gives a stronger reward than a statistical best guess.
  • Reinforcement Learning: When the final answer can be checked, the reward scale is a verifier.
  • Reward Hacking: The press is the update of reinforcement learning against a checkable reward; here the reward is the thing being gamed.
  • RLHF & Preference Optimization: A verifier replaces the scale when the answer can be checked.
  • Self-Play & Self-Improvement: The unit tests that mark each attempt are a verifiable reward: the solver trains on what a check says is correct.

Makes possible

A kind of

  • Reinforcement Learning: Reinforcement learning where the reward is a check that can be run: a test, a proof, a score.

Threatened by

  • Reward Hacking: A learner that passes the check without doing the task turns the reward against its purpose.

Often in the same sources

RLHF & Preference Optimization, Reinforcement Learning, Distillation

See RL with Verifiable Rewards in the knowledge graph

Who is behind RL with Verifiable Rewards

people, labs, products and models

People

  • Nathan Lambert (explains): Traces how post-training recipes moved to RL with verifiable rewards and multi-teacher distillation.

Named in its facts

What the sources say

5 parts · 68 sources · updated 2026-11-27

RL with verifiable rewards trains a model on tasks where a program can check the answer: tests pass, a proof is valid, the final state is right. The model attempts each task many times, a verifier scores every attempt, and the weights move toward what passed. Because the checker is code, the reward is cheap and consistent, and the model learns exactly what the checker rewards.

Environments and tasks

What a training environment is made of (tasks, a runtime with tools or mock apps, a reward rule), who builds it, and what a broken one does to training.

  1. World builder: takes a task and builds the world it runs in: a container image or code base, tools, or a simulated or mock backend with the answer planted in it.
  2. Reward writer: writes the reward function beside the task and its world, often with an agent separate from the one that built the task, so the three come out as one environment.
  3. Pair filter: checks the task and reward pair with majority votes and trial rollouts, and sends back the pairs that do not hold up.
  4. Environment interface: exposes the task, the world and the graders through one interface, so a rule-based checker and a full sandbox look the same to the trainer.
  5. Rollout harness: wraps the model in an agent harness with tools, context and a turn limit, and runs one attempt at a time, up to 64 turns in a terminal environment.
  6. Sandbox: runs every tool call in an isolated container with checkpoints, so a rollout can resume on another node and cannot reach the training machine.
32,112 tuples, 110 environments
CUA-Gym dataset: verified RLVR training tuples (instruction, environment, reward) grounded in 110 environments; reported by the CUA-Gym authors. Hugging Face
62.1% and 72.6%
OSWorld-Verified scores of CUA-Gym-A3B and CUA-Gym-A17B trained with GSPO on CUA-Gym; reported by the CUA-Gym authors. Hugging Face
20,000
Parallel environment instances MAI-Gym scales to; reported by the MAI-Gym authors. Hugging Face
28.8% → 48.1%
Task success on a physical phone after RL in a mocked train-ticketing app (the real counterpart app): MAI-Gym authors. Hugging Face
1,000 tasks, 277 scene grammars, 11 domains
Size of the Trace visual reasoning environment; reported by the Trace authors. Md Tanvirul Alam
+3.51 and +4.06 points
Macro-average gain across 24 external benchmarks after RLVR on 64,000 Trace instances, for Qwen2.5-VL-3B and 7B; Trace authors. Md Tanvirul Alam
256 prompts x 16 responses = 4,096
Granite 4.2 RLVR batch: prompts per step times sampled responses per prompt, consumed in one optimizer step; IBM Granite team. Hugging Face
  • Prime Intellect's frame: an agent is a model plus a harness; it is placed in an environment, and the environment is a task plus a world. The agent and the environment interact in a loop and the run ends with a reward. Will Brown
  • The 'world' part of an environment can be a Docker image, a code base, a set of task-specific tools, skills, or a bundle of applications and browser tabs, plus the scoring rule (verifiers or rewards). Will Brown
  • Environments and evals are the same objects: the same task, harness and reward can generate synthetic data for SFT, drive RL or on-policy distillation, optimize prompts with GEPA, or serve as a test bed for agents and harnesses. Will Brown

When it breaksNo environments with deterministic rewards for computer-use agents. RLVR worked for math, tool use and software engineering, but computer-use agents were stuck: each example needs a consistent instruction, an executable environment and a verifiable reward. Hand-curated benchmarks were exact but covered few apps; LLM-judged datasets were broad but unreliable. Hugging Face

Open questionShould RL training scale to more environments, or invest in making each environment reliable?

  • Use as many environments and tasks as possible: RL is narrow in what it teaches, so many environments are what make the model generalize. Maxime Labonne
  • Data volume and environment diversity both help: CUA-Gym performance scales smoothly with each, and a held-out benchmark improves. Hugging Face
  • Fold small RL runs into environment design: some failures only appear once RL starts, so each environment is tested by training on it, with judges asking questions about the traces. Will Brown

Picking tasks at the right difficulty

How tasks are chosen for the current model: ones it sometimes solves, generated or mined tasks, curricula, and what happens when every attempt passes or fails.

  1. Task mine: searches production traces, documents and repositories for tasks, or generates them backwards from a known solution, and builds replacements for tasks that were dropped.
  2. Pass-rate meter: counts how many of a task's attempts pass against the current model, from trial attempts before training and from each round's rewards afterwards.
  3. Difficulty gate: keeps the tasks the current model sometimes solves and sends back the ones it always or never solves.
  4. Attempt groups: sends each kept task out as a group of attempts, for example 16 per prompt, so outcomes can be compared inside the group.
  5. No-signal repair: a group where every attempt fails or passes has no advantage to learn from; it is replaced by a new group, or helped by successes from a peer or a teacher.
37-98% of rollout groups; 98% all-failure at 2B
Share of rollout groups with identical rewards across model scales (98% all-failure in the 2B setting); reported by the SRD authors. Hugging Face
0.0% vs 60.6%
2B setting where 98% of groups are all-failure: RLVR training ends at 0.0% success, adding SRD reaches 60.6% under the same rollout budget; SRD authors. Hugging Face
+2.1 points average, up to +4.5
GRAFT over GRPO with the same per-model rollout budget, across three heterogeneous model pairs and five math benchmarks; GRAFT authors. Hugging Face
+1.8 points
GRAFT over GRPO with stored peer trajectories and no simultaneous co-training; GRAFT authors. Hugging Face
+7.76 points
Uniform GRPO's gain in domain-balanced average accuracy over the untrained Qwen2.5-7B-Base across 12 benchmarks, the baseline no data policy beat; DataFlex-RL authors. Hugging Face
13 configurations x 12 seeds
Primary DataFlex-RL experiment size: data-policy configurations compared over matched seeds on Qwen2.5-7B-Base and 12 math, logic and science benchmarks. Hugging Face
+1.7 and +1.8 code avg@8
DiffGate over matched GRPO for Qwen3-0.6B and 1.7B (pass@8 +1.6 and +5.7); DiffGate authors. Hugging Face
+10.0 pp Pass@3, -27.9% tokens
When2Think on AIME24 relative to the backbone: Pass@3 gain and token reduction; When2Think authors. Hugging Face
0.08 / 0.40 / 0.60 / 0.90
ThinkingBox difficulty bucket boundaries on a task's estimated success probability: rarely solved (below 0.08) and nearly always solved (0.90 and up) are dropped, the three bands between are kept; chosen as hyperparameters; Microsoft. Hugging Face
187 tasks
Size of the curated training pool for the Qwen3.8-27B ThinkingBox run after the probe filter; Microsoft. Hugging Face
  • RL needs a gap between what one sample from the model does and what a group of rollouts does, so tasks should be neither too easy nor too hard; Prime Intellect spends compute searching for and generating tasks at that difficulty. Will Brown
  • Prime Intellect's online task loop gates generated tool-use tasks on their pass rate before training on them. Will Brown
  • For document tasks, models write question-answer pairs grounded in sampled documents, other models check the questions are answerable from the documents, and the task given to the learner then drops the initial search, so the learner must work back to what the generator saw. Will Brown

When it breaksAll attempts fail, and training learns nothing. In group-relative RLVR the advantage of an attempt is its reward minus the group's. When every rollout of a prompt fails (98% of groups in a 2B agent setting), all advantages are zero, so RLVR training ended at 0.0% success. Hugging Face

Open questionDoes choosing tasks by difficulty beat plain uniform sampling?

  • No: across 13 configurations and 12 seeds, none of eight rollout-selection or reweighting methods beat uniform sampling with a 95% interval that excludes zero, and none of three adaptive domain mixtures beat a fixed equal mix. Hugging Face
  • Yes: keep prompts in the model's productive range. Rufus-Air lists difficulty filtering among its main findings. Hugging Face
  • Yes: select prompts before generation from a difficulty estimate, which cuts rollout waste. Hugging Face
  • Yes: tasks that are not too easy or too hard are required for the advantage gap, and compute should be spent to search for them. Will Brown

Verifiers and rewards

What checks an attempt and turns it into a reward: exact match, hidden tests in a sandbox, end-state checks, proof checkers, rubrics and judges; sparse against shaped rewards.

  1. Checker: scores each attempt with a check matched to its task: an exact answer, hidden tests in a sandbox, a check of the final state, a proof checker.
  2. Judge: where no checker exists, a model judge or a rubric scores the attempt after the fact, once it has seen the whole chain of events.
  3. Final-answer check: gives no positive reward to a run that ends without a final answer, so runs that loop are not rewarded.
  4. Timing meter: adds execution time or quality terms to the score, and only once the sandbox that measures them is calibrated.
  5. Reward shaper: turns the score into one outcome reward for the whole attempt, or spreads it over the steps responsible.
+15.9 over base; +5.3 over sparse-reward GRPO
DRACO on AppWorld: points over the base model and over GRPO trained on a sparse ground-truth reward, despite DRACO using no verifier; DRACO authors. Hugging Face
+15% over OPD, +7% over GRPO
Cliff across 12 scenarios, with teachers of modest capability; Cliff authors. Hugging Face
18.0% → 31.3% and 30.7% → 50.4%
Strict top-50% pass@1 on DMC-Optim for Qwen 2.5 7B and CWM 32B after timing-aware RL; code-optimization authors. Hugging Face
24% → 2.5% fallback, 3.5% → 0.0% leak
Greek-reasoning models: RLVR fixed missing-format fallback and answer leak into the reasoning channel, against a flat random-reward control; paper authors. Hugging Face
~15-16% doom loops → almost none
Doom-loop ratio of LFM2.5-1.2B-Thinking: 15-16% after mid-training, barely moved by SFT, reduced by DPO and almost non-existent after RL; Liquid AI's Maxime Labonne. Maxime Labonne
about 350k prompts
RLVR prompt set size for Apertus 1.5 (math, code, instruction following, multilingual, vision); Swiss AI team. Hugging Face
-56% tokens
Token usage cut for DeepSeek-R1-Distill-Qwen-7B by ThoughtFold while holding accuracy; ThoughtFold authors. Hugging Face
0.51-2.70% aggregate gain
SAF over fixed-coefficient GRPO+OPD fusion across six model-domain settings (Qwen3-1.7B/4B/8B); SAF authors. Hugging Face
  • Math tasks are checked by parsing a numerical answer out of a box in the model's answer; this is one of the easy cases where the reward design problem is not hard. Will Brown
  • Code is checked with test cases or a linter; tool use is checked deterministically against the database state expected at the end. Will Brown
  • Most real agent tasks (reports, booking flights, handling a refund) have no clean best answer, so the signal is less clear and needs extra techniques. Will Brown

When it breaksTiming in the reward drowned the signal. A natural extension of RL for code correctness is to add execution time to the reward. Once timing drives the reward, noise in measurement, sparse reward and GRPO instability overwhelm the signal: solutions came out barely faster and more of them failed. Hugging Face

Open questionShould reward come from programmatic verifiers or from learned judges and rubrics?

  • Programmatic scorers: grounded in deterministic, task-specific rules they aligned with humans and were reliable reward signals, unlike VLM judges. Hugging Face
  • Judges are powerful general reasoners; set up right, and used in hindsight, they can audit rollouts and spot reward hacks, and their findings can be turned into cheaper rubrics. Will Brown
  • Use both, by task: verifiable rewards where a checker exists and front-loaded because they are hard to game, judge rewards where correctness is open-ended. Hugging Face
  • Dynamic rubrics can replace a verifier: DRACO beat GRPO trained on a sparse ground-truth reward on AppWorld without using any verifier. Hugging Face

Rollouts and the weight update

How attempts are sampled and turned into a weight update: groups of attempts per task, group-relative advantages, batch sizes, asynchronous workers, staging of runs.

  1. Advantage scale: compares each response with the mean reward of the other attempts at the same prompt, so no value network is needed; low-success groups get a looser clip.
  2. Teacher signal: adds a denser per-token signal from a teacher or from the model's own hindsight, scaled and capped, mostly on failed attempts.
  3. Buffer and trainer: finished trajectories fill a shared buffer, and the trainer takes an optimizer step when it holds a full batch, 256 prompts with 16 responses each in one recipe.
  4. KL pull: holds the update to the old model, not at all where the reward is verifiable and lightly for preference, safety or one narrow skill.
  5. Weight sync: streams new weights to the rollout workers, which may be at most one update behind the trainer.
  6. Stage chain: exports the finished run as the base of the next stage, a separate warm-started run with its own reward.
32 prompts x 16 gens, 128 turns (SWE 2); 8 x 32, 64 turns (terminal)
Granite 4.2 30B stage shapes (prompts per step, generations per prompt, rollout turns): e.g. SWE 2 is 32 x 16 with 128 turns; terminal is 8 x 32 with 64 turns; IBM Granite team. Hugging Face
1.80x rollout, 1.27x full iteration
KV4-RL cumulative speedups over BF16 rollout across 400 iterations of Qwen3-8B-Base GRPO; within 0.5 points of BF16 accuracy on a six-benchmark mean; KV4-RL authors. Hugging Face
48.3% → 58.3% in 4 hours on 8 A100s
Direct-OPD on Qwen3-1.7B, AIME 2024, reusing a weaker model's RL shift; Direct-OPD authors. Hugging Face
0.495 at 270 steps vs 100 steps
Qwen3-8B-Base aggregate accuracy: AdamW needs 270 steps to reach 0.495, ISO-AdamW reaches it in 100 and 0.509 after 210; ISO authors. Hugging Face
+4.97 points
TreeOPSD over GRPO on the Deep Research setting for Qwen3-30B-A3B-Thinking-2507; TreeOPSD authors. Hugging Face
<30% of rollout budget
LOPD surpassed GRPO and Skill-SD with less than 30% of their rollout budget; LOPD authors. Hugging Face
~10% of RLVR steps
d-OPSD for diffusion LLMs needed about a tenth of the optimization steps of RLVR across four reasoning benchmarks; d-OPSD authors. Hugging Face
47.67 and 57.00 (SWE-Bench Verified)
Granite 4.2 8B and 30B on SWE-Bench Verified, models given the SWE-agent RL stage; IBM Granite team. Hugging Face
20.56 and 29.24 (Terminal-Bench 2.1)
Granite 4.2 8B and 30B on Terminal-Bench 2.1, after the terminal-agent RL stage; IBM Granite team. Hugging Face
550B total, 55B active
Nemotron 3 Ultra size, post-trained with SFT, RL and multi-teacher on-policy distillation; NVIDIA. Hugging Face
18 groups x 8 rollouts = 144 episodes; 50 steps; 24 H100
ThinkingBox reference run: full-parameter token-mean GRPO of Qwen3.8-27B on 187 tasks, 144 episodes per update, 50 steps, learning rate 1e-6; Microsoft. Hugging Face
+4 points average; 70 GB -> 56 GB peak memory
FSPO against the strongest baseline under a 5-hour training budget on Olmo3-7B-Instruct, with peak memory down from about 70 GB to 56 GB; FSPO authors. Hugging Face
  • The advantage is the reward minus a baseline (maybe scaled); the rollouts are then used to update the policy, which is the model weights, with a gradient that nudges them toward higher reward. GRPO, REINFORCE and CISPO all fit this policy-gradient frame. Will Brown
  • Granite 4.2 trains with asynchronous GRPO: a pool of generation workers keeps sampling and puts finished trajectories in a shared buffer; when the buffer holds a full step the trainer takes a batch, steps, and streams new weights back without pausing the workers. Hugging Face
  • In Granite's asynchronous loop a refresh can land mid-rollout, so one trajectory can span two policy versions; the one guardrail is a limit that keeps workers no more than a single update behind the trainer, and truncated importance sampling clamps the remaining log-probability mismatch. Hugging Face

When it breaksDense and sparse signals fused at a fixed coefficient. Fusing an on-policy distillation advantage with the RLVR advantage at a fixed coefficient triggered entropy collapse: token-level teacher advantages can spike far above the bounded RLVR advantage and erase it, and constant full-strength distillation limits the exploration needed to surpass the teacher. Hugging Face

Open questionDoes a dense teacher or self-distillation signal help RLVR, or does it just add noise?

  • It helps: OPDVR, d-OPSD and LOPD report beating RLVR with fewer steps or rollouts; DiffGate reports higher pass@8 coverage. Hugging Face
  • Teacher supervision is noisy and the student ignores the noise: gains come mostly from suppressing low-probability tokens, which needs no teacher. Hugging Face
  • It depends on signal quality: with a large teacher-student gap the guiding signal misaligns with correctness; effectiveness hinges on the quality of the guiding signal. Hugging Face
  • Privileged self-teacher shifts are unreliable credit: most affected tokens shift the same direction under both a correct and an incorrect assertion. Hugging Face

Cheating, monitoring and what improves

How models game a verifier, how teams watch trajectories and quarantine bad episodes, and how a trained model is tested on held-out tasks: what gets better and what does not.

  1. Trace recorder: keeps every rollout's trajectory and tool-call log for review.
  2. Hack watch: judges read trajectories in hindsight against a corpus of known hacks, red-teaming probes the verifier, and a small pilot run on one environment shows what only appears once training starts; holes and broken worlds go back to the builder.
  3. Held-out test: tests the trained model on tasks it never trained on, before the next stage starts from it.
  4. Honest report: reports seeds and per-benchmark results before a win is claimed.
7.7 points
How far changing only the random seed moved the Greek-reasoning benchmark score, more than every data and recipe effect measured; paper authors. Hugging Face
-0.33 rank correlation
Correlation between model rankings under a math-heavy six-benchmark summary and the domain-balanced 12-benchmark summary on nine Qwen2.5-7B-Instruct runs; DataFlex-RL authors. Hugging Face
+35.41 points (263% relative)
OPSA over base Qwen3-1.7B on AIME24 Avg@32, the on-policy self-adaptation method without teacher; OPSA authors. Hugging Face
28.8% → 48.1% on a physical phone
Held-out transfer: RL in a mocked train-ticketing app improved task success on the real app; MAI-Gym authors. Hugging Face
+3.51 and +4.06 points on 24 external benchmarks
Transfer of Trace-trained Qwen2.5-VL-3B and 7B beyond the generated task distribution; Trace authors. Md Tanvirul Alam
60x less compute
Compute advantage of Mixed SFT over next-chunk reasoning RL while reaching a higher post-RLVR ceiling; study authors. Hugging Face
100%-200% over standard RLVR
Improvement of timing-robust optimization RL over standard RLVR when the timing sandbox is degraded; code-optimization authors. Hugging Face
38 -> 107 of 507 tasks
Tasks Qwen3.8-27B passed on all 20 attempts before and after 50 GRPO steps, on the 507-task benchmark it never trained on (pass@1 51.70% to 60.78%); Microsoft. Hugging Face
453 -> 446 of 507 tasks
Tasks Qwen3.8-27B solved at least once (pass@20) before and after RL: coverage fell slightly while pass@1 rose; Microsoft. Hugging Face
5%
Environment failure rate above which, in Auriel W's rule of thumb, the harness and not the model is the problem; practitioner view, not a measured threshold. Auriel Wright
12.8% suspicious, 9% bypass, 0 rewarded (1,400 rollouts)
SWE-Marathon (an evaluation benchmark, not a training run): share of rollouts with suspicious shortcut behavior, share with a clear verifier bypass, and rollouts that earned reward through an exploit; Rishi Desai, Abundant. Rishi Desai
  • Reward hacking is a loose proxy for the objective that is undefined at the boundaries; a model trained with RL can learn to exploit it and climb the reward without giving what you want. Will Brown
  • Prime Intellect red-teams verifiers with adversarial prompt optimization to find back doors, then mines training traces to decide whether a reward was a hack or in the spirit of the task. Will Brown
  • Judges are often good at recognizing a reward hack in hindsight even when telling the model not to hack does not stop it during rollout; building a corpus of examples of hacks over time lets teams refine implementations and rewards. Will Brown

When it breaksReward hacks that only show up once RL runs. A reward or verifier that looks sound in design can be exploited once a policy optimizes against it. Prime Intellect says hacking can sneak up on a team, and that some of it does not show up until RL actually runs, even with red-teaming up front. Will Brown

Open questionDoes RL on verifiable tasks carry over to tasks with no verifier?

  • Yes, via transformation: turn the open-ended task into a verifiable proxy game, and gains show up on summarization, creative writing and math. Hugging Face
  • Only if signal is manufactured: grounding, judges and search can create supervision for messy tasks; RL alone is not enough for dense new knowledge. Will Brown
  • No, not for automation: RLVR is described as solving hard math but exacerbating jagged intelligence and not integrating with other software; a different objective is needed. Latent Space
  • Not automatically: after RLVR, Greek formatting and leakage were fixed but the Greek reasoning habit survived an accuracy-only gradient, so behavior that accuracy cannot see does not transfer. Hugging Face

Sources

the 24 newest of 68

More in Post-training, RL & Reasoning

The Training Gym: the whole area