bench(s5): confidence intervals, larger protocol set, and power analysis (#965)#971
Merged
Merged
Conversation
…sis (#965) Report every S5 lifecycle rate with a 95% percentile-bootstrap confidence interval, grow the protocol set from 15 to 30 so the intervals tighten, and document the identity-pool sizing and a power analysis for the budget-gated replicate run. - New bench/internal/stats package holds the bootstrap primitives (BootstrapMeanCI, BootstrapDeltaCI, ProportionCI, Quantile, fixed Seed/Iters/Alpha) shared by both the S1-S3 report and the S5 lifecycle report; report/compare.go now consumes it instead of its own copies, so the two suites cannot drift into two bootstrap implementations. The refactor is behavior-preserving. - Every lifecycle and supersede Rate carries a reproducible 95% CI (resampled from num/den with a fixed seed) rendered in the human summary. Zero-width intervals (unexercised, or a rate pinned at 0%/100%) are omitted rather than printed as a meaningless bracket. SupersedeRate's interval is the exact reflection of DuplicateRate's, matching the point-rate complement. - The protocol set doubles to 30 (20 promote + 10 supersede). Each new definition is a novel label mapped to dataset-computed ground truth, collision-free against the seeded knowledge pages and the other protocols. Committed protocol YAML and the scripted smoke are regenerated; the reproducibility hash gate passes. - bench/README.md documents the pool-sizing formula (need = 2 * protocols * k; the 264-key pool fits 30 protocols through k=4, k=5 needs >=300) and a detectable- effect power table showing supersede/duplicate is the binding constraint. Closes #965
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #971 +/- ##
=======================================
Coverage 89.02% 89.03%
=======================================
Files 424 424
Lines 48581 48581
=======================================
+ Hits 43251 43255 +4
+ Misses 3552 3550 -2
+ Partials 1778 1776 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Part 3 of 4 of the benchmark-improvement epic (#958). The S5 memory-insight-knowledge lifecycle metrics were noisy because the suite was small — 15 protocols, with applicable denominators as low as 7–10 on the supersede metrics — so several lifecycle numbers could only be reported as ranges across replicates rather than point estimates with stated uncertainty. This PR gives every S5 rate a bootstrap confidence interval, doubles the protocol set so those intervals tighten, and documents the identity-pool sizing and a power analysis for the budget-gated replicate run.
Confidence intervals
Every S5 lifecycle rate and every isolated-supersede rate now carries a 95% percentile-bootstrap confidence interval, reproducible from a fixed resampling seed, and it is rendered directly in the human summary:
The bootstrap primitives live in a new
bench/internal/statspackage shared by both the S1–S3 cross-arm report and the S5 lifecycle report, so the two suites draw their intervals from one implementation rather than two divergent copies.report/compare.gowas refactored onto the shared package; its numeric output is unchanged (the report still resamples its actual per-attempt outcomes with the same seed).A CI is shown only when the interval has width. A zero-width interval — an unexercised metric (empty denominator), a rate pinned at 0% or 100% whose bootstrap collapses to a point, or a pre-#965 results file whose stored metrics carry no interval — is omitted rather than printed as a meaningless
[x.x-x.x]that the count already conveys. In the isolated-supersede report,SupersedeRate's interval is the exact reflection ofDuplicateRate's ([1 - dupHigh, 1 - dupLow]), so the two stay exact complements exactly as their point rates already do.Larger protocol set
The S5 protocol set doubles from 15 to 30 (20 promote + 10 supersede), which roughly doubles every metric's denominator — the supersede metrics most of all, since they were the noisiest. Each of the 15 new protocols teaches a novel definition mapped to a dataset-computed ground truth, collision-free against the seeded knowledge pages and against every other protocol, so recall and transfer remain clean measurements (the only way to answer is the taught memory or the promoted knowledge). Ground truth is generated from the fixed-seed dataset, never hand-typed, exactly as the S1–S3 truths are; the committed protocol YAML and the scripted no-model smoke are regenerated and gated by the existing reproducibility hash.
Power analysis and identity-pool sizing
bench/README.mddocuments both the sizing and the statistical power the grown set buys. Each attempt consumes two pool identities (teacher + learner), so a run needs2 × protocols × kkeys; the committed 264-key pool covers the 30-protocol lifecycle through k=4 (240), and a k=5 run needs the pool grown to ≥300 (recommend 320) with-identity-keysraised to match. A computed detectable-effect table (normal-approximation sample size at α=0.05, 80% power) shows the supersede/duplicate group is the binding constraint — its denominator is only10 × k, so at k=3 it resolves ~26-point effects and at k=5 ~20-point ones, which is why the phase-4 supersede numbers read as noise. Resolving a 15-point transfer change — the size of the observed transfer ceiling — needs k=5 over the twenty promote protocols. Growing the pool is intentionally left to that budget-gated run rather than pre-committed here.Scope
The larger real replicate run is the budget-gated evaluation deliverable and is not part of this PR. The published S5 result records in
docs/reference/benchmarks.mdanddocs/llms-full.txtdescribe the earlier 15-protocol runs and are left unchanged, since those runs genuinely used 15 protocols.Testing
All changes are in the
bench/submodule plusbench/README.md.make bench-test(build, vet, race test) — greengolangci-lint run ./...inbench/— 0 issuesmake bench-genproduces no diff)semgrep --config=p/golangon the refactored report file — 0 findingsCloses #965