Skip to content

Exact generators at cryptic order at most 1, the K(P) support bound, lookahead generators - #74

Merged
Autoplectic merged 2 commits into
mainfrom
cryptic-order-ladder
Nov 24, 2026
Merged

Autoplectic merged 2 commits into
mainfrom
cryptic-order-ladder

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

  • sofic.generators.separating_generators (new):
    • support_bound_states: the support bound K(P) = ⌊(|supp P| + min(|S+|, |S−|)) / 2⌋ on the number of terms of a least-entropy separating decomposition of the causal-state joint.
    • reduce_decomposition: the merge and null moves that bring any decomposition down to K(P) terms without raising its entropy.
    • separating_decomposition: per connected component of the support, either trivial, exact on rectangle-free (one-wide) components, or SCIP. Each SCIP run gets a second opinion with presolve and OBBT off, and its result is polished into an exact decomposition.
    • theorem_generator: the explicit minimal generator when p.χ± = 0, i.e. cryptic order at most 1 (Mahoney et al. 2009, Thm 1 at k = 1).
    • lookahead_generator: generators of the sliding-block process, which reach C_g of that process for L ≥ κ.
    • The block persistent crypticities H[S+L | X{0:}] and H[S−_0 | X_{:L}], which vanish exactly from L = κ.
  • global_bound: separating_global_bound, a static SCIP model of the least-entropy separating decomposition. generator_global_bound gains presolve, obbt and params switches.
  • generative_model:
    • Logs the cryptic orders and the block persistent crypticities.
    • At cryptic order ≤ 1 the exact path writes down a minimal generator. Its SCIP dual enters lower as a numerical bound, with lower_certified False; without PySCIPOpt it falls back to multistart.
    • Offers lookahead generators as candidates at cryptic order 2 and 3.
    • The restricted global bound now defaults to K(P) states, lowered to fit the variable cap, and enters lower at cryptic order ≤ 1.
  • Docs and benchmarks: a docs page (docs/generators/separating_generators.rst) and the Mahoney2009 bib entry. New benchmark cases are RIP, the stretched golden mean with 2 and 3, and a κ = 1 case whose component needs SCIP; rll now certifies.

Results on the paper dataset

  • Cryptic order ≤ 1 (510 processes): every certified value is reproduced to 1e-6. Decomposition residuals are below 3e-11 and word errors below 2e-11. Components: 970 trivial, 115 rectangle-free, and 55 SCIP, whose numerical lower bounds are within 1e-5.
  • Lookahead generators: a minimal generator lies in the lookahead class for 32 of 49 closed κ = 2 brackets. In the pipeline at 60 s, lookahead improved 4 of 81 brackets and tied 45.

Test plan

  • pytest tests/test_separating_generators.py (18 tests, pytest and hypothesis)
  • Full suite: 2892 passed, 9 skipped
  • sphinx-build -W --keep-going -b html docs ... is clean
  • ruff check and ruff format

Known issues, not addressed here

  • Non-minimal reverse ε-machine. For small transition probabilities the reverse ε-machine can come out non-minimal. With the RGM(2) topology and self-loop probability 0.0010739 it has 4 states, two of them predictively equivalent to 3e-10, so cryptic_order() returns ∞ on the reverse side. The hypothesis strategy in the new tests filters probabilities below 0.02 for this reason.
  • Time budget overrun. generative_model(butterfly, time_budget=60) takes about 1900 s, on main as well. Some lower-bound stages appear not to respect the budget.

Ryan James added 2 commits November 24, 2026 02:38
…lookahead generators

- separating_generators (new): support_bound_states (K(P) = floor((|supp P| + min(|S+|, |S-|)) / 2)),
  reduce_decomposition (merge and null moves), separating_decomposition (per component: trivial,
  one-wide exact, or SCIP with a presolve/OBBT-off second opinion, polished into an exact decomposition),
  theorem_generator (the explicit kernel when p.chi = 0, i.e. cryptic order at most 1),
  lookahead_generator (generators of the sliding-block process, exact for L >= kappa) and the block
  persistent crypticities H[S+_L | X_{0:}], H[S-_0 | X_{:L}].
- global_bound: separating_global_bound (static SCIP model of the least-entropy separating
  decomposition); presolve, obbt and params switches on generator_global_bound.
- generative_model: logs the cryptic orders and the block persistent crypticities; at cryptic order at
  most 1 the exact path writes down a minimal generator and its SCIP dual enters lower as a numerical
  bound; lookahead candidates at cryptic order 2 and 3; the restricted global bound defaults to K(P)
  states and enters lower at cryptic order at most 1.
- Docs page, Mahoney2009 bib entry, benchmark cases (rip, stretched golden mean 2 and 3, a SCIP
  kappa = 1 case); rll now certifies.
With presolving off, SCIP still computes the symmetry group when presolving
ends, now on the unreduced model. On the (3, inf) run-length-limited process
at k = 7 (two-step flows) that computation, in dejavu's preprocessor, ran for
over two hours without checking the time limit; with misc/usesymmetry = 0 the
same run stops after 151 s at a 60 s limit. presolve=False, the second
opinion, now also sets misc/usesymmetry to 0.
@Autoplectic
Autoplectic merged commit 37d0ade into main Nov 24, 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