Skip to content

Run the generator heaviest-term bound last and by default; time-limit its LPs - #68

Merged
Autoplectic merged 1 commit into
mainfrom
heaviest-term-final-stage
Nov 17, 2026
Merged

Autoplectic merged 1 commit into
mainfrom
heaviest-term-final-stage

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

  • generative_model now runs generator_heaviest_term_bound last, after the best generator is word-verified, aiming at its entropy with the whole remaining budget. generator_heaviest_term=True is the new default (it was opt-in and ran mid-pipeline against the upper bound known at that point).
    • With a time budget it runs on joints with up to 14 causal states (_GENERATOR_HEAVIEST_TERM_MAX_DIMS). Without a budget it keeps the old 7-state limit and stops at 2,000 boxes (_GENERATOR_HEAVIEST_TERM_NODES), so unbudgeted test-suite runs stay at their previous durations.
  • generator_heaviest_term_bound passes the time left before deadline to each generator-cap LP (_HeaviestStatesRelaxation.bound(..., time_limit)). A cut-off LP returns the trivial cap, so the bound stays valid.

Why

Sweep over the 106 open C_g brackets of the cpfci dataset (binary 2- and 3-state ε-machines, joints 2×2 to 3×11), 900 s per process:

  • Lower bound raised on 48 of 105 processes; 9 closed (n2-t006-d0/d3/d4, n2-t012-d1, n3-t010-d0, n3-t035-d1, n3-t070-d2, n3-t077-d1, n3-t092-d0).
  • Median bracket width went from 0.066 to 0.039 bits; brackets wider than 0.01 went from 90 to 82.
  • Some of the closed cases (e.g. n2-t012-d1, n2-t006-d3) have a generator whose heaviest state outweighs the minimal generator's, so no caps on the heaviest weights can certify them; bounding the entropy of the whole decomposition does.
  • One process (n3-t045-d3) overran its 900 s deadline by more than 30 min inside a single HiGHS solve (stack trace: generator_caps.py bound → linprog). With the time-limited LPs it returns at 900 s.

Tests

  • test_generator_heaviest_term_bound_stops_at_its_deadline: 2 s deadline returns within 10 s.
  • test_generator_heaviest_term_bound_closes_a_two_state_bracket (slow): on n2-t006-d0 the bound reaches C_g = 0.8551484 to within 5e-5 (about 45 s).
  • test_generator_heaviest_term_stage_runs_last_on_open_small_brackets: the stage is the last before the reliability summary, and absent with generator_heaviest_term=False.
  • Full default suite locally: 2861 passed, 9 skipped. The three slowest pipeline tests take the same time as on main (212/157/120 s vs 238/146/119 s).

Docs (docs/generators/generative_models.rst) and CHANGELOG updated.

Made with Cursor

… its LPs

The generator heaviest-term bound now runs after the best generator is verified, aiming at its
entropy with the remaining budget, and is on by default (joints up to 14 causal states with a
budget; 7 states and 2,000 boxes without one). On the 106 open C_g brackets of the binary
2-/3-state dataset, 900 s per process raised the lower bound on 48 and closed 9.

Each generator-cap LP inside the bound now gets the time left before the deadline: a single
degenerate HiGHS solve previously overran a 900 s deadline by more than half an hour.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Autoplectic
Autoplectic merged commit 31e6257 into main Nov 17, 2026
10 checks passed
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