verify-frequency-of-verdict-changes · 74ac39524529
Browse filesFiles changed (5)
87 unmodified lines888990919293942 unmodified lines9798991001011029 unmodified lines11211311411511611711811912012112212387 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.2 unmodified lines| Judge 2 | 104/144 (72.2%) | 599/880 (68.1%) | +4.2 || Judge 3 | 88/144 (61.1%) | 569/880 (64.7%) | -3.5 |During its own training run, the two-judge solver generated 648/1,024 exact answers and received 751 positive rewards. The three-judge solver generated 144/1,024 exact answers and received 657 positive rewards. Each run sampled from its own evolving solver.| Within the same training question | Correct answer ranks higher | Tied | Wrong answer ranks higher |9 unmodified lines| 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)87 unmodified lines888990919293942 unmodified lines9798991001011021031041051061079 unmodified lines11711811912012112212312412512612712887 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 (10.0%). A previously correct grade became wrong on 4.3% of all samples. 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.2 unmodified lines| Judge 2 | 104/144 (72.2%) | 599/880 (68.1%) | +4.2 || Judge 3 | 88/144 (61.1%) | 569/880 (64.7%) | -3.5 || Exact grade of the training answer | Judge 2 rejected → Judge 3 accepted | Judge 2 accepted → Judge 3 rejected || --- | --- | --- || Correct | 1 | 17 || Wrong | 27 | 57 |During its own training run, the two-judge solver generated 648/1,024 exact answers and received 751 positive rewards. The three-judge solver generated 144/1,024 exact answers and received 657 positive rewards. Each run sampled from its own evolving solver.| Within the same training question | Correct answer ranks higher | Tied | Wrong answer ranks higher |9 unmodified lines| Solver wrote | Exact checker | Judge 2 reward used for training | Judge 3 reward used for training || --- | --- | --- | --- || 7,4 | correct | **1** · Endorses Judge 1 and supports the value 4. Accepts the solver and gives 4 as its final value.<br><code>1,0,4,1,0,4</code> | **0** · Flags field 2 of Judge 2 and proposes 4. Rejects the solver and says step 1 should be 0.<br><code>0,2,4,0,1,0</code> || 7,4 | correct | **1** · Endorses Judge 1 and supports the value 4. Accepts the solver and gives 4 as its final value.<br><code>1,0,4,1,0,4</code> | **1** · Endorses Judge 2 and supports the value 4. Accepts the solver and gives 4 as its final value.<br><code>1,0,4,1,0,4</code> || 5,2 | wrong | **0** · Endorses Judge 1 and supports the value 3. Rejects the solver and says step 1 should be 5.<br><code>1,0,3,0,1,5</code> | **0** · Endorses Judge 2 and supports the value 3. Rejects the solver and says step 1 should be 5.<br><code>1,0,3,0,1,5</code> || 5,2 | wrong | **0** · Endorses Judge 1 and supports the value 3. Rejects the solver and says step 1 should be 2.<br><code>1,0,3,0,1,2</code> | **1** · Flags field 2 of Judge 2 and proposes 3. Accepts the solver and gives 3 as its final value.<br><code>0,2,3,1,0,3</code> |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. Across the run, **1/256 groups** met the selection rule for this example. In **219/256 groups**, Judge 3 introduced zero new grading errors.[Two-judge training records](results/calibrated/d2-17/rollouts.jsonl) · [Three-judge training records](results/calibrated/d3-17/rollouts.jsonl)
223108 unmodified lines22310922311022311122311222311322311421 unmodified lines223136223137223138223139223140223141223108 unmodified lines"credit_example": {"update": 20,"expression": "(18 - 11) - 3","samples": [["7,4",21 unmodified lines]]},"j2_pairs": [28,81,223108 unmodified lines22310922311022311122311222311322311422311522311622311722311822311922312022312122312222312322312422312522312622312722312822312922313022313122313221 unmodified lines223154223155223156223157223158223159223160223161223162223163223164223165223166223167223168223169223170223171223108 unmodified lines"credit_example": {"update": 20,"expression": "(18 - 11) - 3","reports": [["1,0,4,1,0,4","0,2,4,0,1,0"],["1,0,4,1,0,4","1,0,4,1,0,4"],["1,0,3,0,1,5","1,0,3,0,1,5"],["1,0,3,0,1,2","0,2,3,1,0,3"]],"samples": [["7,4",21 unmodified lines]]},"verdict_flips": [{"reject_to_accept": 27,"accept_to_reject": 57},{"reject_to_accept": 1,"accept_to_reject": 17}],"example_pattern_groups": 1,"groups_without_new_errors": 219,"j2_pairs": [28,81,
20 unmodified lines2122232425262720 unmodified lines| second wrong | 0 | 18 | 3 || format | 1 | 93 | 49 |On the same 1024 training answers, Judge 3 fixed 58 effective Judge 2 verdicts and spoiled 44. Its decision changed the within-group advantages in 81/256 optimizer updates. Reward rates compare all answers of each class on this fixed trajectory.| Frozen reward source | Correct answers rewarded | Wrong answers rewarded | Correct minus wrong rate (pp) || --- | --- | --- | --- |20 unmodified lines2122232425262720 unmodified lines| second wrong | 0 | 18 | 3 || format | 1 | 93 | 49 |On the same 1024 training answers, Judge 3 fixed 58 effective Judge 2 verdicts and spoiled 44. Its decision changed the within-group advantages in 81/256 optimizer updates. In 219/256 groups it introduced zero new errors. On 1/256 groups, Judge 2 got every verdict right and Judge 3 both removed credit from a correct answer and paid an incorrect answer. Reward rates below compare all answers of each class on this fixed trajectory.| Frozen reward source | Correct answers rewarded | Wrong answers rewarded | Correct minus wrong rate (pp) || --- | --- | --- | --- |
7 unmodified lines89101112131456 unmodified lines71727374757677787980818283848586878889909192932 unmodified lines96979899100101181 unmodified lines2832842852862872882892 unmodified lines29229329429529629724 unmodified lines32232332432532632732832933033133297 unmodified lines4304314324334344354367 unmodified linesfrom .design import SEEDSfrom .domain import Problemfrom .learning_review import execute_stepsfrom .paired_examples import differing_examples, outcome_counts, output_table, pair_saved_outputs, report_keyfrom .storage import read_json, rowsfrom .tables import markdown56 unmodified linespreferences = [Counter(), Counter()]paid = [dict(correct=0,wrong=0) for _ in range(2)]credit_example = Nonefor group in batched(deep, 4):if len(group) != 4:raise ValueError("A comparison requires four samples per group")labels = [r["label"] for r in group]second, third = [[effective_bit(r["reports"][index]) for r in group] for index in (1, 2)]if (credit_example is None and second == labelsand any(y and not bit for y, bit in zip(labels, third, strict=True))and any(not y and bit for y, bit in zip(labels, third, strict=True))):# First archived group where J3 both removed credit from a correct sample and gave it to a wrong one.credit_example = dict(update=group[0]["step"]+1, expression=group[0]["expression"],samples=[[row["answer"], bool(row["label"]), a, b]for row, a, b in zip(group, second, third, strict=True)])for counts, votes in zip(paid,(second,third),strict=True):for label,bit in zip(labels,votes,strict=True):counts["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]:2 unmodified linesfor counts, votes in zip(preferences, (second, third), strict=True):counts[votes[good] - votes[bad]] += 1return dict(fixes=fixes, harms=harms, changed_groups=changed, same_answers_paid=paid, credit_example=credit_example,j2_pairs=[preferences[0][i] for i in (1, 0, -1)], j3_pairs=[preferences[1][i] for i in (1, 0, -1)])181 unmodified linessections += ["### 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 "2 unmodified lines"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.",reward_rates(r),f"During its own training run, the two-judge solver generated {r['two']['training']['correct']}/{r['n']:,} "f"exact answers and received {sum(r['two']['rewarded'].values())} positive rewards. The three-judge solver "f"generated {deep['training']['correct']}/{r['n']:,} exact answers and received {sum(deep['rewarded'].values())} positive rewards. "24 unmodified linesf"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"97 unmodified lines("correct","first wrong, second consistent","first wrong, second inconsistent","second wrong","format")]),f"On the same {r['n']} training answers, Judge 3 fixed {r['fixes']} effective Judge 2 verdicts and "f"spoiled {r['harms']}. Its decision changed the within-group advantages in {r['changed_groups']}/{r['groups']} ""optimizer updates. Reward rates compare all answers of each class on this fixed trajectory.",reward_rates(r),"Within-question pairs compare correct and incorrect completions of the same problem. ""Pairs within and across rows share observations.",7 unmodified lines89101112131456 unmodified lines71727374757677787980818283848586878889909192939495969798991002 unmodified lines103104105106107108109181 unmodified lines2912922932942952962972982992 unmodified lines30230330430530630730830931031124 unmodified lines33633733833934034134234334434534634734834935097 unmodified lines4484494504514524534544554564577 unmodified linesfrom .design import SEEDSfrom .domain import Problemfrom .learning_review import execute_stepsfrom .paired_examples import differing_examples, explain_report, outcome_counts, output_table, pair_saved_outputs, report_keyfrom .storage import read_json, rowsfrom .tables import markdown56 unmodified linespreferences = [Counter(), Counter()]paid = [dict(correct=0,wrong=0) for _ in range(2)]credit_example = Nonepattern_groups = groups_without_harm = 0flips = [dict(reject_to_accept=0, accept_to_reject=0) for _ in range(2)]for group in batched(deep, 4):if len(group) != 4:raise ValueError("A comparison requires four samples per group")labels = [r["label"] for r in group]second, third = [[effective_bit(r["reports"][index]) for r in group] for index in (1, 2)]directions = [(y, b) for a, b, y in zip(second, third, labels, strict=True) if a != b]for label, accepted in directions:flips[int(label)]["reject_to_accept" if accepted else "accept_to_reject"] += 1pattern = second == labels and (1, 0) in directions and (0, 1) in directionspattern_groups += patternif credit_example is None and pattern:credit_example = dict(update=group[0]["step"]+1, expression=group[0]["expression"],reports=[row["reports"][1:3] for row in group],samples=[[row["answer"], bool(row["label"]), a, b]for row, a, b in zip(group, second, third, strict=True)])for counts, votes in zip(paid,(second,third),strict=True):for label,bit in zip(labels,votes,strict=True):counts["correct" if label else "wrong"] += bitgroup_harms = sum(accepted != truth for truth, accepted in directions)harms += group_harmsfixes += len(directions) - group_harmsgroups_without_harm += group_harms == 0changed += different_group_credit(second, third)for i, j in combinations(range(4), 2):if labels[i] == labels[j]:2 unmodified linesfor counts, votes in zip(preferences, (second, third), strict=True):counts[votes[good] - votes[bad]] += 1return dict(fixes=fixes, harms=harms, changed_groups=changed, same_answers_paid=paid, credit_example=credit_example,verdict_flips=flips, example_pattern_groups=pattern_groups, groups_without_new_errors=groups_without_harm,j2_pairs=[preferences[0][i] for i in (1, 0, -1)], j3_pairs=[preferences[1][i] for i in (1, 0, -1)])181 unmodified linessections += ["### 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"({100*(r['fixes']+r['harms'])/r['n']:.1f}%). A previously correct grade became wrong on "f"{100*r['harms']/r['n']:.1f}% of all samples. "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 "2 unmodified lines"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.",reward_rates(r),markdown(["Exact grade of the training answer","Judge 2 rejected → Judge 3 accepted","Judge 2 accepted → Judge 3 rejected"],[[label,r["verdict_flips"][idx]["reject_to_accept"],r["verdict_flips"][idx]["accept_to_reject"]]for label,idx in (("Correct",1),("Wrong",0))]),f"During its own training run, the two-judge solver generated {r['two']['training']['correct']}/{r['n']:,} "f"exact answers and received {sum(r['two']['rewarded'].values())} positive rewards. The three-judge solver "f"generated {deep['training']['correct']}/{r['n']:,} exact answers and received {sum(deep['rewarded'].values())} positive rewards. "24 unmodified linesf"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", f"**{a}** · {explain_report(j2,2,a)}",f"**{b}** · {explain_report(j3,3,b)}"]for (answer,label,a,b),(j2,j3) in zip(example["samples"],example["reports"],strict=True)]),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**. "f"Each individual attempt received either one point or zero. Across the run, "f"**{r['example_pattern_groups']}/{r['groups']} groups** met the selection rule for this example. "f"In **{r['groups_without_new_errors']}/{r['groups']} groups**, Judge 3 introduced zero new grading errors.",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"97 unmodified lines("correct","first wrong, second consistent","first wrong, second inconsistent","second wrong","format")]),f"On the same {r['n']} training answers, Judge 3 fixed {r['fixes']} effective Judge 2 verdicts and "f"spoiled {r['harms']}. Its decision changed the within-group advantages in {r['changed_groups']}/{r['groups']} "f"optimizer updates. In {r['groups_without_new_errors']}/{r['groups']} groups it introduced zero new errors. "f"On {r['example_pattern_groups']}/{r['groups']} groups, Judge 2 got every verdict right and Judge 3 ""both removed credit from a correct answer and paid an incorrect answer. Reward rates below compare all ""answers of each class on this fixed trajectory.",reward_rates(r),"Within-question pairs compare correct and incorrect completions of the same problem. ""Pairs within and across rows share observations.",
52 unmodified lines53545556575859606152 unmodified linesgroup = [dict(step=19, expression=problem, answer=answer, label=y,reports=["1,0,4", f"1,0,4,{y},0,4", f"1,0,4,{b},0,4"])for answer, y, b in [("7,4",1,0), ("7,4",1,1), ("5,2",0,0), ("5,2",0,1)]]example = group_evidence(group)["credit_example"]assert (example["expression"], example["update"]) == (problem, 20)assert 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():52 unmodified lines5354555657585960616263646566676852 unmodified linesgroup = [dict(step=19, expression=problem, answer=answer, label=y,reports=["1,0,4", f"1,0,4,{y},0,4", f"1,0,4,{b},0,4"])for answer, y, b in [("7,4",1,0), ("7,4",1,1), ("5,2",0,0), ("5,2",0,1)]]# A second group with unchanged grades distinguishes an illustrative group from the population.unchanged = [{**r, "step": 20, "reports": [*r["reports"][:2], r["reports"][1]]} for r in group]evidence = group_evidence(group + unchanged)example = evidence["credit_example"]assert (example["expression"], example["update"]) == (problem, 20)assert example["samples"] == [["7,4",True,1,0], ["7,4",True,1,1], ["5,2",False,0,0], ["5,2",False,0,1]]assert evidence["example_pattern_groups"] == evidence["groups_without_new_errors"] == 1assert evidence["verdict_flips"] == [{"reject_to_accept": 1, "accept_to_reject": 0}, {"reject_to_accept": 0, "accept_to_reject": 1}]assert example["reports"][0] == group[0]["reports"][1:]def test_actual_training_comparison_requires_identical_solver_text_and_lower_reports():
README.md+11-6
docs/assets/study.json+30
reports/reviews/depth-diagnosis.md+1-1
src/study/depth_review.py+32-11
tests/test_depth_review.py+8-1