Skip to content

benchmarks: disparity dimensions mean divergence, not existence - #468

Merged
godofecht merged 1 commit into
mainfrom
fix/disparity-dimension-floors
Aug 21, 2026
Merged

benchmarks: disparity dimensions mean divergence, not existence#468
godofecht merged 1 commit into
mainfrom
fix/disparity-dimension-floors

Conversation

@godofecht

Copy link
Copy Markdown
Owner

Prompted by the GaussianNB · iris row wearing three disparity flags while being the best-matched row in the suite: priors and classes exactly equal, every state diff at f32-ulp scale (theta frobenius 5e-8), score within 2.8e-8 against a tolerance of 1e-3.

The disease, third occurrence

All 19 rows were flagged has_tracked_disparity, so the flag had zero discriminating power. Same existence-vs-divergence confusion as covered_rows > 0 (#429) and the win/loss prose drift (#436):

  • "numerical" fired on any nonzero float diff → 18/19 flagged. Now floored at max(1e-6, 1% of declared tolerance), the fix: make the disparity gate one-sided and hardware-aware (#351, #373) #401 precedent. 18 → 3, and the survivors are the genuine gaps (digits DecisionTree/RandomForest tie-break rows, LogisticRegression digits).
  • "model-state" was if state: — a truthiness test on the diagnostics dict, so 19/19 the moment feat: learned-state diagnostics for every canonical benchmark row (3/19 -> 19/19) #402 completed coverage. Being measured is not being disparate. Now requires divergence: any _first_divergent_index >= 0, or relative diff > 1e-5 with paired absolute diff > 1e-7 (the pairing stops a near-zero denominator promoting noise). 19 → 13.
  • "runtime" unchanged — a 37x win genuinely is a runtime difference and tracking it is the report's purpose.

Counts and page

Runtime differs on every row, so rows_with_tracked_disparity stays 19/19 forever. Added rows_with_substantive_disparity (non-runtime dimensions, currently 14/19); the benchmarks page card now shows that with an honest label. Old field kept for compatibility.

Verification

  • Regenerated report: GaussianNB · iris reads ["runtime"] alone.
  • disparity.yml's assertions, publish_headline_v2.validate_disparity, model_state_coverage --require-complete, and check_disparity_regression against the previous report all pass.
  • Page JS validated with node --check.
  • No generated artifacts committed; freeze-results refreshes the report on main.

Every one of the 19 canonical rows was flagged as having a tracked
disparity, which made the flag meaningless. GaussianNB iris was the
clearest casualty: fitted priors and classes exactly equal, every state
diff at f32-ulp scale (theta frobenius 5e-8), score within 2.8e-8 of
sklearn against a declared tolerance of 1e-3, and it still carried
numerical, model-state and runtime dimensions.

Two causes, both the existence-vs-divergence disease this repo has now
hit three times (covered_rows > 0 in #429, the win/loss prose in #436):

- "numerical" fired on any nonzero float difference. It now uses the
  disparity-gate precedent from #401: noise below max(1e-6, 1% of the
  row's declared tolerance) is not a finding. 18 rows flagged -> 3, and
  the three survivors are the genuine seed and tie-break gaps on the
  digits tree rows plus LogisticRegression.

- "model-state" tested the diagnostics dict for truthiness, so the
  moment #402 took coverage to 19/19, every row became "disparate" by
  virtue of being measured. It now requires actual divergence: any
  first_divergent_index >= 0 (exact by construction), or a relative
  diff above 1e-5 whose paired absolute diff also clears 1e-7, so a
  near-zero denominator cannot promote pure noise. 19 rows -> 13.

"runtime" is unchanged: a 37x speedup genuinely is a runtime
difference, and tracking favourable differences is the report's stated
purpose. Because runtime differs on every row, counts gain
rows_with_substantive_disparity (dimensions beyond runtime, currently
14/19), and the benchmarks page card now shows that number with an
honest label instead of the always-19/19 tracked count. The old count
field is kept for compatibility; publish validation and the disparity.yml
assertions were re-run against a regenerated report and pass.

GaussianNB iris now reads ["runtime"] alone, which is the truth: the
fitted models match to the last float digit and only the speed differs.

Generated artifacts are not committed; freeze-results refreshes
disparity_report.json on main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@godofecht
godofecht merged commit 7459290 into main Aug 21, 2026
10 checks passed
@godofecht
godofecht deleted the fix/disparity-dimension-floors branch August 21, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant