One model writes its own coding tasks, checks them with a Python interpreter, and learns to solve them. With zero human-written examples it scores 50.4 on math and code, ahead of models trained on up to 57,000 curated ones.
Pick a system and compare its code, math and overall scores with the number of human examples it ate. Then we build, piece by piece, how one model can propose, check and learn from tasks nobody wrote.
You need a little Python and what a probability is. We build the rest from zero.
Session 13 of Georgia Tech CS 8803, LLM seminar. It rests on one paper: Zhao, Wu, Yue, Wu, Xu, Yue, Lin, Wang, Wu, Zheng and Huang, Absolute Zero: Reinforced Self-play Reasoning with Zero Data (2025; numbers from arXiv v3). Every idea is re-taught here in our own words and devices.
Scores are the paper's Table 1 (7B models, greedy decoding). Overall = (code average + math average) / 2. Examples are Table 4: CodeR1-LC2k used 2,000 LeetCode pairs, ORZ 57,000 STEM and math samples. Base is Qwen2.5-7B-Coder, the model Absolute Zero starts from.
Chapter 0
Price the human-written problems that every reasoning model still eats
You train a reasoning model with reinforcement learning with verifiable rewards (RLVR). The model answers a question, a program checks the final answer, and the model moves toward answers that pass. Nobody grades the reasoning. But someone must write the questions and their correct answers.
The DeepSeek-R1 line made zero-setting RLVR popular: RL starts on the raw base model, with no supervised warm-up. "Zero" means no warm-up. It does not mean no data. Here is what the zero-setting baselines in this paper trained on (Table 4).
| Zero-setting model | Curated data | Examples |
|---|---|---|
| CodeR1-LC2k | LeetCode pairs | 2,000 |
| CodeR1-12k | LeetCode and TACO pairs | 12,000 |
| AceCoder | code data | 22,000 |
| SimpleRL-Zoo, Oat-Zero | MATH pairs | 8,500 |
| Open-Reasoner-Zero (ORZ) | STEM and math samples | 57,000 |
| PRIME-Zero | 457k math + 27k code problems | 484,000 |
Pick a dataset, then set how long one person takes to write and check one problem. Each block is one work-year.
The minutes per problem are made up; 8-hour days, 260 days a year. The dataset sizes are the paper's. The paper reports no cost figure.
With made-up numbers: 484,000 problems at 10 minutes each is 4,840,000 minutes, or 80,667 hours. At 8 hours a day and 260 days a year, that is 38.8 work-years. Even 2,000 problems cost 0.16 work-years, about 8 work-weeks.
The paper names two walls. Supply: good verified problems are finite and slow to make, as good pretraining text already is. Ceiling: if a model ever passes its teachers, tasks written by people may have little left to teach it.
Failure. Symptom: the next run needs more verified problems than anyone has written. Measure: count unused verified problems against what one run consumes. Fix: let the model make tasks that a machine can check. That is this paper.
Chapter 1
Climb four training recipes and see what each one still asks a person to write
Supervised fine-tuning (SFT) copies worked solutions: a question, a full chain of thought and a gold answer, all written by people or a stronger model. RLVR drops the chain of thought. Zero RLVR also drops the warm-up. Absolute Zero drops the dataset.
Each column is one thing a recipe needs. Blue means a person writes it. Teal means the model or the environment makes it.
From the paper's Section 2.1 and Figure 2.
RLVR needs a dataset D of questions x with gold answers y*. The model πθ writes its own reasoning and an answer y. A check r(y, y*) gives 1 if the answer matches and 0 if not.
J-RLVR of theta equals the average, over question x and gold answer y-star drawn from D and answer y drawn from pi-theta given x, of r of y and y-star.
Take questions x from D. Let the model answer each. Score each answer y against its gold answer y* with r. The average score is J-RLVR.
With made-up data: D holds "sum(range(5))" with 10, "2**10" with 1024, and "7 * 8" with a wrong label, 42. The model answers 10, 1024 and 56. The rewards are 1, 1 and 0, so J-RLVR = 2/3. The model was right three times and lost a point to a typo in D.
Absolute Zero replaces D. The same model, as a proposer πθpropose, writes a raw task τ from a seed z (a few past tasks). An environment fe checks τ and turns it into a question x with answer y*. The model, as a solver πθsolve, answers.
J of theta equals the max over theta of the average, over seed z, task tau from the proposer and question x with answer y-star from f-e, of lambda times r-propose, plus the average r-solve of the solver's answer y.
Show the model a seed z. It proposes a task τ. The environment builds x and y*. Pay the proposer r-propose, scaled by λ. Pay the solver r-solve. Change θ so the total goes up.
With made-up numbers: λ = 1. The task is worth r-propose = 0.75, and the solver answers right, so r-solve = 1. The bracket is 1 × 0.75 + 1 = 1.75. No human wrote any part of it.
Failure. Symptom: a model gets 0 on answers that are correct. Measure: audit a sample of gold labels by hand. Fix: let the gold answer be what code returns when it runs, as Absolute Zero does.
Chapter 2
Run one model in two roles and watch its task buffers grow
Picture a student who writes an exam in the morning and sits it in the afternoon. That is the trick. The proposer and the solver are the same weights θ with two different prompts. Both moments update the same weights.
Why one model? Writing a task and solving it both happen in text, so one language model fits both jobs (Section 3.1). And one model with one goal has no opponent to beat.
One training step runs in this order:
A buffer is a growing store of valid tasks. There are three, one per task type (Chapter 4). The paper starts from one zero triplet, the identity program def f(x): return x on "Hello World". The base model then proposes, with no updates, until each buffer holds B × S = 64 × 4 = 256 triplets.
Each step, 64 proposals per type go through the gates. Valid ones join the buffer. Set the pass rate and press Step.
The pass rate is made up; the paper does not report one. B = 64, S = 4 and the 256-triplet seed set are the paper's (Section 3.3.1).
A triplet joins its buffer whenever it is valid, whatever reward it earns. If fewer than 64 valid tasks arrive for the solver, the step fills the batch from the buffer. The batch is 64 × 6 = 384 rollouts: 3 task types times 2 roles.
Failure. Symptom: the proposer breaks the format and few tasks pass. Measure: the share of valid proposals per step. Fix: fill the solver's batch from the buffer, so training never stalls.
Chapter 3
Run every proposal through three gates so only safe, repeatable programs become tasks
If the checker can be fooled, the whole loop can be gamed. So every task is a program. A task is a triplet (p, i, o): a program p, an input i, and the output o = p(i) that Python returns. Nobody labels o. The interpreter does.
Why code? A programming language can express any computation, so the task space is wide. And earlier work found that training on code helps reasoning (the paper cites Aryabumi et al., 2024).
A proposal (p, i) becomes a triplet only if it passes three gates, in order:
Pick a candidate. Watch which gate stops it, or whether it becomes a triplet.
The four programs are made up. The gates, the banned list and j = 2 are the paper's (Section 3.3.3).
Two runs can miss a rare difference. The paper says j = 2 is a compute choice, not a proof. An induction proposal (Chapter 4) carries N inputs for one program, and it passes only if every input passes.
With made-up inputs: the program ' '.join(w[::-1] for w in s.split(' ')) gets five inputs. "hello world", "cat", "ab cd ef" and "" run. The integer 42 raises AttributeError, because an int has no split. Four of five pass, so the gate rejects the whole proposal.
The environment has limits too (Table 3). Prompts reach 6,144 tokens and replies 8,096 tokens. At most 16,384 programs are kept.
Failure. Symptom: a gold answer that changes from run to run, so correct solvers get 0. Measure: re-run a sample of buffer programs many times. Fix: raise j, at a cost in compute.
Chapter 4
Hide one slot of a triplet to get three kinds of reasoning task
One triplet (p, i, o) gives three exercises. Hide one slot and ask for it. Absolute Zero trains on all three at once.
| Mode | Given | Find | Checked by |
|---|---|---|---|
| Deduction | p and i | the output o | oπ = o*, by value in Python |
| Abduction | p and o | an input i | p(iπ) = p(i*) |
| Induction | half of N pairs and a message m | a program p | pπ maps every held-out input to its output |
Deduction traces forward. Abduction works back from an effect to a cause, often by trial and error. Induction finds a rule from examples. In the table, π marks the solver's answer and * the gold one.
Pick a mode. The pink slot is hidden from the solver. Then try an answer with the control below.
Toy programs we wrote. The three checks are the paper's (Section 3.3.4).
With these programs: deduction on [3, 4, 5, 6] gives 3, then 3 + 8 = 11, then 16, then 16 + 12 = 28. Abduction on (x − 7)2 = 25 accepts x = 12 and x = 2, because both give 25. The gold input was 12, and 2 still scores 1, since the program is not one-to-one.
Induction shows the solver half of the pairs and hides the rest. A lookup table of the visible pairs fails the hidden ones. Only a program that encodes the rule passes.
The paper found two side effects. When the authors stripped comments from proposed code, performance fell: comments were the only message from proposer to solver (Appendix D.5). And proposers wrote code 0.27 points more complex than the induction solver's code for the same behaviour (Appendix C.5).
Failure. Symptom: an induction solver scores well on the shown pairs and fails new inputs. Measure: grade on held-out pairs. Fix: that is why half of the N pairs stay hidden.
Chapter 5
Pay the proposer most for tasks the solver can barely solve
A proposer can pass every gate forever with def f(x): return x. Valid, and useless. If the solver always succeeds, every try looks the same and there is no signal. If it always fails, the same holds. Signal lives in tasks the solver gets right sometimes.
So the paper measures difficulty by trying. Run the solver G times on the task, with temperature above zero. Call the reward of try i rsolve(i), 1 or 0.
r-bar-solve equals one over G, times the sum over i from 1 to G of r-solve-i.
Let the solver try the task G times. Count the right answers. Divide by G.
With made-up tries: 2 right out of G = 8, so r-bar-solve = 2/8 = 0.25.
r-propose equals zero if r-bar-solve is zero; otherwise, one minus r-bar-solve.
If the solver never got it, pay 0. Otherwise pay one minus the success rate r-bar-solve. A trivial task pays 1 − 1 = 0.
From the tries above: r-bar-solve = 0.25, so r-propose = 1 − 0.25 = 0.75. At 1 of 8 it pays 0.875; at 8 of 8 it pays 0.
Set how often the solver truly succeeds. Press Run to draw 8 tries. The teal curve is the reward per success rate; the pink curve is the average reward per true rate.
The rule and G = 8 are the paper's. The task is hypothetical. The pink curve is our derivation from the rule, below.
Which task does the proposer aim for? Call the solver's true success rate p. Averaged over many runs of G tries, the reward works out as follows.
The expected r-propose equals one minus p, minus one minus p to the G.
On average, 1 − r-bar-solve equals 1 − p. Then remove the all-fail case, which would have paid 1 but pays 0. Its chance is (1 − p) to the G.
With G = 8 and p = 0.257: 0.743 − 0.7438 = 0.743 − 0.093 = 0.650, the peak. At p = 0.5 it is 0.496.
The paper says moderate tasks earn the most. With G = 8, the average peaks at a true rate near 26%: hard, but still cracked sometimes. Scoring costs compute. With 64 proposals per type and 8 tries each, that is 512 extra solver rollouts per type per step, by our count.
Failure. Symptom: the proposer floods the batch with trivial tasks. Measure: the share of proposals at 0 of 8 or 8 of 8. Fix: this rule pays 0 there, so the proposer stops.
Chapter 6
Wrap each reward in a format check, then normalise six reward buckets on their own
Each reply must use the DeepSeek-R1 format: reasoning in <think> tags, the answer in <answer> tags. Call a reply yπ and its role's reward rrole (r-propose or r-solve).
R of y-pi equals r-role if the reply is passable, minus one half if it is wrong but well formatted, and minus one if it has format errors.
Check the format first. If it is broken, R is −1. If it is fine but wrong, R is −0.5. Otherwise R is the role's own reward r-role.
A correct answer earns 1. A tidy wrong answer earns −0.5. A proposal that crashes earns −1. A valid but trivial proposal earns r-propose = 0.
The model trains 3 task types times 2 roles: six buckets, each with its own reward spread. REINFORCE++ subtracts one global average. GRPO normalises per question. Task-Relative REINFORCE++ (TRR++) sits between: one mean and spread per bucket.
A-norm for task and role equals r minus mu-task-role, divided by sigma-task-role.
Find the reply's bucket. Subtract the bucket's mean μ from the reward r. Divide by the bucket's spread σ.
With made-up buckets: deduction-solve has μ = 0.8, σ = 0.1, so r = 1 gives (1 − 0.8) / 0.1 = +2.0. Abduction-propose has μ = 0.3, σ = 0.4, so r = 1 gives +1.75.
Top: each bucket's band is its mean plus or minus one spread, and the dot is one reward. Bottom: that reward's advantage. Switch the baseline.
Bucket means, spreads and rewards are made up. The global baseline pools the same six buckets.
The advantage then enters a PPO-style update: raise the chance of a good token, but clip the ratio of new to old chance to 1 ± ε. The paper uses one PPO epoch and no KL penalty (Appendix A, Table 3).
Failure. Symptom: one noisy bucket drives the updates. Measure: the mean advantage per bucket. Fix: normalise within each bucket.
Chapter 7
Run the whole loop and see why this self-play does not collapse
Here is one step of Algorithm 1 in code. Each line points back to the chapter that built it.
pythonfor t in range(T): # T = 500 steps for b in range(B): # PROPOSE, B = 64 p = sample_program(D_abd | D_ded) # induction: reuse a known program inputs, m = propose_inputs(p) # N inputs + a message if all_pass_gates(p, inputs): D_ind.add(...) # Ch 3 for a in ('ded', 'abd'): refs = sample_uniform(D[a], K=6) # Ch 2 p, i = propose(a, refs) # "write a different one" if passes_gates(p, i): D[a].add((p, i, run(p, i))) for a in ('ded', 'abd', 'ind'): # SOLVE x, y_star = prepare(D[a], B) # Ch 4: hide one slot y = solve(x) # rewards: r_propose (Ch 5), r_solve, format (Ch 6); update with TRR++ (Ch 6)
| Setting (Table 3) | Value |
|---|---|
| Steps, batch | 500 steps, 64 × 6 |
| References K, tries G | 6, 8 |
| Optimizer | AdamW, learning rate 1e-6, grad clip 1.0 |
| Rollouts | temperature 1.0, top-p 1.0, 1 PPO epoch |
| Regularisers | entropy 0.001; KL loss and KL reward both off |
Self-play often fails in two ways. In an adversarial pair, such as a GAN, each side chases the other and training can spin. With a learned judge, the policy can learn to fool the judge instead of solving the task. That is reward hacking.
Absolute Zero avoids both. Proposer and solver share weights and a goal, and the proposer earns nothing for unsolvable tasks. The judge is a Python interpreter, which has no weights to fool. The paper does see "mildly adversarial" reward curves: when one role's reward rises, the other's often falls (Appendix C.3).
The solver learns only from tasks it solves sometimes. Pick how the proposer chooses difficulty, press Train, and compare the skill curves.
A toy we built: success = 1 / (1 + ed − s) for skill s and difficulty d; skill grows with p(1 − p). The learnability proposer aims for the 26% peak from Chapter 5. Not the paper's model.
The paper also reports what did not work (Appendix D). Sampling the most recent references, not uniform ones, showed potential collapse. Forcing programs to call earlier ones failed, because the model wrote f(g(x)) = g(x). Error-prediction tasks, and complexity and diversity rewards, gave no clear gain. Seeding the buffer from LeetCode sped up early coding, then plateaued at the same level, with lower math.
Failure. Symptom: proposals narrow to one style. Measure: diversity, such as edit distance to the references; the paper logs this. Fix: sample references uniformly, as the paper settled on.
Chapter 8
Read the main table, the scaling trend and the ablations, benchmark by benchmark
Every benchmark is out of distribution: the model never trained on one. Code is HumanEval+, MBPP+ and LiveCodeBench v1-5. Math is AIME'24, AIME'25, AMC'23, MATH500, Minerva and OlympiadBench. All runs use greedy decoding.
Pick a view. Every bar is a number from the paper.
Table 1 (headline, per benchmark), Figure 6b (scaling), Table 2 (ablations, on the 7B base model).
Check the headline: (61.6 + 39.1) / 2 = 50.35, reported as 50.4. That is 1.8 points above ORZ's 48.6. The code average, 61.6, beats CodeR1-12k's 61.3 by 0.3.
The striking result is transfer. Code models trained with RLVR on human code data raised their math average by 0.65 points on average. Absolute Zero, trained only on its own code tasks, raised it by 10.9 (base) and 15.2 (coder): 15.2 / 0.65 ≈ 23 times more.
| Finding | Numbers |
|---|---|
| Code priors help | math 23.9 (coder) vs 27.5 (base) before; 39.1 vs 38.4 after |
| Bigger gains at scale | 3B +5.7, 7B +10.2, 14B +13.2 overall; math does the work: +7.7, +15.2, +22.8 |
| Weaker model family | Llama-3.1-8B: 16.0 to 19.2; SimpleRL on curated data reaches 20.5 |
| One drop | base model HumanEval+ 73.2 to 71.3 (−1.9) |
| Pass@k up to 512 | matches or beats the base at high k, except AIME'24 at k = 512 |
The ablations (Table 2) say every part counts. Deduction alone costs 3.5 overall points. Dropping induction costs 3.0. A fixed prompt with no references costs 3.0, mostly in math (5.3 points). Not training the proposer costs 1.4.
Failure. Symptom: a report of averages hides a drop, like the −1.9 on HumanEval+. Measure: read every benchmark. Fix: report the full table, as the paper does.
Chapter 9
Face what a reward that reads only the answer cannot see
Training Absolute Zero on Llama-3.1-8B, the authors saw an occasional chain of thought they call the uh-oh moment (Figure 34):
They state the limit plainly: "we did not address how to safely manage a system composed of such self-improving components." The paradigm "still necessitates oversight".
Pick a trace. All three end with the same answer. Watch which part reaches the reward.
Traces are ours, built on behaviours the paper reports: step-by-step tracing, a mixed-language reply (Figure 27), and the quote above (Figure 34).
Why is this risk sharper here? r-solve checks only the final answer. In curated RLVR, a person at least chose every question. Here the model picks its whole curriculum, and no person reads any task or any reasoning. If some style of thought ever goes with more reward, the same update that rewards sound logic rewards it too. Both KL terms are off, so nothing pulls the model back toward its start.
Other limits, from the paper: everything runs in Python. The authors list the web, formal math, world simulators and the real world as future environments. Proposer training adds only 1.4 points, so they see room to improve it.
The idea is old. Schmidhuber (2003, 2011) sketched a proposal agent that invents questions for a prediction agent. AlphaZero ran self-play on Go with the rules as judge. Absolute Zero uses a Python interpreter as the judge for open-ended reasoning.
Failure. Symptom: odd or worrying reasoning that nobody sees. Measure: sample and read chains of thought during training. Fix: an open problem; the paper calls for safety-aware training.
Chapter 10
Keep the terms, the numbers, the code and the open questions in one place
Absolute Zero trains one model to write coding tasks and to solve them. Python checks the tasks and the answers. A learnability reward pushes the proposer toward tasks the solver cracks sometimes, and TRR++ normalises six reward buckets. With zero curated examples, the 7B coder model reaches 50.4 overall.
| Term | Meaning | Number to remember |
|---|---|---|
| Zero-setting RLVR | RL on the base model, no warm-up, curated data | 2,000 to 484,000 examples |
| Triplet (p, i, o) | program, input, output = p(i) | seed: 256 per buffer |
| Three gates | integrity, safety, determinism | j = 2 runs |
| Three modes | deduction, abduction, induction | K = 6 references |
| r-propose | 0 if unsolved, else 1 − success rate | G = 8; average peaks near 26% |
| Format reward | r-role, −0.5 or −1 | R1 think/answer tags |
| TRR++ | per-bucket mean and spread | 6 buckets |
| Headline | AZR-Coder-7B, Table 1 | 61.6 code, 39.1 math, 50.4 overall |
| Transfer | math gain from code-only training | +15.2 vs +0.65 |
pythonimport statistics as st def check(mode, p, gold, ans, hidden=()): # Ch 4: the three checks if mode == 'ded': return ans == gold # value equality if mode == 'abd': return p(ans) == p(gold) # same output, any input return all(ans(i) == o for i, o in hidden) # ind: every held-out pair def r_propose(tries): # Ch 5: tries = G results, 0/1 rbar = sum(tries) / len(tries) return 0.0 if rbar == 0 else 1 - rbar def trr_advantages(batch): # Ch 6: batch = [(task, role, r)] out = [] for task, role, r in batch: b = [x for t, ro, x in batch if (t, ro) == (task, role)] mu, sd = st.mean(b), st.pstdev(b) or 1.0 out.append((r - mu) / sd) return out sq = lambda x: (x - 7) ** 2 print(check('abd', sq, 12, 2)) # True print(r_propose([1, 1, 0, 0, 0, 0, 0, 0])) # 0.75
Safe oversight of a self-improving loop. Other environments: the web, formal math, world simulators, the real world. Learning how to define fe itself, better estimates of learning progress, and rewards for exploration in both roles. Programs that are not deterministic.
Credit: Session 13 of Georgia Tech CS 8803, LLM seminar. Paper: Absolute Zero: Reinforced Self-play Reasoning with Zero Data (Zhao et al., arXiv 2505.03335, v3). The toy programs, toy curriculum and all made-up numbers are ours.
Teach it back: open Present or Teach and explain the learnability reward and the three gates to a friend. Then go back to the four systems and say what the zero in Absolute Zero is made of.