Skip to content

Simplex-chain search for exact one-sided generators - #77

Open
Autoplectic wants to merge 1 commit into
mainfrom
simplex-chain-search
Open

Autoplectic wants to merge 1 commit into
mainfrom
simplex-chain-search

Conversation

@Autoplectic

@Autoplectic Autoplectic commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Adds sofic.generators.simplex_chains, which constructs exact one-sided generators. It also runs the search as a stage of generative_model, right after the exact path.

Method

A generator is reverse-sufficient when each state's future is the mixture of the reverse causal states' futures, weighted by the state's belief on S-. Such a generator is a finite law on the simplex of those beliefs that dominates its image under the belief updates in convex order (Strassen 1965). If each updated belief of a finite pool of atoms is written as a convex combination of the pool, the result is a chain on the pool, and the stationary law of every closed class is an exact generator. The state entropy is concave on the polytope of these representations, so its minimum over a pool is at a vertex.

simplex_chain_search alternates two steps on each side, starting from that side's ε-machine:

  • linear programs over the representations;
  • gradient steps on the atoms, through the chain's fundamental matrix, projected onto the walls.

Every iterate passes a word check over a Tzeng basis. At cryptic orders up to 4, the atoms stay on the faces of the synchronizing complex. Forward-sufficient generators are the mirror image. The construction and the search are not from the literature; the docstring and the docs say so.

Pipeline

  • New stage "chains", controlled by simplex_chains=True. It is skipped in Wyner mode.
  • With a budget, the stage gets a quarter of the remaining budget. Without one, it gets 2 s per side.
  • The search stops once a generator is within the certification tolerance of the current lower bound. Its generators are offered through coupled_seed_from_hmm.

Validation

  • Port against prototype. With the same seed and a fixed number of restarts, the port gives the same entropies, to the last bit, as the research prototype's on n3-t045-d3, n3-t138-d4 and n3-t122-d2, on both sides, and on the forward side of n3-t045-d1.
  • Earlier results. On 306 archive processes the prototype went below the best known upper bound on 42, by more than 1e-6 on 22 and by up to 0.295 bits.
  • The stage alone on those 42 (stages=("machines", "chains"), a 240 s budget, so 30 s per side): 34 match the prototype or beat it, 40 go below the best known upper bound, and 4 are certified. At 480 s (60 s per side), five of the eight shortfalls reach or beat the prototype and two more come within 3.4e-6. n3-t045-d1 stays at its ε-machine. So does the current prototype with its archived seed; its better value came from an older restart sequence.
  • Full generative_model at 300 s on the 22 processes with gains above 1e-6: the chain stage gives the final upper bound on 19 of the 20 runs that finished. 13 of them are within 1e-6 of the prototype and 17 are below the best known upper bound. The stage got a median of 34 s (2 to 50 s), because it runs after the bounds and seeds. It fell short where those took most of the budget (n3-t119-d3 got 1.6 s).
  • Two problems outside this PR showed up in those runs:
    • On n3-t131-d0, generative_model raises KeyError in the dit exact-common-information fallback, on main too. The joint passed to dit drops a causal-state pair of mass 4e-11 (below its 1e-10 cutoff), while _unconstrained_channel reads a row for every pair.
    • 11 of the 20 runs went more than 10% over 300 s, up to 1,142 s, and n3-t088-d4 was killed at 1,200 s. The universal coupled search, which this PR does not touch, keeps trying larger state counts past its deadline until it has verified a generator; on n3-t088-d3 it ran for 940 s.
  • Tests. tests/test_simplex_chains.py covers:
    • the vertex chain is the ε-machine;
    • the chain lemma on random pools (hypothesis);
    • every closed class of the full vertex chain generates;
    • the chamber gradient matches finite differences;
    • the synchronizing complex holds the companion beliefs and is invariant;
    • the search reaches the best known value on n3-t045-d3;
    • the early stop at a target;
    • the ε-machine start on a process with an infinite reverse ε-machine;
    • the pipeline stage.
  • Timing. The 12 pipeline test files take 342 s on this branch against 327 s on main (4 workers). The difference is about the nine new tests; no existing test slowed by more than 4 s.
  • Checks. Ruff, ty (no new diagnostics) and sphinx-build -W pass.

This branch has not been deployed

No deployments
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