UNI Universal Natural Intelligence

Wiki · The Cookbook

L3 — Organ / Physiological Control (the Cardio-Renal Heart Lab)

The Cookbook · cookbook/recipes/L3-organ-heart-lab.md @ 575fc93d9d31 (main) — opens the published snapshot e850f872196d

How to read this page

Three ways to read this page. Precise is the document itself, exactly as it is written in the repository. Plain and Clear were written for this website to help you meet that document — they are about it. They are not it, and they are not evidence.

The Cookbook is the method carried out step by step: 34 pages of recipes for building a developmental active-inference SIMULATION — a bounded peek at a toy world, never a person. The front matter says that word is never softened under any pressure, so it is not softened here. The recipes run from the molecular and cellular rungs up through metabolism, motor control, perception, language and metacognition, and on to rungs that are still open questions. Around them sit a set of kitchen rules, a shared pantry of engines and primitives, and a second family of recipes about nature itself — rocks, water, air, stars, DNA, ants, whales, bats, humans.

It is for the reader asking what building this would actually take. Each recipe names its ingredients, the order of work, the tests to run at that stage, and the point at which a step stops being something already carried out and becomes something proposed.

Begin with the front matter and then the kitchen rules. Those two pages fix the honest position and the fence labels that every later recipe leans on, and without them the status markers on a recipe are easy to skim past. After that the recipes can be read in any order.

The nature recipes sit slightly apart and should be read that way. They cite outside science — geology, chemistry, biology, astrophysics — and a nature citation is never a UNI gate: those chapters contain zero UNI claims and raise no rung.

What it is not: a claim that the whole ladder has been cooked. The book recommends the complete recipe and, on the same page, labels every rung by its real state — that tension is deliberate and is the thing the book is built around. Where a recipe and the claim ledger disagree, the ledger wins.

Your browser cannot switch reading levels, so the document itself is shown.

Precise — the source document

This is the document. Rendered from the repository at the commit above, with nothing rewritten for the web. A gate re-renders it on every deploy and fails the build if a single byte differs.

Part of the literal UNI Cookbook: one no-backprop active-inference engine, shown across scales. This rung is a developmental SIMULATION, never a person and never a patient. Where this recipe and ../../encyclopedia/CLAIM-LEDGER.md disagree, the ledger wins. Honest program position: ~2 of 11+ developmental rungs earned.

What you are building. A browser-native organ lab that takes the same discrete POMDP engine you already built at L0–L2 and points it at a reduced Karaaslan cardio-renal generative model — the RSNA → MAP → sodium/volume loop — re-expressed in active-inference language so that a heart attack reads as a failure of the prediction loop (maladaptive priors, miscalibrated precision, a damaged generative process). "Same math, many scales." This is the medical teaching bridge of the ladder; it is not a clinical tool and not a diagnostic instrument.


Ingredients (pantry engines/primitives, called by name)

  • The JAX POMDP + EFE + Dirichlet engine (core.py) — the one discrete loop (active_inference_step, exact_posterior_discrete, EFE/policy selection). The Heart Lab does not get a new engine; it reuses this one.
  • The precision labs (Precision / Echo / Loop / Cell / Heart) — the browser-native "one-engine-many-scales" demos. Heart mirrors Loop: you duplicate an existing lab and swap only the observation/generative model.
  • The inline-engine + canonical-TS + parity-test triad (M28). Each lab is a self-contained *-lab.html page with a vanilla-JS inline engine, mirrored by a canonical TypeScript engine in api/_lib/worlds/ (here cardio_renal.ts), pinned by a *_parity.ts test run via npx tsx. The inline block is delimited by explicit <<<ENGINE_PARITY_START/END>>> markers so the page and the "real" model cannot drift.
  • The Evidence Constitution (M1) + bars-before-build, held-once (M2) — the pre-registered tolerance, the parity gate, and the append-only ledger that this recipe authors against.
  • Karaaslan et al. long-term cardio-renal model — the textbook-level scientific basis (homeostasis as prediction-error minimization). Patent-level UNI math is not reproduced here; framing stays at textbook level (Parr/Pezzulo/Friston, Active Inference, MIT Press 2022).

