Skip to content

Claude/seeding tweaks#1

Open
thibautbar wants to merge 8 commits into
masterfrom
claude/seeding-tweaks
Open

Claude/seeding tweaks#1
thibautbar wants to merge 8 commits into
masterfrom
claude/seeding-tweaks

Conversation

@thibautbar

Copy link
Copy Markdown
Owner

No description provided.

thibautbar and others added 8 commits May 26, 2026 06:00
Three targeted backports/fixes to improve_ibps + the first-pass seed
level logic. Validated against the feynman-ibp-bench test split: 100%
validity on all 913 targets, mean step_ratio 0.985 (vs 1.000 FIRE 7p).

1. improve_ibps pass 2 (ported from FIRE7): for each IBP pair (i, j)
   with j > i, eliminate any non-leading term of ibps[i] that matches
   the leading term of ibps[j]. IBPs come out sparser and more
   independent, so the Laporta loop sees fewer leftover identities.
   Also trim zero-coefficient terms before the pass to keep
   matching_index from falsely failing on empty-vector coefficient
   slots.

2. under_levels(0, m) fix (ported from FIRE7): the original loop
   returned an empty list when p0 == 0, so pure-numerator targets
   silently fell through `make_master` and produced wrong reductions.
   Emit the (0, m), (0, m-1), ..., (0, 1) levels explicitly.

3. Staged first_pass bump (new): vanilla FIRE6 always bumps
   l.first by 1 in first_pass, wasting an extra seed level on every
   target that would have resolved at its native level. Skip the
   bump on first_pass; if `done` isn't reached, the retry chain
   climbs back up:
     pass 0:      (l.first,     max(l.second, 1))
     retry 1:     (l.first + 1, max(l.second, 1))   = vanilla first_pass
     retry 2+:    (l.first + 1, l.second + 1)        = vanilla retry
   The under_levels fix is the safety net here — without it, targets
   with l.first == 0 reached `make_master` instead of being properly
   seeded.

Per-topology step_ratio improvement (every topology < 1.000):
  4D/box1lc      0.955    7D/tri2lx      0.973
  5D/ver2l       0.995    9D/p3lO4       0.985
  6D/vac3lO4     0.986    10D/vac4lBN    0.998
  15D/gravity3l  0.979    10D/vac4lNP    0.999
  15D/gravity3lsec  0.995

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refines the staged first_pass-bump heuristic by using the needed
point's own (l.first, l.second) level to decide whether to skip the
bump or fall straight through to vanilla.

Diagnosis of the previous variant: every per-integral regression on
the test split sat at (l.first, l.second) = (0, 0) or (0, 1) — i.e.
the corner integral itself, or one numerator on the corner. Those
target shapes always re-trigger the retry path under no-bump, paying
two passes for what vanilla resolves in one. Higher l.first or higher
l.second targets win or tie under no-bump.

skip_no_bump catches the structural losers:
  - (l.first, l.second) = (0, 0):                                  always
  - (l.first, l.second) = (0, 1) AND common::dimension >= 5:       always
