Skip to content

Bracket exploding builds from the forward machine - #86

Merged
Autoplectic merged 1 commit into
mainfrom
exploding-build-fallback
Nov 29, 2026
Merged

Autoplectic merged 1 commit into
mainfrom
exploding-build-fallback

Conversation

@Autoplectic

@Autoplectic Autoplectic commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • generative_model no longer raises when the bidirectional build explodes (bidir_class "explosion": the reverse mixed-state presentation does not close, after the retry ladder). It brackets C_g from the forward ε-machine alone:
    • lower: the future-window generator coverage bound at L = 2 and 3 (Löhr & Ay 2009), computed first with at most 30% of the budget, as on truncated builds;
    • upper: the least state entropy among the forward ε-machine and the belief-free HMM search's generators (|S+| to |S+| + 2 states, the rest of the budget split evenly between them), each word-verified against the forward machine with the pipeline's stationarity check;
    • model is a CoupledGenerativeModel, decomposition is None, and the structure entries that need S- (functional, lifting_residual, lifted) are None;
    • the stages that need the reverse ε-machine are logged as skipped ("needs the reverse ε-machine").
  • resolve_bidirectional raises a private subclass of MixedStateExplosionError on an explosion (same message, still a StochasticValidationError), and only generative_model catches it. Other failed builds, minimal_wyner_model and minimal_functional_generator raise as before.

Notes

  • The six binary 3-state processes that motivated this explode only at the 1,000-state cap of the driver that found them. At sofic's default (10,000 reverse states and the ladder) all six build as truncations with 1,261 to 4,833 reverse states, so they take the truncated path, not this fallback. Those builds took 76 to 679 s on a loaded machine and cannot be interrupted, so on two of the six the build alone exceeds a 300 s budget. A deadline in the reverse construction, classing a build that misses it as an explosion, would send them here instead; that is not in this PR.
  • On one of them (n3-t059-d3) with reverse_max_states=1000 and no ladder, a 60 s run returns [0.8827307, 1.0795992] in 60.1 s. Without a deadline the window bound there is 0.8828032, and 1.0795992 is the forward ε-machine's entropy, the best generator known.

Test plan

  • Fast tests with the build monkeypatched to explode: how the forward-only result is assembled; a 4 s run keeps to its budget; minimal_wyner_model, minimal_functional_generator and a "failed_build" still raise.
  • Slow test: n3-t059-d3 explodes at 1,000 reverse states; a 60 s run ends within 66 s, its lower bound is the window bound, and lower < upper ≤ C_mu+.
  • test_generative_model.py, test_bidirectional_build.py, test_generative_model_invariants.py and test_generative_objectives.py pass.
  • ruff, ty check (no new diagnostics), sphinx-build -W.

When the bidirectional build explodes (the reverse mixed-state presentation does
not close, after the retry ladder), generative_model now brackets C_g from the
forward machine alone instead of raising: the future-window generator coverage
bound (at most 30% of the budget) below, and the least state entropy among the
forward epsilon-machine and the belief-free HMM search's generators, verified
against the forward machine's words, above. The stages that need the reverse
epsilon-machine are logged as skipped, and decomposition is None. Other failed
builds still raise, as do minimal_wyner_model and minimal_functional_generator.
@Autoplectic
Autoplectic merged commit b175d38 into main Nov 29, 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