Skip to content

[Analysis] The binomial-tail underflow bound was at ~790 sites — audit what else it capped #570

Description

@LightChainr

Follow-up to a bug a 1M pilot found by accident. This ticket is about what the bug had been quietly preventing.

Correction (2026-09-05). An earlier version of this ticket said "the fix is in". That was wrong on main. The fix lives only in PR #564, commit 844173c, which is not merged. Nothing below can be checked against main until it is. Read every claim here as conditional on that PR.

What was wrong

analyze_p48_retrospective.tail_and_derivative started its binomial recurrence at (1-p)**n and walked up. At the percolation threshold 1-p ≈ 0.407, so that first term underflows to exactly zero somewhere near 790 sites, and the multiplicative recurrence then stays at zero for every later term. The tail, its derivative, and every channel built on them came back as 0.0 with nothing raised.

project_size then bisects on a quantity that is −1 everywhere and walks off the end of (0,1). That exception is the only reason this surfaced at all — otherwise it would have been a plausible-looking zero.

Fixed (in #564) by anchoring the recurrence at the binomial mode: the largest term is at least 1/(n+1) and so is always representable. Checked against exact Fraction arithmetic at small n, and against the old implementation on real N=290 data, where it agrees to 2e-13 relative at every p the analysis visits. N = 4000 now analyzes cleanly. See tests/test_p48_retrospective.py.

What this ticket is for

The bound had never been noticed because every size this project has run is below it. It nevertheless capped every large-N plan in the repository, and nobody knew, which means some past decision may have been made against a ceiling that was numerical rather than physical.

Four things worth checking, none of them urgent:

  1. Was any geometry ever rejected as "too large"? docs/ROADMAP.md item 4 stops adding replicas to N130/N170 and asks for "the smallest larger geometries where R = 2, 4, 8 are injective". [P2] High-memory transfer-matrix resource probe before frontier extension #31 is a high-memory transfer-matrix resource probe. If any size decision was bounded by a silent zero rather than by cost, it should be revisited now.
  2. Is the same pattern anywhere else? Any q**n, p**n or factorial-scaled start term in a loop over lattice sites is a candidate. scripts/ has several analyzers that consume the same histogram format. A grep for ** n, **(n, math.factorial and comb( over scripts/ is the whole audit.
  3. Above p ≈ 0.9 the old path was already inexact at N=2908.9e-07 relative at p = 0.92. That was harmless, because the bisection reads only a sign up there and the reported channels are evaluated at p₀ ≈ 0.593. Worth confirming that no other consumer evaluates these tails in the upper tail and keeps the value.
  4. Which committed artifacts no longer reproduce bit-for-bit? The fix is a reassociation of the same sum, so every artifact derived from tail_and_derivative moves in its last few digits. This is known for results/server-20260828/P49-fullcurve-doubling-100m/analysis/score.json, where it was measured leaf by leaf and recorded in predictions/p49_fullcurve_doubling_semantic_gate_20260830.json under replay_reproducibility: 0 structural differences, 565 of 598 float leaves moved, worst 6.8e-9 relative, worst χ² move 2.4e-10. Three other scorers import the same routine — score_axis_pair_annihilator.py, score_intrinsic_functional_cocycle.py, score_v14_scalar_root_projector.py. Their tests pass, but that only means their tests do not replay a committed artifact through the real numerics. Check whether any of their committed outputs are now stale, and if so measure the move rather than regenerating a dated reveal.

What this does not need

Not a rewrite, not a general numerical-robustness framework, and not a tamper test on the fix. If the grep comes back clean and no size decision was affected, close it saying so — that is a complete answer.

Done looks like

Either a short note in notes/ recording that nothing else was affected, or the specific places that were, with fixes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P2Deferred research or on-demand support; no default new compute allocation.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions