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
Present fit and prospective G answer different questions. A legacy scalar cannot supply the observed-data term for every full policy in the live posterior.
R8 present fit / policy F. PARTIAL: applicable live policy F/detail coverage and posterior use. Exact retired legacy scalar is not a whole-node exemption. Built evidence: Equation components and F_pi witness machinery
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: aif/free-energy-as-tick-scalar
Pin the accepted definition and mode for current fit or per-policy variational F. State which claim is active. Reuse the seeded pattern’s F/G distinction, not its historical Gaussian tick formula as a universal posterior law.
Pattern: wm-pattern-design/same-policy-through-comparison
Join the full candidate family, evidence cutoff and model to each applicable F input. Produce a complete detail population; do not inherit one mission scalar across alternative cascades.
Pattern: aif/free-energy-as-tick-scalar
Retain the independently checked contributions and numeric semantics under the admitted definition. Mark inapplicable terms explicitly; the retirement of one legacy scalar does not retire R8.
Pattern: wm-pattern-design/same-policy-through-comparison
Verify WM-11’s actual posterior consumer reads the same F values and candidate identities. Preserve a prior-only result as prior-only and record incomplete details as a failed coverage obligation.
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 |
|---|---|---|---|
| R8-1 | R8-2 | requires-result | The declared law determines which observations and policies condition F. |
| R8-2 | R8-3 | requires-result | Complete input coverage is required to compute all applicable details. |
| R8-3 | R8-4 | requires-result | Computed details must reach the actual posterior, not only telemetry. |
| R8-4 | R8-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 missing candidate detail, G substituted for F, stale model and prior-only inference called posterior. Recompute a small admitted case independently. |
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 cascades share a mission but predict different evidence. Reusing a single mission fit scalar erases that difference. A posterior log with both policy names still fails if both read the same unjustified scalar.
This is a distinguishing design example, not a claimed production experiment.
Distinguishing controls: Reject missing candidate detail, G substituted for F, stale model and prior-only inference called posterior. Recompute a small admitted case independently.
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.
Applicable per-policy F remains an implementation obligation where missing; no placeholder zero or arbitrary weight is supplied.
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/free-energy-as-tick-scalar
@title Variational Free Energy as a Per-Tick Scalar
@sigils [🪔/双]
@audience fulab agents, aif implementers
@tone technical
@style pattern
@holds-at R8 ;; pegged 2026-08-30 (claude-15): the catalogue paragraph numbered R8 in p4ng/sec-catalog.tex; see PREREG-war-machine §1b
@see-also aif/evidence-precision-registry
@how aif/predictive-coding-belief-update
@see-also aif/expected-free-energy-scorecard
@why R8 dossier problem: R8 solves how the loop exposes whether its present belief explains the evidence: the roster places **“Present-fit mismatch”** in PERCEIVE (`p4ng/empirics-futon/control-stages.edn:16`; control-stage numbering). (source: futon2 holes labs wm-contract PROBLEMS-r2-r8-r7-batch2.md, R8, The problem it solves; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@how own mechanism: Compute and emit variational free energy F = 0.5 × mean(Π · ε²) per tick as a canonical scalar that summarises agent surprise. (source: this pattern's ! conclusion line; L3 rationale-backfill pilot, zai-1, 2026-09-05)
@why problems/per-tick-mismatch-instruments-outer-loop-gain (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)
@why problems/r8-present-fit-mismatch (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: Compute and emit variational free energy F = 0.5 × mean(Π · ε²) per tick as a canonical scalar that summarises agent surprise.
+ context: AIF computes two distinct quantities. **G** (Expected Free Energy) is per-candidate-action, drives policy. **F** (Variational Free Energy) is per-tick, summarises how surprised the agent currently is by its observations. They are different objects; conflating them is a common documentation hazard.
+ IF:
You want a single, comparable-across-time scalar that says "how badly is the agent's current belief explaining what it just observed?" — useful for validation (F should decrease on average as the agent learns), diagnostics (F-spikes flag surprise events worth investigating), and operational triggers (F-above-threshold can signal hyperparameter adjustment).
+ HOWEVER:
Without an explicit F-per-tick, the agent's belief evolution becomes opaque — there's no scalar to plot, no acceptance criterion to test, no operational alarm to trigger. And G-per-candidate is not a substitute: G is about the future; F is about the present.
+ THEN:
Implement F as a pure function (mu, observation, precision-opts) → non-negative scalar, applying the formula F = 0.5 × mean(Π_k · ε_k²) over all observation channels k. Emit it as part of the per-tick trace alongside μ and ε. When μ matches observation exactly, F should be zero by construction.
+ BECAUSE:
F is the quantity AIF agents are minimising (variationally); making it observable per tick gives a clean validation target (V3: F decreases on average) and a clean operational signal (sudden F-jumps merit attention). Keeping F distinct from G in vocabulary, file location, and trace schema prevents the cross-stack confusion where one is mistaken for the other.
+ NEXT-STEPS:
- Implement free-energy as a pure function in the same namespace as the belief update (canonical pairing: same module owns both rules). Pure function, takes precision options as inputs.
- Trace F per tick alongside μ and ε; include in CSV/evidence emissions.
- Acceptance: F = 0 when belief matches observation; F ≥ 0 always; F decreases over a run on average. The third property is V3 in the AIF completeness validation harness.
- DONE (UKRN v3 HO-02, 2026-05-14): free-energy implemented as pure function in notebooks/ukrn_v3_belief.clj:42-51. Hand-computed test cases pass. Available for the V3 validation property in the planned validation harness.
- Practice: when documenting an AIF surface, refer to F as "free energy" or "variational free energy" and G as "expected free energy" or "EFE-per-candidate". Cross-stack vocabulary discipline reduces handoff ambiguity.