Authored design — 2026-09-15. Section 3. This cascade elaborates the existing checklist item. It is not a dispatch, implementation receipt or completion verdict. Work outside WM-01–14 still requires Joe’s explicit greenlight; having a cascade is necessary but not permission.
Section 3/4 index · Exact TODO · Cascade JSON
Accumulating counts is not yet changing model structure. R17 must connect independent observations to an admitted reduction and then to a decision over the real capability substrate.
R17 structure learning. PARTIAL: actual observation-to-count-to-model-change-to-next-decision chain over real capability substrate; nonvacuous BMR evidence. Built evidence: Accumulation recurrence, anti-recount and model-reduction components
This is the checklist’s dated evidence account, not a new deployment census. Existing source/test evidence keeps its bounded credit. The acceptance obligation above governs this design.
Pattern: wm-prediction/observation-can-disagree
Join eligible observations to capability/model identities and immutable cutoffs. Produce a deduplicated evidence population; registry labels and repeated reports cannot create additional support.
Pattern: aif/structure-learning-by-model-reduction
Retain prior, sufficient statistics and observation-to-count provenance. Preserve support and parameter meaning. Produce the accumulated model without asserting that sharper counts are already a structural change.
Pattern: wm-connected-learning/proposal-earns-later-use
Describe what merge/prune/reorganization solves and the competing full model. Apply the authorized BMR law and admission threshold; the seed’s historical numerical threshold is not automatically adopted.
Pattern: wm-connected-learning/proposal-earns-later-use
Retain independent verdict, model revision and migration of relevant consumers. Show a later decision using the accepted structure and independently observed outcome. Rejected proposals remain proposals.
Each node’s stated artifact is the input or constraint for the related node below. These are design dependencies, not a claim that a runtime scheduler automatically fires patterns. Existing WM producers are reused through the linked contracts; no second implementation is implied.
| From | To | Relation | Reason |
|---|---|---|---|
| R17-1 | R17-2 | requires-result | Only eligible distinct observations may change sufficient statistics. |
| R17-2 | R17-3 | requires-result | Accumulated evidence conditions the comparison of full and reduced models. |
| R17-3 | R17-4 | requires-result | An admitted structural alternative must reach subsequent choice to establish learning. |
| R17-4 | R17-1 | revision-feedback | A failed distinguishing control or consumer mismatch reopens the original scope/meaning; retain the failed claim rather than weakening it. Relevant controls: Reject recounting, nonpositive reduced parameters, stale registrations and a later consumer using the parent after claiming reduction. Include a genuinely distinguished full/reduced comparison. |
Retain the actual subject, source/model revision, task/occurrence, cutoff, producer and consumer for each interface. A missing field is a named gap; a default that changes the meaning is not an adapter. Reuse existing records where they satisfy these obligations. If a new component is indispensable, identify its exact TODO/cascade clause before seeking a separately bounded implementation instruction.
Two capability states look alike after repeated copies of one observation. A naive merge gains apparent support from duplication. Deduplication must expose that the evidence did not become stronger.
This is a distinguishing design example, not a claimed production experiment.
Distinguishing controls: Reject recounting, nonpositive reduced parameters, stale registrations and a later consumer using the parent after claiming reduction. Include a genuinely distinguished full/reduced comparison.
Closure rule: every part of the quoted obligation must be supported by the indicated artifacts and actual connections. A useful rejection proves the rejecting boundary only. One accepted subclause does not tick the whole item. A bellback must supply the exact reviewed subject, executed checks, independent verdict and remaining clauses.
BMR acceptance authority and current model family must be pinned; no new threshold, sleep scheduler or automatic library promotion is authorized.
Dependency links describe required interfaces; they do not authorize work on those items. No implementation outside the existing TODO list is approved. Publication does not select a numerical law, settle an unresolved operator ruling or authorize a run.
All seeded patterns are applied above. The JSON pins their source bytes and the governing checklist/rulings. Historical formulas, thresholds and examples in a pattern remain scoped examples unless the governing contract adopts them. This draft adds no pattern-library entries and claims no independent semantic ratification.
Reference text; historical examples and prescriptions retain the scope stated above.
@flexiarg aif/structure-learning-by-model-reduction
@title Structure Learning by Bayesian Model Reduction (the third optimisation level)
@sigils [✂️/简]
@audience fulab agents, aif implementers, designers of concept-formation
@tone technical
@style pattern
@holds-at R17 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R17 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/currency-before-merge
@why R17 dossier problem: R17 solves changing the model's structure rather than merely sharpening fixed parameters: the roster places **“Structure learning”** in SELECT's assurance band (`p4ng/empirics-futon/control-stages.edn:42`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r15-r11-r17-batch5.md, R17, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Structure Learning (R17) is the third optimisation level, beyond inference and parametric (Hebbian) learning: OFFLINE, it prunes and merges redundant model structure by Bayesian Model Reduction (BMR) over accumulated Dirichlet counts — accepting a reduced model when ΔF ≤ −3 (Bayes factor ≈ 20). Parametric learning only sharpens existing structure; only model reduction reorganises it. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/r17-structure-learning (L14 edge-resolution; basis: holds -- the problem node's own holds-at token covers this pattern; source: receipt runs/L14-edge-resolution.edn; zai-1, 2026-09-05)
! conclusion: Structure Learning (R17) is the third optimisation level, beyond inference and parametric (Hebbian) learning: OFFLINE, it prunes and merges redundant model structure by Bayesian Model Reduction (BMR) over accumulated Dirichlet counts — accepting a reduced model when ΔF ≤ −3 (Bayes factor ≈ 20). Parametric learning only sharpens existing structure; only model reduction reorganises it.
+ context: The Active Inference Framework has three optimisation levels (Neacsu 2024, after Friston, Parr et al. 2018). (Active) Inference minimises variational free energy over states and policies (online, moment-to-moment). Parametric Learning accumulates Dirichlet concentration counts — mathematically Hebbian plasticity (online, gradual). Structure Learning selects among model *structures* by model evidence (offline, between periods of engagement). The first two cannot reorganise the model; they only sharpen what is already there. Concept formation, generalisation, and "these two contexts are the same" collapse require the third.
+ IF:
You want the agent to form concepts and reorganise its generative model — merge look-alike states, prune redundant likelihood connections, generalise across contexts — using accumulated experience but NO new data, offline (the sleep/consolidation regime).
+ HOWEVER:
Parametric (Hebbian) accumulation alone cannot do this. Adding more Dirichlet counts only sharpens existing state–outcome mappings; it never removes a connection or ties two states together. An agent that only accumulates will represent every context as distinct forever (no generalisation), keep every redundant parameter (no complexity control), and never form the "these two rooms are the same" concept. Model *comparison* is a different operation from parameter *estimation*, and you cannot make a static count-accumulator do a model-selection loop's job.
+ THEN:
Implement Structure Learning as Bayesian Model Reduction over the Dirichlet concentration parameters. Given a full (parent) model with prior `a` and accumulated posterior `A`, and a reduced/alternative model with prior `a'`, compute analytically:
reduced posterior `A' = A + a' − a`
free-energy change `ΔF = ln B(A) + ln B(a') − ln B(a) − ln B(A')` (`B` = multivariate beta)
accept the reduction (prune/merge) when `ΔF ≤ −3` (Bayes factor ≈ 20; the reduced model is ~20× more likely).
Construct the alternative models to reflect the LEARNT associations (data-informed alternatives, as the thesis does): e.g. a "merge states i,j" hypothesis whose reduced prior ties j's profile to i's (a pooled row). Run offline, in a quiet window (BMR is heavy), triggered by accumulated new evidence — NOT per-tick. The surviving reduced structure IS the concept.
+ BECAUSE:
Model evidence — not more data — is what reorganises concepts. BMR is the analytic, closed-form, biologically-plausible (synaptic regression / pruning during sleep) operator that scores a reduced model against its parent using only the accumulated posteriors and the priors, with no reinversion. It is the AIF-canonical mechanism for the third optimisation level, and it grants the rapid, insight-like learning that gradual Hebbian accumulation cannot: Neacsu 2024 Ch.4 shows BMR-endowed agents accumulate more reward AND higher information gain than accumulation-only agents.
+ NEXT-STEPS:
- DONE (2026-07-08, 4064533): pure BMR kernel — closed-form ΔF over Dirichlet params + Dirichlet moments. Reviewed as a real gate: the sign is pinned by redundant-vs-informative tests (ΔF ≈ −5.5 accept / +8.2 reject), log-gamma verified against known values. Evidence: futon2/src/futon2/aif/bmr.clj.
- DONE (2026-07-08, 8200f08): concept-formation pipeline — corpus→concentration→pairwise merge-hypotheses→equivalence-class concepts→capability-star docs. Neacsu-faithful (pooled-from-data reduced prior) and evidence-conservative: a merge needs accumulated repeated co-occurrence to cross −3 (A–B ΔF −2.12 at +1 count → no merge; −4.33 at +20 → merge). Evidence: futon2/src/futon2/aif/a4a.clj.
- OPEN / demo-validated (the honest status for the R-map): on the current demo corpus — 0 `:capability/*` edges, 3 discharges over 35 capabilities — NO merges fire (~6× below the threshold). The mechanism is validated synthetically; real concept-formation awaits the `:capability/*` production write. Evidence: futon2/holes/M-a4a-structure-node.md.
- Anti-pattern to name explicitly: `accumulate-without-reduce` — believing that Hebbian count accumulation IS structure learning. It sharpens; it never reorganises. Structure Learning is a distinct, offline, model-comparison step (BMR / BME / BMS), not a limit of parametric learning.
- Respect `currency-before-merge`: a merge that collapses two concepts is a STRUCTURAL edit, not merely a count sum — it must honour any accumulation-currency invariants downstream.