feat(benchmark): Signal-to-noise analysis layer: SNR, scenario-health audit, contamination defense#21
Merged
Conversation
Generalizes _paired to compute the within-seed paired adherence difference for a list of arm pairs, not just one, keyed by <a>_vs_<b>. build_dataset_multiseed and merge_seed_datasets now default to DEFAULT_PAIRS = (rac-vs-naive_rag, rac-vs-no_grounding) -- the pre-registered falsifier plus the parametric-memory floor -- while still accepting a single pair= for back-compat. A contrast whose arms aren't both in the sweep is silently skipped, so the default is safe for any arm subset. Each entry's across-seed diff_std is the noise term the forthcoming signal-to-noise report divides into. Results-neutral: no adherence number changes, only an additional paired series.
New scoring/snr.py computes SNR = |paired diff_mean| / across-seed diff_std per arm contrast and per N, with the article's core caveat baked in: noise cannot be estimated from one seed, so n_seeds<2 reports 'noise_not_estimable' rather than a fabricated ratio. Distinguishes noise-dominated (snr<1), clean separation (zero noise, nonzero signal), and no-effect (zero noise, zero signal). Headline SNR is taken at the largest N (where the thesis is adjudicated). Pure and results-neutral -- reads only the existing paired block.
New scoring/health.py classifies every crossover scenario as broken (ceiling arm context_dump never adheres -> unsolvable/mis-specified), contaminated (floor arm no_grounding adheres -> parametric memory suffices, doesn't test grounding), tie (no between-arm separation), or discriminating -- the analogue of OpenAI's 'X% of tasks are broken' ceiling analysis. unknown when neither control arm is in the sweep. Reports per-scenario rows + summary counts. Pure and results-neutral; reads only per_scenario.
… dashboard report.py gains a Signal-to-noise section (SNR per contrast per N, with noise-dominated cells flagged and a clear 'noise not estimable' notice for single-seed runs) and a Scenario-health section (the discrimination audit's summary counts + a table of broken/contaminated/tie scenarios), inserted after the per-scenario attribution. dashboard.py gains a matching 'Signal / noise' tab (s6); Reproduce->s7, Run->s8, with a new #t8/#s8 rule in the template CSS and _TABS kept in lockstep (guarded by a new test). All .get-guarded so legacy/single-seed/no-rac datasets render gracefully.
New spec/methodology-signal-to-noise.md defines the SNR metric (signal = within-seed paired diff, noise = its across-seed std; >=2 seeds required), the four scenario-health classes, and the contamination defense (synthetic scenarios are contamination-proof; the no_grounding floor detects it in real ones), mapping the OpenAI and Ai2 lessons to the benchmark's mechanisms. Additive methodology note -- changes no gold labels, gates, or the frozen H1/H2 tests. The real-crossover Makefile target and run_real.sh now flag that SEEDS>=2 is required for the signal-to-noise section (arms already include rac + no_grounding, so both contrasts populate), and report.py's Limitations section points readers to the methodology.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the lessons from OpenAI's "Separating signal from noise in coding evaluations" and the aligned Ai2 "Signal and Noise" framework. Everything here is reporting/analysis-layer and results-neutral — verified byte-identical
arms/cells/stats/per_scenariobefore/after; only a secondpairedseries is added. Full suite green (462 passed, 6 skipped).What the articles say, and where we stood
scoring/snr.pyscoring/health.pydiscrimination auditno_groundingfloor surfaced as the contamination controlChanges
Both-contrasts paired diff (
scoring/crossover.py) —_pairednow computes the within-seed paired adherence difference for a list of arm pairs, defaulting toDEFAULT_PAIRS= rac-vs-naive_rag (H1) and rac-vs-no_grounding (H2). A contrast whose arms aren't both in the sweep is silently skipped;pair=still accepted for back-compat.Signal-to-noise (
scoring/snr.py) — SNR = |paireddiff_mean| / across-seeddiff_stdper contrast per N. The article's core caveat is baked in: noise cannot be estimated from one seed, son_seeds < 2reports "not estimable" rather than a fabricated ratio. Distinguishes noise-dominated (SNR < 1), clean separation (σ=0, nonzero gap), and no-effect. Headline quoted at the largest N.Scenario-health audit (
scoring/health.py) — classifies every scenario as broken (ceilingcontext_dumpnever adheres), contaminated (floorno_groundingadheres → parametric memory suffices), tie (no separation), or discriminating, with summary counts — the analogue of OpenAI's "X% of tasks are broken" ceiling analysis.Surfacing (
scripts/report.py,runner/dashboard.py) — a Signal-to-noise section and a Scenario-health section in the report; a new "Signal / noise" dashboard tab (with the template CSS/tab indices kept in lockstep, guarded by a test). All.get-guarded so legacy/single-seed/no-rac datasets render gracefully.Methodology + wiring (
spec/methodology-signal-to-noise.md,Makefile,run_real.sh, Limitations prose) — documents the SNR definition, the health classes, and the contamination defense (synthetic scenarios are contamination-proof; the floor detects it in real ones), mapping each article lesson to a mechanism. An additive methodology note, not a pre-registration amendment — no gold labels, gates, or the frozen H1/H2 tests change. The real-crossover arms already include rac + no_grounding, so both contrasts populate; the docs now flag thatSEEDS≥2is required for the SNR section.Testing
test_snr.py,test_scenario_health.py,test_report_snr.py; extensions totest_real_curve.py(both contrasts) andtest_dashboard.py(new tab + tab/section lockstep).Independent of PR #20 (roster Step 1); branched from
main.