Repository navigation
ε-machines of asymptotically synchronizing processes - #57
Merged
Merged
Conversation
…states from a limit belief Mixed-state presentations of processes whose hidden state no finite word reveals either closed on hundreds of near-boundary beliefs (rounding reflects the posterior's random walk) or exceeded max_states. Seed from a limit belief instead and accept the result only if it generates the source process exactly. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EpsilonMachine.from_hmm(and soinfer_reverse_epsilon_machineand the bidirectional preflight) failed on processes whose hidden state no finite word reveals, such as a period-2 process whose phase stays uncertain. Their beliefs converge to the causal states without reaching them, and:max_statesand raisedMixedStateExplosionError, so the process was classified as having an infinite reverse machine.Now
build_epsilon_machineseeds a second mixed-state presentation from a limit belief (the heaviest recurrent belief when the recurrent beliefs have entries below1e-8, or the belief after Bayes-filtering a 4096-symbol sample when the first presentation explodes), with sub-1e-8entries set to zero. It minimizes the result and accepts it only if it generates the source process (_equivalence_errorat most1e-9). A finite unifilar presentation of the process minimizes to its ε-machine, so an accepted result is correct; otherwise the old behaviour is unchanged.Evidence
A,B0,B1, flip probabilitye): 3 reverse states withC_mu = 1.5ate = 0.4(was 255 states),0.1and0.45(were explosions); equivalence errors around1e-16.6e-13. Finite/infinite now agrees withreverse_epsilon_machine_is_finiteon all 138 minimal topologies. One topology the criterion calls infinite returns 827 states instead of 893; both are finite approximations, and the existing truncation warning still fires.Test plan
tests/test_asymptotic_synchronization.py: both failure modes (e = 0.4closure,e = 0.1explosion)ruff check,ruff format --check,ty checkMade with Cursor