Method (numbered build steps)

  1. Reduce the reference. Take the Karaaslan long-term cardio-renal model down to the load-bearing RSNA → MAP → sodium/volume loop. This is the generative process the lab will track.

  2. Re-express it on the same engine. Model the loop as a prediction-loop on the single POMDP engine from core.py — homeostasis as prediction-error minimization. Build the lab by duplicating Loop and swapping only the observation/generative model (keep variable names identical so the downstream engine code is reused verbatim; the diff to every untouched page should be exactly one nav line).

  3. Add safe-state handling (engine ticket OAS-710-T3). Build, test-first, the parameter-clamping + labeled-safe-state layer: CARDIO_BOUNDS, a clampState() that clamps all 10 state variables every tick (finite-safe, no NaN), and a labelCardioState() that returns a clinical regime label (hypertensive crisis / decompensated / hypertensive / hypotensive / normal) instead of a raw clamp. Build the inline-JS Canvas viewer (ticket OAS-710-T2) under the same test-first discipline (rAF fixed-timestep, visibilitychange pause, canvas fallback).

  4. Pin page-engine to canonical engine. Write the *_parity.ts test that asserts the inline-JS lab engine and the canonical cardio_renal.ts engine produce identical trajectories. Register the Heart-Lab engine ticket OAS-710-T3 in the ledger at Class E (15/15 tests pass), typecheck clean, with no sibling regression.

  5. Wire the honesty fences into the artifact, not just the prose. The page must carry, as coded copy: not a clinical tool · not a diagnostic instrument · not evidence that active inference is the correct theory; the resemblance to clinical reality is "an interpretive act, not a measurement." Where the Zenodo DOI appears, it must be fenced as an unrefereed preprint (Polzin et al. 2026, DOI 10.5281/zenodo.19785799, MIT; Layer-1 AI-executable audit complete, Layer-2 human expert review PENDING).


Gate (exact pass condition, exact ledger figures)

From CLAIM-LEDGER row L3.1 (the single source of truth):

  • The Karaaslan cardio-renal Heart Lab models clinical homeostasis as prediction-loop failure on the same one active-inference engine (reduced RSNA → MAP → sodium/volume loop, re-expressed in active-inference language). Class C (dev-gate / held-out eval).
  • The Heart-Lab engine ticket OAS-710-T3 stands at Class E, 15/15 tests pass.
  • PASS condition: Heart-Lab predictions track the Karaaslan reference within the pre-registered tolerance, AND the *_parity.ts tests against the canonical TS/Python engine pass.

No point-estimate verdicts: this rung's gate is the tolerance band + the parity assertion chain, registered before scoring (M2). Never card this row above Class C (and the engine ticket above Class E 15/15).


Falsifier (operable)

The L3.1 claim fails if either:

  • Heart-Lab predictions diverge from the Karaaslan reference beyond the pre-registered tolerance; OR
  • the lab fails parity tests against the canonical TS engine (the inline page engine and cardio_renal.ts produce non-identical trajectories).

Either outcome demotes the row; the parity test is wired to fail the build, so a drift cannot ship silently.


Recorded NEGATIVE(s) — first-class, inline

L3.1 itself carries no negative row in the ledger — but the honesty discipline that produced it is the recorded content, and it is first-class:

  • Claim-class discipline held under pressure. During the Heart Lab build the assistant refused to mark a DONE criterion satisfied ("verified in heart-lab.html") because the viewer was a later ticket; it checked in rather than fabricating a Y: verdict (M9 class-authority ordering: a passing test does not satisfy a criterion demanding a runtime observation). The Heart Lab inherits the sibling L1 Cell-Lab negative as its cross-scale falsification model: active inference is "good but not sovereign" — UNI honestly LOSES on database_flaky (0.759 vs SRE 0.803), memory_leak (0.740 vs neural 0.810), and cpu_noisy_neighbor (0.749 vs neural 0.824, UNI-vs-random not even significant), recorded in FALSIFICATION.md and shown at the top of the live leaderboard. The organ lab is built to the same falsifiable, losses-visible standard.

There is no SIGNED consult insert at L3 (the 2026-06-27 consult designs attach to L2, L5, L7, L9, L11, L12, and the continuity sub-ladder, not here). Nothing on this rung is raised by a design that has not been run.


HONEST FENCE — proven (Class C; engine ticket Class E 15/15)

A held, sealed PASS exists and its falsifier is still live: the reduced cardio-renal loop tracks the Karaaslan reference within tolerance, pinned by parity tests, with the OAS-710-T3 engine ticket at 15/15.

