Skip to content

Tooling: 44× faster production verify_factor via packed-row equality with identical receipts - #2194

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/central-factor-packed-production-60b9
Oct 15, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/central-factor-packed-production-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, scripts/experiments/complex_centers.py:verify_factor still used the historical nested entrywise loop over all scatter/gather pairs. Ross Richardson’s opt-in adapter research/central-factor-packed/ already proved an injective packed-row algorithm with identical receipts. This PR wires that equivalent check into the production source used by scripts/audit_complex_centers.py / make verify-certificates.

Only the source pin for scripts/experiments/complex_centers.py changes inside certificates/dyadic-central-factor.json. Every coefficient is still checked; factor generators, side/phase obligations and the retained historical 2^-31 language are unchanged.

Tooling improvement; no new kappa. Selected frontier untouched.

Result

On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five alternating fresh-process pairs gave median wall time:

  • factor-only: 2.615 → 0.059 seconds (44.06×)
  • complete audit: 5.784 → 3.356 seconds (1.72×)

Timing is host-descriptive and is not a correctness gate. Every verify_factor receipt matches the baseline checker fieldwise.

Package: research/central-factor-production/.

Validation

python3.12 -I -B research/central-factor-production/verify.py
python3.12 -I -O -B research/central-factor-production/verify.py
python3.12 -B scripts/research_package.py --package research/central-factor-production
python3.12 -I -B research/central-factor-production/benchmark.py --rounds 5

Expected:

PASS_CENTRAL_FACTOR_PRODUCTION heights=[8, 10, 12, 18, 26] ... no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/central-factor-production outcome=completed
PASS_IDENTICAL_CENTRAL_FACTOR_PRODUCTION_RECEIPTS

Default verify is read-only. Coefficient-mismatch and temp-copy corruption controls reject; require gates remain under -O. Full make verify, selected cold replay, Lean, and multiplication-theorem obligations were not rerun for this isolated historical-checker change.

Overlap and credit

Closest priors (different delivery): Ross Richardson’s research/central-factor-packed/ (opt-in packed adapter; this is the production wiring), CrocSwap/integer-mult-bounds#756, CrocSwap/integer-mult-bounds#2117 (same dyadic-central-factor.json, different pin key disjoint_tensor.py). No competing open PR on production verify_factor at refresh.

Douglas R. Colkitt authored the dyadic central factor and original checker. Ross Richardson authored the packed algorithm. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

Wire Ross Richardson's injective packed-row central-factor check into the
shipped scripts/experiments/complex_centers.py path used by
audit_complex_centers / verify-certificates. Factor receipts stay fieldwise
identical; certificates/dyadic-central-factor.json changes only that source
pin. Sibling pin-restore tests accept the new complex_centers hash.

Package research/central-factor-production/ with baseline, verify, benchmark
and RESULT.json (Linux/CPython 3.12.3 medians: factor 44.06×, audit 1.72×).

Prepared by Wentao Li with substantial AI assistance.
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.

2 participants