Repository navigation
Restrict Wyner/exact/functional generative models to generator states - #29
Merged
Merged
Conversation
added 2 commits
October 21, 2026 21:43
A channel p(g | s+, s-) that renders S+ and S- conditionally independent need not be the state of a generator: the HMM built by applying it at both ends of every bidirectional edge generates the process only if I[G_0 X_0 : S-_1 | G_1] = 0 and I[S+_0 : X_0 G_1 | G_0] = 0. - minimal_generative_model and wyner_generative_model now optimize subject to both conditions (new module sofic.generators.lifted_common_information: SLSQP with analytic constraint Jacobians, continuation from the unconstrained problem, support-restricted refinement), so the reported value is the returned model's own and the exact value upper-bounds C_g. The silent functional fallback is removed; models carry markov_residual. - functional_generative_model searches deterministic partitions under the same conditions (exhaustive up to nine joint states, greedy merging beyond), so it always reproduces the process; dit's partition is kept when it already lifts. - BidirectionalEpsilonMachine.wyner_common_information() and exact_common_information() expose the unconstrained C[S+:S-] and G[S+:S-]. - Fix: the dit optimum was read with the reverse-state axis permuted whenever the support listed a higher-indexed reverse state first (dit numbers symbols by first appearance), giving channels that did not separate S+ and S-. The process in which every 1 is followed by at least two 0s is the simplest case where the conditions bind: its unconstrained exact optimum (1.406) is not the state of any HMM; the constrained value is 1.5.
Refine candidates an extra decade below the acceptance tolerance so rounding cannot tip a good channel over markov_atol (seen on macOS/Python 3.11 CI). Test the Odd-process property (its Wyner optimum is an interior channel that already lifts) directly instead of through the stochastic optimizer, and keep an end-to-end check that the constructed model generates the process.
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
A channel
p(g | s+, s-)that renders the forward and reverse causal states conditionally independent need not be the hidden state of a generator. The HMM sofic builds from it (the channel applied at both ends of every bidirectional edge) generates the process, withGjointly distributed with past and future as the channel prescribes, if and only ifI[G_0 X_0 : S-_1 | G_1] = 0(the next state screens what was emitted from the reverse causal state), andI[S+_0 : X_0 G_1 | G_0] = 0(its time reverse).Previously the exact/Wyner constructors ignored these, checked reproduction afterwards, and silently returned the functional model under the unconstrained value. The functional model itself was returned without any check and can fail too.
Changes
minimal_generative_model/wyner_generative_modeloptimize subject to both conditions (newsofic/generators/lifted_common_information.py): SLSQP with analytic constraint Jacobians, continuation from the unconstrained problem, starts atS+,S-,(S+, S-), the dit optimum and random channels, then refinement on the channel's support. The reported value is the model's own; the exact value upper-bounds the generative complexity. The fallback is removed and models carrymarkov_residual(largest constraint information, bits).functional_generative_modelsearches deterministic partitions under the same conditions (exhaustive up to nine joint states, greedy merging from(S+, S-)beyond), so it always reproduces the process. dit's partition is kept when it already satisfies them (it is then optimal).BidirectionalEpsilonMachine.wyner_common_information()/exact_common_information()return the unconstrainedC[S+:S-],G[S+:S-](= the common informations of past and future).generative_gap(measure="exact" | "wyner")(alsoBidirectionalEpsilonMachine.generative_gap()) returnsGenerativeGap(lower, upper, gap, model): the unconstrained common information vs. its value over generator states. For the exact measureG[S+:S-] <= C_g <= H[G], sogapboundsC_g - G[S+:S-]. On the (2,∞) process: exact 1.406 → 1.5 (gap 0.094), Wyner 1.129 → 1.311 (gap 0.18); zero for first-order Markov processes.S+fromS-(this is why the golden mean appeared to fail and fell back).Motivating example
Every 1 followed by at least two 0s (3-state ε-machine, one ½/½ branch, second-order Markov) is the simplest case where the conditions bind. Its unconstrained exact optimum is a deterministic
WwithH[W] = 1.406; one value ofW("past ends in 10, future starts with 01") can only be preceded by a value that does not know the past ended in 10, so no HMM hasWas its state. Constrained values: exact 1.5, Wyner 1.311 (vs 1.129 unconstrained). For first-order Markov processes the constrained and unconstrained values coincide.Breaking changes
Default behavior of the three constructors and
generative_complexity()changes (see CHANGELOG). There is no unconstrained-model mode; use the new measures for the unconstrained values.Tests
tests/test_lifted_common_information.py: golden mean and binary Markov chains vs closed-formC_g, Odd process (interior Wyner generator), the (2,∞) process, functional model always reproducing (exhaustive and greedy paths), set-partition enumeration vs Bell numbers, Jacobian vs finite differences, Hypothesis bounds on Markov chains.