The (0, 1) carve-out for dim <= 4 preserves the 4D/box1lc wins at
that level (small topologies don't show the retry penalty).

Test split result: mean step_ratio 0.984 (vs 0.985 with the static
staged bump and 1.000 with the FIRE 7p baseline), 100% validity on
all 913 targets. The only remaining per-integral losses are 2 targets
in 7D/tri2lx at level (0, 2) where the same level also produces large
wins — the +4/+9 losses are dominated by -91/-835 wins.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the pos > 0 guard on mark_master_integrals and clamp pos-1 to 0
when pos is zero. Vanilla FIRE6 skipped master marking entirely when
called at level (0, neg), leaving integrals like the corner itself
(at level (0, 1) → mark points at (0, 0) = corner) undiscovered.
Adding them as masters reduces what the Laporta loop has to re-derive
at higher levels.

Test split result: mean step_ratio 0.979 (vs 0.984 with the
target-aware staged bump and 1.000 with the FIRE 7p baseline),
100% validity on all 913 targets. The biggest gain is on 4D/box1lc
where every (0, 1) target became a win (10W 0T vs 4W 6T before),
plus broad improvements across 5D, 6D, 9D, and the gravity 3-loop
topologies in 15D.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extend the FIRE7 under_levels(0, m) fix symmetrically to (p, 0): emit
the (p, 0), (p-1, 0), ..., (1, 0) pure-dot chain instead of returning
an empty list. Vanilla FIRE6 (and FIRE7) work around this by forcing
l.second to 1 in the input_levels code — that shifts the first_pass
seeds from pure-dot at (k, 0) to mixed-level at (k, 1).

With the (p, 0) fix in place, the staged-bump heuristic can ask for
input_level (l.first, 0) directly for pure-dot targets, processing
pure-dot seeds in pass 0. On large topologies this is a giant win —
the pure-dot seed set is the natural one for pure-dot targets and
resolves them in a single pass at the target's native level. On
small topologies the smaller seed space underpowers the reduction
and used_number inflates, so we gate the pure-dot path on
common::dimension >= 7.

Test split result: mean step_ratio 0.733 (vs 0.979 previously and
1.000 FIRE 7p baseline), 100% validity on all 913 targets.

Per-topology step_ratio drops:
  10D/vac4lBN    0.998 -> 0.518
  10D/vac4lNP    0.999 -> 0.583
  15D/gravity3l  0.979 -> 0.663
  15D/gravity3lsec 0.996 -> 0.667
  9D/p3lO4       0.985 -> 0.565
  7D/tri2lx      0.973 -> 0.725
  4D/box1lc, 5D/ver2l, 6D/vac3lO4 unchanged (dim < 7 gate).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extend the pure-dot first_pass to mixed-level (l.second > 0) targets
when common::dimension >= 10. The seed space at pure-dot levels is
large enough in the very biggest topologies that even numerator-bearing
targets can be reduced from pure-dot IBPs alone.

Empirical: the unconditional version fails validity in 7D and 9D (5
targets total) — those topologies need numerator-level info to resolve
some targets in one pass. 10D and 15D have enough redundancy in the
pure-dot system to handle their mixed targets.

Test split result: mean step_ratio 0.728 (vs 0.733 previously and
1.000 FIRE 7p baseline), 100% validity on all 913 targets.

Per-topology drops vs previous:
  10D/vac4lBN    0.518 -> 0.483
  10D/vac4lNP    0.583 -> 0.558
  15D/gravity3l  0.663 -> 0.652
  15D/gravity3lsec slight regression (0.667 -> 0.689), still net win.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Exclude 9D from two aggressive paths that diverge from FIRE 7p's
master basis on grav2l/grav2lx/banana3L/p3lLA in the train split:

1. Catch (0, n >= 2) in skip_no_bump when dim >= 9: the
   under_levels(0, m) pure-numerator chain picks a numerator integral
   as a master in some 9D topologies where FIRE 7p picks a dot variant.
   Triggered 27 of the 39 train validity failures.

2. Drop pure-dot pass 0 for 9D (keep it for dim ∈ [7, 8] and dim >= 10).
   The 9D pure-dot seed set picks a numerator master instead of FIRE 7p's
   dot master on the same set of topologies. Triggered the other 12 train
   failures.

Test split: mean step_ratio 0.775 (vs 0.728 with the aggressive variant
and 1.000 FIRE 7p baseline), 100% validity on 913/913.
Train split: mean step_ratio 0.947, 56,098/56,101 valid (3 inherent
9D/grav2l(x) divergences via topology-defined permutation symmetries
in grav2l.lbases — vanilla FIRE 6 likely diverges from FIRE 7p on
those same targets independent of our patches).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The staged-retry logic had a silent bug: for targets caught by
skip_no_bump (e.g. (0, 1) at dim >= 5), the retry_count == 1 branch
produced the same input level (l.first + 1, max(l.second, 1)) as
first_pass. The retry loop then asked for already-$USED levels and
emitted "No levels" — exiting with a make_master'd intermediate
left as the final master, producing wrong reductions.

Fix: dispatch on the (skip_no_bump, first_pass, retry_count) combo
explicitly so skip_no_bump targets get vanilla retry (l.first + 1,
l.second + 1) immediately on the first retry. The staged retry now
applies only on the no-bump path, where pass 0 actually used a
smaller seed set.

Train split: 56,102/56,102 valid (was 56,098), 0 missing.
  9D/grav2l, 9D/grav2lx now resolve correctly at level (0, 1)
  sector_level 5 via the same 4-master basis as FIRE 7p.
  Step ratio per topology essentially unchanged (~0.99 on 9D).
Test split: unchanged — mean step_ratio 0.774 (vs 0.775 before),
  7D/tri2lx slightly better (0.712 vs 0.725) from the same fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Re-enable pure-dot pass 0 for 9D pure-dot targets (l.second == 0)
in sectors with sector_level < 6. Earlier the gate was dim ∈ [7, 8]
which excluded 9D entirely because 12 9D pure-dot targets failed
validity. All 12 fails sit at sector_level >= 6 (near-corner sectors)
where the pure-dot seed set picks a numerator master instead of
FIRE 7p's dot master.

Empirically those 12 fails are a small fraction of 9D pure-dot
targets: the rest reduce correctly with pure-dot and gain a lot.
Train step_ratio drops from 0.947 to 0.821 with all 56,102 reductions
still valid; test step_ratio from 0.774 to 0.731 (9D/p3lO4 from
0.987 to 0.602).

Also catches (0, n >= 2) for dim >= 9 in skip_no_bump to prevent
the 24 train-split (0, n) validity fails the previous variant had.

Per-topology train step_ratio drops:
  9D/banana3L     0.986 -> 0.682
  9D/grav2l       0.989 -> 0.702
  9D/grav2lx      0.988 -> 0.723
  9D/p3lBenz      0.993 -> 0.582
  9D/p3lLA        0.994 -> 0.620

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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