verify-actual-training-agreement · ce561731e5e6
Browse filesFiles changed (4)
55 unmodified lines5657585960616225 unmodified lines8889909192939411 unmodified lines10610710810911011111211311411511611711811912012155 unmodified linesThe solver trained with Judge 3 earns **3/32** from the integer checker whichever grader reads it. Judge 3 changed 2 decisions on that solver’s answers. It fixed 1 and introduced 1. The **22-solution gap** comes from comparing the answers the two solvers wrote after separate training runs.On the Judge 2-trained solver’s answers, Judge 2 and Judge 3 agreed with the checker on 16/32 and 16/32, respectively. On the Judge 3-trained solver’s answers they agreed with the checker on 12/32 and 12/32. [Two-judge answers](results/calibrated/d2-17/replay.jsonl) · [Three-judge answers](results/calibrated/d3-17/replay.jsonl)Judge 3 changed the following verdicts on the three-judge-trained solver’s saved answers.25 unmodified lines### What changed during training?On the same 1,024 training answers sampled by the three-judge solver, Judge 3 fixed 58 of Judge 2’s verdicts and spoiled 44. Substituting Judge 2’s reward would have changed the relative credits in **81/256 optimizer updates**. Each GRPO update compares four answers to one question. When gradings change early on, the solvers can learn different answers and receive different training data at subsequent updates. [GRPO advantage calculation](https://huggingface.co/docs/trl/grpo_trainer#computing-the-advantage)Reading each frozen verdict on exactly the same sampled answers measures the change in reward for correct and incorrect arithmetic. A positive rate difference means correct answers receive reward more often.11 unmodified linesIn its first quarter of training, the three-judge solver produced 80 correct answers per 256 samples and received 173 positive rewards. In the last quarter it produced 15 correct answers and received 171 positive rewards.At optimizer update 20, the three-judge run sampled four answers to `(18 - 11) - 3`. The table shows the first group in which Judge 2 graded every sample correctly and Judge 3 both removed a correct answer’s reward and awarded a wrong answer. Each duplicate was a separate sampled completion with its own sampled judge reports.| Solver wrote | Exact checker | Judge 2 reward on this sample | Judge 3 reward used for training || --- | --- | --- | --- || 7,4 | correct | 1 | 0 || 7,4 | correct | 1 | 1 || 5,2 | wrong | 0 | 0 || 5,2 | wrong | 0 | 1 |[Complete training records for this solver](results/calibrated/d3-17/rollouts.jsonl)The two-judge solver gave the correct first value on 32/32 development problems. The three-judge solver gave a wrong first value on 28 and a malformed answer on 1. In 20 cases it applied the second operation correctly to its own wrong intermediate value. Judge 3 rewarded 357/508 training answers with that error pattern.55 unmodified lines5657585960616225 unmodified lines8889909192939411 unmodified lines10610710810911011111211311411511611711811912012112212312412555 unmodified linesThe solver trained with Judge 3 earns **3/32** from the integer checker whichever grader reads it. Judge 3 changed 2 decisions on that solver’s answers. It fixed 1 and introduced 1. The **22-solution gap** comes from comparing the answers the two solvers wrote after separate training runs.On the Judge 2-trained solver’s answers, Judges 2 and 3 agreed with the checker on 16/32 and 16/32, respectively. On the Judge 3-trained solver’s answers those figures were 12/32 and 12/32. Their entire six-number reports were identical on 24/32 of the latter answers. The accept/reject decision matched on 30/32. [Two-judge answers](results/calibrated/d2-17/replay.jsonl) · [Three-judge answers](results/calibrated/d3-17/replay.jsonl)Judge 3 changed the following verdicts on the three-judge-trained solver’s saved answers.25 unmodified lines### What changed during training?On the same 1,024 training answers sampled by the three-judge solver, Judge 3 fixed 58 of Judge 2’s verdicts and spoiled 44. Both judges made the same reward decision on 922 samples and different decisions on 102. Substituting Judge 2’s reward would have changed the relative credits in **81/256 optimizer updates**. Each GRPO update compares four answers to one question. When gradings change early on, the solvers can learn different answers and receive different training data at subsequent updates. [GRPO advantage calculation](https://huggingface.co/docs/trl/grpo_trainer#computing-the-advantage)Reading each frozen verdict on exactly the same sampled answers measures the change in reward for correct and incorrect arithmetic. A positive rate difference means correct answers receive reward more often.11 unmodified linesIn its first quarter of training, the three-judge solver produced 80 correct answers per 256 samples and received 173 positive rewards. In the last quarter it produced 15 correct answers and received 171 positive rewards.We also compared the **two actual training runs** while matching the prompt, all four solver texts and all Judge 1 and Judge 2 reports word for word. This held at 29/256 updates. The reward used in each run gave the samples different relative credit at 9 of these matched updates.At optimizer update 20, the three-judge run sampled four answers to `(18 - 11) - 3`. The table shows the first group in which Judge 2 graded every sample correctly and Judge 3 both removed a correct answer’s reward and awarded a wrong answer. Each duplicate was a separate sampled completion with its own sampled judge reports. Both runs sampled these same four answers and produced the same lower reports. The last two columns show the rewards used in the two training runs.| Solver wrote | Exact checker | Judge 2 reward used for training | Judge 3 reward used for training || --- | --- | --- | --- || 7,4 | correct | 1 | 0 || 7,4 | correct | 1 | 1 || 5,2 | wrong | 0 | 0 || 5,2 | wrong | 0 | 1 |Judge 2 rewarded **2/2 correct attempts** and **0/2 wrong attempts**. Judge 3 rewarded **1/2 correct attempts** and **1/2 wrong attempts**. Each individual attempt received either one point or zero.[Two-judge training records](results/calibrated/d2-17/rollouts.jsonl) · [Three-judge training records](results/calibrated/d3-17/rollouts.jsonl)The two-judge solver gave the correct first value on 32/32 development problems. The three-judge solver gave a wrong first value on 28 and a malformed answer on 1. In 20 cases it applied the second operation correctly to its own wrong intermediate value. Judge 3 rewarded 357/508 training answers with that error pattern.
222903 unmodified lines2229042229052229062229072229082229098 unmodified lines2229182229192229202229212229222229239 unmodified lines222933222934222935222936222937222938222903 unmodified lines]}],"paired": {"two only": 23,"both": 2,8 unmodified lines19,19],"agreement": [16,169 unmodified lines21,21],"agreement": [12,12222903 unmodified lines2229042229052229062229072229082229092229102229112229122229132229142229152229162229172229182229192229202229212229222229232229242229252229262229272229282229292229302229312229322229332229342229352229362229372229382229392229402229412229422229432229442229452229462229472229482229492229502229512229522229538 unmodified lines2229622229632229642229652229662229672229689 unmodified lines222978222979222980222981222982222983222984222903 unmodified lines]}],"matched_training": {"matched": [1,2,3,4,5,6,8,9,10,12,13,14,15,16,17,18,20,22,23,24,25,26,29,31,53,66,69,71,79],"different_credits": [3,10,12,18,20,22,25,66,69]},"paired": {"two only": 23,"both": 2,8 unmodified lines19,19],"identical_reports": 23,"agreement": [16,169 unmodified lines21,21],"identical_reports": 24,"agreement": [12,12
46 unmodified lines47484950515217 unmodified lines707172737475767757 unmodified lines13513613713813914018 unmodified lines15916016116216316416561 unmodified lines22722822923023123223323423526 unmodified lines26226326426526626726810 unmodified lines27928028128228328428528628728828929029129229346 unmodified linesreturn "first wrong, second consistent" if proposed[1] == implied else "first wrong, second inconsistent"def group_evidence(deep):"""Replay both reward rules on identical samples, preserving the four-way GRPO groups."""fixes = harms = changed = 017 unmodified linescounts["correct" if label else "wrong"] += bitfixes += sum(a != y and b == y for a, b, y in zip(second, third, labels, strict=True))harms += sum(a == y and b != y for a, b, y in zip(second, third, labels, strict=True))# Centered binary returns induce the same normalized advantages if both vectors are constant.changed += second != third and (len(set(second)) > 1 or len(set(third)) > 1)for i, j in combinations(range(4), 2):if labels[i] == labels[j]:continue57 unmodified linesbits=verdicts, reports=reports, correct=row["correct"]))fixes = sum(change["bits"][1] == change["correct"] for change in transitions)return dict(correct=sum(row["correct"] for row in records), n=len(records), accepted=accepted,agreement=agreement, fixes=fixes, harms=len(transitions)-fixes, transitions=transitions)18 unmodified lines# Published study.json revisions exposed these three-judge replay fields at the top level.original_replay = {key: replays[1][key] for key in ("accepted", "agreement", "transitions")}return dict(seed=seed, n=len(deep), groups=len(deep)//4, dev_n=len(dev3), two=stats2, three=stats3,paired_outputs=pair_saved_outputs(dev2, dev3),paired=paired, replays=replays, shared_error=shared_error, **original_replay,transcript_audit=read_json(directory/"diagnostics"/f"depth-transcripts-{seed}.json"), **group_evidence(deep))61 unmodified linesf"Judge 3 changed {len(third['transitions'])} decisions on that solver’s answers. It fixed {third['fixes']} "f"and introduced {third['harms']}. The **{abs(correct-two_correct)}-solution gap** comes from comparing "f"the answers the two solvers wrote after separate training runs.",f"On the Judge 2-trained solver’s answers, Judge 2 and Judge 3 agreed with the checker on "f"{second['agreement'][0]}/{n} and {second['agreement'][1]}/{n}, respectively. On the Judge 3-trained "f"solver’s answers they agreed with the checker on {third['agreement'][0]}/{n} and {third['agreement'][1]}/{n}. "f"[Two-judge answers](results/calibrated/d2-{seed}/replay.jsonl) · "f"[Three-judge answers](results/calibrated/d3-{seed}/replay.jsonl)"]if third["transitions"]:26 unmodified linesf"first reverse outcome. [All {n} paired outputs and judge reports](reports/reviews/paired-outputs-seed-{seed}.md)"]sections += ["### What changed during training?",f"On the same {r['n']:,} training answers sampled by the three-judge solver, Judge 3 fixed {r['fixes']} "f"of Judge 2’s verdicts and spoiled {r['harms']}. Substituting Judge 2’s reward would have changed the "f"relative credits in **{r['changed_groups']}/{r['groups']} optimizer updates**. ""Each GRPO update compares four answers to one question. When gradings change early on, the solvers can ""learn different answers and receive different training data at subsequent updates. "10 unmodified linesf"In its first quarter of training, the three-judge solver produced {deep['first_quarter'][0]} correct "f"answers per {r['groups']} samples and received {deep['first_quarter'][1]} positive rewards. In the last "f"quarter it produced {deep['last_quarter'][0]} correct answers and received {deep['last_quarter'][1]} positive rewards."]if example := r["credit_example"]:sections += [f"At optimizer update {example['update']}, the three-judge run sampled four answers to "f"`{example['expression']}`. The table shows the first group in which Judge 2 graded every sample correctly ""and Judge 3 both removed a correct answer’s reward and awarded a wrong answer. Each duplicate ""was a separate sampled completion with its own sampled judge reports.",markdown(["Solver wrote", "Exact checker", "Judge 2 reward on this sample", "Judge 3 reward used for training"],[[answer, "correct" if label else "wrong", a, b] for answer, label, a, b in example["samples"]]),f"[Complete training records for this solver](results/calibrated/d3-{seed}/rollouts.jsonl)"]local = "first wrong, second consistent"bad_first = deep["dev"][local]+deep["dev"]["first wrong, second inconsistent"]sections.append(f"The two-judge solver gave the correct first value on {two_correct+r['two']['dev']['second wrong']}/{n} "46 unmodified lines47484950515253545556575859606162636465666768697017 unmodified lines8889909192939457 unmodified lines15215315415515615715818 unmodified lines17717817918018118218361 unmodified lines24524624724824925025125225325425526 unmodified lines28228328428528628728828929010 unmodified lines30130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333446 unmodified linesreturn "first wrong, second consistent" if proposed[1] == implied else "first wrong, second inconsistent"def different_group_credit(first, second):"""Two constant binary vectors both produce zero GRPO advantages even when their rewards differ."""return first != second and (len(set(first)) > 1 or len(set(second)) > 1)def compare_training_groups(shallow, deep):"""Find real optimizer groups that received identical solver texts and identical lower reviews in both runs."""matched, different = [], []for update, (left, right) in enumerate(zip(batched(shallow, 4), batched(deep, 4), strict=True), 1):if not all(a["key"] == b["key"] and a["answer"] == b["answer"] and a["reports"] == b["reports"][:2]for a, b in zip(left, right, strict=True)):continuematched.append(update)if different_group_credit([row["reward"] for row in left], [row["reward"] for row in right]):different.append(update)return dict(matched=matched, different_credits=different)def group_evidence(deep):"""Replay both reward rules on identical samples, preserving the four-way GRPO groups."""fixes = harms = changed = 017 unmodified linescounts["correct" if label else "wrong"] += bitfixes += sum(a != y and b == y for a, b, y in zip(second, third, labels, strict=True))harms += sum(a == y and b != y for a, b, y in zip(second, third, labels, strict=True))changed += different_group_credit(second, third)for i, j in combinations(range(4), 2):if labels[i] == labels[j]:continue57 unmodified linesbits=verdicts, reports=reports, correct=row["correct"]))fixes = sum(change["bits"][1] == change["correct"] for change in transitions)return dict(correct=sum(row["correct"] for row in records), n=len(records), accepted=accepted,identical_reports=sum(row["reports"][1] == row["reports"][2] for row in records),agreement=agreement, fixes=fixes, harms=len(transitions)-fixes, transitions=transitions)18 unmodified lines# Published study.json revisions exposed these three-judge replay fields at the top level.original_replay = {key: replays[1][key] for key in ("accepted", "agreement", "transitions")}return dict(seed=seed, n=len(deep), groups=len(deep)//4, dev_n=len(dev3), two=stats2, three=stats3,paired_outputs=pair_saved_outputs(dev2, dev3), matched_training=compare_training_groups(shallow, deep),paired=paired, replays=replays, shared_error=shared_error, **original_replay,transcript_audit=read_json(directory/"diagnostics"/f"depth-transcripts-{seed}.json"), **group_evidence(deep))61 unmodified linesf"Judge 3 changed {len(third['transitions'])} decisions on that solver’s answers. It fixed {third['fixes']} "f"and introduced {third['harms']}. The **{abs(correct-two_correct)}-solution gap** comes from comparing "f"the answers the two solvers wrote after separate training runs.",f"On the Judge 2-trained solver’s answers, Judges 2 and 3 agreed with the checker on "f"{second['agreement'][0]}/{n} and {second['agreement'][1]}/{n}, respectively. On the Judge 3-trained "f"solver’s answers those figures were {third['agreement'][0]}/{n} and {third['agreement'][1]}/{n}. Their "f"entire six-number reports were identical on {third['identical_reports']}/{n} of the latter answers. "f"The accept/reject decision matched on {n-len(third['transitions'])}/{n}. "f"[Two-judge answers](results/calibrated/d2-{seed}/replay.jsonl) · "f"[Three-judge answers](results/calibrated/d3-{seed}/replay.jsonl)"]if third["transitions"]:26 unmodified linesf"first reverse outcome. [All {n} paired outputs and judge reports](reports/reviews/paired-outputs-seed-{seed}.md)"]sections += ["### What changed during training?",f"On the same {r['n']:,} training answers sampled by the three-judge solver, Judge 3 fixed {r['fixes']} "f"of Judge 2’s verdicts and spoiled {r['harms']}. Both judges made the same reward decision on "f"{r['n']-r['fixes']-r['harms']:,} samples and different decisions on {r['fixes']+r['harms']:,}. "f"Substituting Judge 2’s reward would have changed the "f"relative credits in **{r['changed_groups']}/{r['groups']} optimizer updates**. ""Each GRPO update compares four answers to one question. When gradings change early on, the solvers can ""learn different answers and receive different training data at subsequent updates. "10 unmodified linesf"In its first quarter of training, the three-judge solver produced {deep['first_quarter'][0]} correct "f"answers per {r['groups']} samples and received {deep['first_quarter'][1]} positive rewards. In the last "f"quarter it produced {deep['last_quarter'][0]} correct answers and received {deep['last_quarter'][1]} positive rewards."]matched = r["matched_training"]sections.append(f"We also compared the **two actual training runs** while matching the prompt, all four solver "f"texts and all Judge 1 and Judge 2 reports word for word. This held at {len(matched['matched'])}/"f"{r['groups']} updates. The reward used in each run gave the samples different relative credit "f"at {len(matched['different_credits'])} of these matched updates.")if example := r["credit_example"]:both_runs = example["update"] in matched["matched"]source = ("Both runs sampled these same four answers and produced the same lower reports. The last two ""columns show the rewards used in the two training runs." if both_runs else"The two reward columns compare the preceding report with the actual reward on this solver’s samples.")correct_samples = [s for s in example["samples"] if s[1]]wrong_samples = [s for s in example["samples"] if not s[1]]def rewarded(samples, column):return f"{sum(s[column] for s in samples)}/{len(samples)}"sections += [f"At optimizer update {example['update']}, the three-judge run sampled four answers to "f"`{example['expression']}`. The table shows the first group in which Judge 2 graded every sample correctly ""and Judge 3 both removed a correct answer’s reward and awarded a wrong answer. Each duplicate "f"was a separate sampled completion with its own sampled judge reports. {source}",markdown(["Solver wrote", "Exact checker", "Judge 2 reward used for training" if both_runs else "Judge 2 reward on this sample","Judge 3 reward used for training"],[[answer, "correct" if label else "wrong", a, b] for answer, label, a, b in example["samples"]]),f"Judge 2 rewarded **{rewarded(correct_samples,2)} correct attempts** and "f"**{rewarded(wrong_samples,2)} wrong attempts**. Judge 3 rewarded "f"**{rewarded(correct_samples,3)} correct attempts** and **{rewarded(wrong_samples,3)} wrong attempts**. ""Each individual attempt received either one point or zero.",f"[Two-judge training records](results/calibrated/d2-{seed}/rollouts.jsonl) · "f"[Three-judge training records](results/calibrated/d3-{seed}/rollouts.jsonl)"]local = "first wrong, second consistent"bad_first = deep["dev"][local]+deep["dev"]["first wrong, second inconsistent"]sections.append(f"The two-judge solver gave the correct first value on {two_correct+r['two']['dev']['second wrong']}/{n} "
57 unmodified lines58596061626357 unmodified linesassert example["samples"] == [["7,4",True,1,0], ["7,4",True,1,1], ["5,2",False,0,0], ["5,2",False,0,1]]def test_fixed_answer_replay_keeps_exact_grades_separate_from_judge_approvals():from study.depth_review import fixed_answer_replay57 unmodified lines585960616263646566676869707172737475767757 unmodified linesassert example["samples"] == [["7,4",True,1,0], ["7,4",True,1,1], ["5,2",False,0,0], ["5,2",False,0,1]]def test_actual_training_comparison_requires_identical_solver_text_and_lower_reports():from study.depth_review import compare_training_groupsleft = [dict(key="p", answer="7,4", reports=["1,0,4", "1,0,4,1,0,4"], reward=1)for _ in range(8)]right = [{**r, "reports": [*r["reports"], "1,0,4,1,0,4"]} for r in left]right[1]["reward"] = 0right[1]["reports"][2] = "1,0,4,0,1,0"right[5]["reports"][1] = "1,0,7,1,0,4"assert compare_training_groups(left, right) == {"matched": [1], "different_credits": [1]}right[0]["answer"] = "7, 4"assert compare_training_groups(left, right) == {"matched": [], "different_credits": []}def test_fixed_answer_replay_keeps_exact_grades_separate_from_judge_approvals():from study.depth_review import fixed_answer_replay
README.md+9-5
docs/assets/study.json+46
src/study/depth_review.py+50-9
tests/test_depth_review.py+14