Paper 3 · Appendix ALearning
Inside the implemented learners
The full preparation rules, automaton compatibility tests, group heuristics, hidden-state updates and tree-mixture selector make the executed procedures inspectable.
A Implementation details and the exact role of each learner
This appendix specifies the implemented OII-4 methods, rather than transferring guarantees from a similarly named published algorithm. The evidence package retains the full original code, settings, committed model bundles and fitting logs. The principal routines are state_learning.py and study_learner.py; a fresh implementation should reproduce those choices before interpreting a discrepancy as replication failure.
A.1 Public evidence and calibration selection
Each fitting episode begins at one of four public preparations and contains eight action/output pairs. The 960 fitting episodes cycle through the preparations; their four-valued actions are sampled uniformly. The 24 calibration policy specifications comprise four constant policies, eight fixed action words, eight reactive policies and four history-dependent policies, with eight independent reset episodes per specification. In the saved policy grammar the latter are named history_xor, but their implemented action at zero-based tick is , a modular sum of output symbols rather than bitwise XOR. This names the existing implementation accurately without changing any policy or observation. These 192 episodes are separate from the fitting episodes, but their policy descriptions need not be absent from the later oracle panel.
For a candidate , selection uses the average conditional next-output negative log likelihood
The action is conditioned on; the candidate is not rewarded for predicting the externally chosen policy. Equal validation values are broken by original candidate index. R selects from indices 0–9; E from 0–3; G from 4–5; B from 6–9; S from 0–3 and 6–9; P from 10–12; H uses index 14. O separately mixes indices 10–13. Candidate fitting uses only the training tape. The public calibration tape selects the exported candidate or mixture; hidden-law scoring follows commitment.
A.2 The local IOALERGIA adaptation
The input/output frequency prefix tree begins with a synthetic reset symbol and acknowledgement zero for preparation index . The root remains a distinct reset-only operating type. It is not merged with live nodes. Subsequent edges carry the full pair , with encoding both output bits jointly.
The red/blue procedure considers the shortest blue prefix, with lexicographic tie breaking, and compares it with red nodes in the same order. Original prefix counts remain available for recursive compatibility tests after folding. For two nodes with positive counts for an action, each output frequency difference is compared with
Compatibility is also required on common original child edges. Missing or unobserved actions do not establish a distinguishing law. Accepted nodes are folded, their observed counts combined and compatible successor structure identified. The four E variants use . These settings are tuning parameters of the published-style compatibility test, not a simultaneous confidence level for all adaptively selected merges.
The exported automaton has deterministic successor labels conditional on and stochastic output rows. A count vector is smoothed as
An unobserved successor goes to an explicit sink with uniform output rows and self-loops. The H control exports the unmerged tree with the same smoothing and completion rule. Its poor scored performance is evidence about sparse-prefix prediction with this fallback, not a theorem that storing complete history is intrinsically inferior.
This is a local stochastic-Mealy-machine adaptation of the IOALERGIA family, informed by its published formulation and AALpy source [12, 13, 7]. The audit compared the recursive common-child test, Hoeffding expression, red/blue ordering and folding with the available upstream source. Reset-only typing, count smoothing and the uniform unknown sink remain local choices. The upstream branch cited is mutable; the local executed source is frozen by hash, but the record does not identify an immutable historical upstream commit. No end-to-end equivalence with the upstream package or transfer of its asymptotic guarantees is asserted.
A.3 The group-aware variants
G augments the pair test with a proposed merged-group test. For each live action, original member prefixes with at least 12 samples supply empirical four-outcome laws and tuning allowances . The procedure bounds or solves
where is the four-outcome probability simplex. A pair lower bound can reject early; for two members the corresponding radius is explicit. For larger groups, all nonempty proper output subsets give the finite linear-program representation of TV. A candidate merge is rejected if the value exceeds the selected threshold, or , up to the implemented numerical comparison tolerance. Common folded successors are also checked. The code labels rejections as heuristic, not confidence-certified.
Sparse prefixes can therefore escape the group test. In addition, a changed merge order can change later proposals, so G need not be a simple finer partition of the E model. These are implementation facts relevant to the poor group-only result and mixed fixed-compatibility comparison. The allowances in Equation 15 are not licensed as familywise confidence bounds.
There is nonetheless a valid reason not to equate pairwise nondetection with group adequacy. For laws
all pairwise TV distances are , while
The symmetric center with mass at zero and at each private atom attains this value. To prove the lower bound, average any center over permutations of the private atoms, which cannot increase the convex maximum risk. If its total private mass is , the overlap with a target is at most , maximized at , giving the claimed radius. Mass outside the displayed atoms cannot increase overlap. Thus , gives radius even though every pair distance is below . The exact counterexample does not certify the sampled merge heuristic.
A.4 Controlled hidden-state fitting and stopping
For each the method fits four preparation distributions and the general joint instrument . It does not impose the factorization . This distinction is necessary for the capacity construction in Section 5.
One initialization is used per size. Its seed is the first four bytes of the SHA-256 digest of the fixture identifier concatenated with :HMM: and the size. Each action/current-state joint row is initialized by a Dirichlet distribution with concentration per coordinate; each prepared law uses concentration one per coordinate. Standard scaled forward/backward calculations condition on the observed action sequence. If is the normalized forward row and , the expected transition count is proportional to
where is the correspondingly scaled backward quantity. The M step normalizes accumulated joint transition counts over for each and prepared-state counts over . Both count tables include a fixed pseudocount per coordinate. Scale denominators are floored at .
The iteration limit is 60. With zero-based iteration index , the implementation stops early when and
where is the fitting negative log likelihood calculated in that iteration's forward pass. The returned parameters include the subsequent update in the same iteration. This records the actual code convention; no monotonicity or global optimum theorem is asserted for the pseudocount fit and stopping rule.
| Latent dimension | Fits | Minimum | Maximum | Early stops | At cap |
|---|---|---|---|---|---|
| 2 | 48 | 12 | 60 | 30 | 18 |
| 4 | 48 | 12 | 60 | 16 | 32 |
| 8 | 48 | 12 | 60 | 4 | 44 |
| 16 | 48 | 60 | 60 | 0 | 48 |
This is a source-supported reporting correction made during manuscript assembly. The original fitted models, stopping rule and prediction scores are unchanged.
The preserved metadata and trace lengths give 192 fits, of which 142 reach 60 iterations and 50 stop earlier; the realized range is 12–60. Earlier prose that called these universally “60 iterations” is corrected to “at most 60.” This is the only frozen methods-description amendment made in manuscript assembly. No fit, score, seed, threshold or primary comparison was changed.
A.5 Tree and mixture controls
The tree implementation retains the OII-2 dictionary of 100 public streaming features and explicit registers sufficient to update every selected feature. Conditional joint-output trees use maximum depth ten and settings for split penalty and leaf cap. P selects the lowest-calibration-NLL candidate among the first three; O uses all four. The vocabulary includes finite lags, counts, parity and preparation/time features. The preserved fitter, rather than an informal feature list, defines the control exactly.
For calibration context , let be its eight-episode empirical distribution on complete records. O chooses simplex weights to minimize
An overlap variable for each observed record linearizes the right-hand side. Unobserved mass is not assumed zero for the candidate; its mass outside the empirical support is accounted for by the overlap identity. The fitted mixture chooses a component once per episode, with predictive posterior weights updated from its record. It does not independently resample a component at each tick.
The numerical LP is accepted only after its reported primal/dual gap is within . The final fixture required rerunning the same feasible LP without the solver's presolve, before hidden scoring. The candidate bank, data and tolerance were unchanged. Numerical solver certificates for this selector are not exact rational certificates for every fitted law.