DRAFT (record only): algebraic phi start oracle — better starts, identical answer - #273
Draft
oshaughnessy-junior wants to merge 1 commit into
Draft
oshaughnessy-junior wants to merge 1 commit into
oshaughnessy-junior wants to merge 1 commit into
Conversation
…not a certificate #267 built an exact outside bound on the algebraically enumerated stationary set. The bound is unsound at production mode order: `enumerate_torus_maxima` declines from KP=5 up with "fewer than two algebraically complete projections", and an incomplete candidate set makes a supremum bound an UNDER-estimate. #267 is closed. The set itself is still the best thing available for PROPOSING optimizer starts, and a proposal needs no completeness proof -- a missed start costs accuracy a downstream consistency check can catch, not soundness. On its decline path the enumerator returns the union of its on-torus roots, so it is non-empty exactly where it cannot certify. `phi_start_candidates` is that, and nothing else: no kernel wiring, no `bound_nodes`, no `phi_local_lnI_planned`. `certified` is carried for the caller's ledger and gates nothing. Measured, seed 7 / KS=2, sup_h over the candidates vs over a 32768-point uniform grid (negative = candidates win), at amplitudes 1108 and 283672: KP certified n_cand gap (nat) enumerator 3 yes 14 -3.0e-05 / -7.6e-03 0.06 - 0.15 s 5 no 48 -4.8e-04 / -1.2e-01 0.32 - 0.33 s 7 no 47/49 -1.5e-03 / -3.8e-01 9 no 59/66 -1.5e-03 / -3.9e-01 8.7 - 9.6 s The candidates beat the dense grid at every mode order because they sit ON the peak while a uniform grid straddles it, and the gap widens with amplitude. Count and cost are flat across the 256x amplitude range and track mode order instead; the KP=9 cost of ~9 s is real and is the thing to watch. 40 passed in the focused CPU JAX file; EXPECTED_TESTS 461 -> 464. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 7, 2026 07:24 — with
GitHub Actions
Active
oshaughnessy-junior
marked this pull request as draft
September 7, 2026 08:02
oshaughnessy-junior
deployed
to
private-review-dispatch-rift
September 7, 2026 08:02 — with
GitHub Actions
Active
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.
Integration result (why this is parked)
Wired into #270 and measured. At fixed time and distance #270's exponent
x*A(phi,u) - 0.5*x^2*B(phi,u) - 4log xis a 2-D trig polynomial, sophi_start_candidates(x*C_A_t - 0.5*x^2*C_B)applies directly; both use the samew = 1 for k=0, 2 for k>0convention, so no adapter is needed. Tested on tables frommake_synth->angle_coefficient_tables, m_max=2 and m_max=4 HM, not random Gaussians.The candidates cover the true phi-maxima 18-27x better and it changes nothing: same
retained mode count, same
okflag,lnIidentical to float noise in all six rows.Newton refinement does the work -- a start 0.69 rad from a peak lands in the same basin
as one 0.025 rad away. #270's coarse lattice is sufficient, and the algebraic set costs
~1000x more at m_max=4 for a bit-identical answer.
Two things the test also settled:
certified=Falseon every physics table at both KP=5 and KP=9. The mode-order declinereproduces on real coefficient tables, not only on seeded Gaussians. That closes the
open caveat below.
/tmp/hm51_Ctables_incl0.6.npzand/tmp/rift-paper-av-ladder/..., which arenode-local. Raised separately.
Limitation, stated so nobody over-reads the result:
select_refined_modesretained 1 modeat m_max=4 and 4 at m_max=2 against 10-32 true phi-maxima. If that filter is the binding
constraint, the test is partly blind to start quality. "Start quality is irrelevant" is
supported for #270 as configured, not in general.
Two harness errors were made and corrected before the table above. The first window,
copied from #270's HM packet, put every start on a distance boundary because
make_synthat default
kappa_boosthasA^2 - 16B < 0everywhere -- no interior distance peak.Both seedings then retained zero modes. Fixed by setting
kappa_boostto 20/100/400 andderiving the window from the actual root distribution.
Why
#267 built an exact outside bound on the algebraically enumerated stationary set. That bound is unsound at production mode order:
enumerate_torus_maximadeclines from KP=5 up with"fewer than two algebraically complete projections", and an incomplete candidate set makes a supremum bound an under-estimate — the one direction the certificate existed to prevent. #267 is closed.The set itself is the best thing available for proposing optimizer starts, and a proposal carries no completeness requirement: a missed start costs accuracy that a downstream consistency check can still catch, not soundness. On its decline path the enumerator already returns the union of its definitely-on-torus roots, so the set is non-empty precisely where it cannot certify.
What this adds
phi_start_candidates(C) -> PhiStartSet | None, and nothing else.bound_nodesparameter, nobound_exact_phi, nophi_local_lnI_planned. Those were the certification path and they are not rescued.certifiedis carried for the caller's ledger and gates nothing in this module.h(φ) = max_u gis a 2-D stationary point ofg, and where the maximizinguswitches brancheshhas an upward kink — a minimum, which cannot carry a supremum.Measured
seed 7,KS=2;sup_hover the candidates versus over a 32768-point uniform φ grid, at amplitudes 1108 and 283672. Negative means the candidates win.The candidates beat the dense grid at every mode order, certified or not, because they sit on the peak while a uniform grid straddles it; the gap widens with amplitude because the peak sharpens, which is the regime this line of work targets.
Cost does not track amplitude. Both the candidate count and the enumerator wall time are flat across the 256× range and track mode order instead. Contrast the Lipschitz bound grid this descends from, which needed
pi * M10 / tolpoints and grew asrho^2. The KP=9 cost of ~9 s is real and is the thing to watch.Intended consumer
#270 proposes its four-dimensional starts from a U,V/Q-ranked angular lattice. This is an alternative or supplementary proposal source with a cost that is independent of SNR. Nothing here imports or depends on #270, and #270 does not import this — the wiring, if wanted, is a follow-up and someone should measure whether the algebraic candidates actually improve #270's tier agreement before it lands.
Validation
40 passed in 401sin the focused CPU JAX file (test_joint_anglemarg_peaklocal.py), including the three new tests.EXPECTED_TESTS461 → 464 in.travis/test-jax.sh, re-measured by collection.What is not claimed
angle_coefficient_tablesoutput. The mode-order-dependent decline is reproducible but has not been confirmed on real coefficient tables.🤖 Generated with Claude Code