Not claimed (load-bearing, never softened): this is NOT a clinical tool, NOT a diagnostic instrument. "Same math, many scales" framing only; the heart-attack-as-prediction-loop-failure framing applies to the toy model, not to clinical reality. It is not "active inference demonstrated" (the lab is a re-expression on the engine, a framing LENS, not a sealed AIF loop), not comprehension, not awareness, not human-level, not AGI, not evidence that active inference is the correct theory of physiology. The Zenodo preprint is the mathematical foundation only and remains unrefereed (Layer-2 human review PENDING). A toy model, not clinical reality; a bounded peek in a developmental simulation, ~2 of 11+ rungs earned.

sha256 5f264a4f8c23d2a8 — of the original file, so what was ingested stays checkable.

Plain — written for this website, not the source document

Written for this website — not the document. This is a plain-language retelling, written to help you meet the document. It is not the source, and it is not evidence. It has not yet been checked by a person. (or choose Precise in the reading-level control above)

This recipe points the same engine at a heart. It takes a published cardio-renal model and reduces it to the loop that carries the work. That loop is re-expressed in the language of prediction, so that a heart attack reads as a failure of the prediction loop rather than as a separate kind of event. It runs in a browser. It is a simulation and a teaching bridge, and the page states repeatedly that it is not a clinical tool and not a diagnostic instrument.

The one thing this page says is that the limits are built into the artefact, not just written in the prose. The page itself must carry, as coded text, the statements that it is not clinical and not evidence that the underlying theory is right, and that any resemblance to clinical reality is an interpretive act rather than a measurement.

There is no new engine here. The lab is made by duplicating an existing one and swapping only the model of what is being observed. A parity test pins the version on the page to the project's reference version, and that test fails the build, so drift cannot ship quietly.

Plain · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is 5f264a4f8c23d2a8

Clear — written for this website, not the source document

Written for this website — not the document. This is a clearer retelling, written to help you meet the document. It is not the source, and it is not evidence. It has not yet been checked by a person. (or choose Precise in the reading-level control above)

This chapter is the medical teaching bridge of the cookbook's ladder, and the whole point is that no new machinery appears. The same discrete engine used at the earlier rungs is pointed at a reduced version of a published cardio-renal model, the loop running from nerve activity to blood pressure to sodium and volume. That loop is re-expressed as a prediction loop, so that maladaptive expectations, miscalibrated weighting, and a damaged underlying process become the vocabulary for physiological failure. Same mathematics, a different scale. It is a simulation, never a person and never a patient.

The build steps follow that discipline. Reduce the reference model to its load-bearing loop. Re-express it on the one engine by duplicating an existing browser lab and swapping only the observation model, keeping variable names identical so the downstream code is reused unchanged. Add a layer that clamps every state variable each tick so nothing runs away numerically, and that returns a named clinical regime rather than a raw clamped number. Write a parity test asserting that the engine inside the page and the project's reference engine produce identical trajectories. Then wire the honesty statements into the page as coded copy rather than as prose the reader has to trust.

The pass condition has two parts and no point estimates: the lab's predictions must track the reference within a tolerance registered before scoring, and the parity tests must pass. What would sink it is the same two conditions inverted: divergence beyond tolerance, or a parity failure. Because the parity test fails the build, a silent drift cannot ship.

The recorded content in the negatives section is unusual and worth noticing. This rung carries no negative row of its own. What it records instead is a moment of discipline. During the build, an assistant declined to mark a criterion satisfied by pointing at a page, because the viewer belonged to a later piece of work. It checked in rather than writing a verdict it could not support. The chapter then deliberately inherits the sibling cellular chapter's published losses as its own cross-scale model of falsification, on the grounds that the organ lab is built to the same standard of visible defeat.

The chapter also notes what is not here: no signed consultation design attaches to this rung, so nothing on it is lifted by work that has not been run.

The closing statement is the most emphatic part of the page. Not a clinical tool, not a diagnostic instrument. The reading of a heart attack as a broken prediction loop applies to the toy model, not to clinical reality. It is not a demonstration of the underlying theory, not comprehension, not awareness, not human-level ability. The preprint behind the mathematics stays labelled as unrefereed with expert review pending.

Clear · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is 5f264a4f8c23d2a8