Scientific and mathematical contract
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.
A laboratory built around the bacterial flagellar motor. It holds a deterministic reduced model of the motor, analysis of recorded single-motor events, and a cross-study parity programme. Alongside those sit the scientific gates the work has to clear, and independent audits of both the model and the repository around it. The framing throughout is hierarchical active inference.
It is for a reader with a scientific interest, and especially for one who has come to check whether a model fit has quietly become a claim about biology. The laboratory's central discipline is a labelling one: every visible layer carries exactly one class — recorded observation, structural reconstruction, reduced model, or physical teaching analogue — and those classes may not be blended. Behavioural observations of one species are held apart from structural work on another, so that nothing on the page can read as a single measured specimen.
Start with the Living Science Walkthrough, which sets out those classes and the truth contract they belong to. Then the scientific and mathematical contract, then the parity gates, which state what would have to hold before a parity claim could stand.
What it is not: a claim of biological parity. The walkthrough is explicit that the release does not turn a model fit into a biological identity claim, and full biological parity is recorded as false and printed as false. Passing this repository's software tests is necessary here and is not the same thing as agreement with a living motor.
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.
Scope
The release is a cross-scale, evidence-linked teaching and experiment surface. It does not assert that a bacterium contains literal gears, that the reduced world equations replace molecular models, or that a successful fit establishes the biological implementation of an internal probabilistic representation.
Separation
stepWorld(world, action, controls, dt) is the external world process. It owns
ligand-field state, true gradient, cell pose, receptor state, CheY-P, stator
occupancy, torque, rotor speed and direction.
observeWorld(world, controls, receivedAt) is the sensory boundary. The
Observation schema intentionally excludes true gradient and stator occupancy.
stepAgent(agent, observation, dt) receives only the Observation record. It
cannot import, reference or inspect the world object. It returns beliefs,
predictions and a bounded RUN/TUMBLE action.
Biological world equations
The synthetic world uses an explicitly reduced MWC-style receptor mapping:
f_r = N[ε₀ − ε_m m + ln((1 + L/K_off)/(1 + L/K_on))]
a_r = 1/(1 + exp(f_r))
dm/dt = k_m(a_target − a_r)
CheY-P relaxes toward a receptor-activity-dependent target. Stator occupancy relaxes toward a load-dependent target between zero and eleven units. Stall torque is proportional to stator occupancy and ion-motive force. Speed falls with external load. A torque-dependent effective dissociation constant feeds a Hill switching curve.
These equations are MODELED / TEACHING REDUCTION. Their variables and units are visible in the interface. They are not fitted reproductions of any one primary paper.
Exact categorical inference
Hidden gradient state:
s ∈ {falling, flat, rising}
Predictive prior and update:
q⁻(s_t) = Σ B_π(s_t|s_{t-1}) q(s_{t-1})
q(s_t) = η p(o_t|s_t) q⁻(s_t)
For rising against falling, the physical gear identity is exact:
ln O_posterior = ln O_prior + ln likelihood-ratio
Angles encode these natural-log odds. The browser calculation is authoritative; measured backlash becomes uncertainty rather than a hidden correction.
Variational free energy
F[q] = Σ_s q(s)[ln q(s) − ln p(o,s)]
= KL[q(s) || p(s|o)] − ln p(o)
≥ −ln p(o)
The present categorical update uses the exact posterior under its declared
model, so the KL term is zero to numerical tolerance. q remains conceptually
and structurally distinct from the exact posterior even where equality is
tested.
Expected free energy
G(π) = risk(π) + ambiguity(π) − information_gain(π) + effort(π)
Q(π) = softmax(−γG(π))
RUN and TUMBLE receive the same observations, preference vector, outcome model, horizon and precision. Each term is emitted separately in the UI.
Two free energies
Thermodynamic free energy from the ion gradient performs motor work and is reported in physical energy units. Variational free energy is an information-theoretic model-evidence quantity reported in nats. They are not numerically substituted for each other.
Primary evidence anchors
- Antani et al., Nature Communications 12, 6432 (2021), mechanosensitive stator recruitment and CheY-P binding. https://doi.org/10.1038/s41467-021-25774-2
- Wadhwa et al., Nature Communications 13, 5327 (2022), multi-state mechano-adaptation. https://doi.org/10.1038/s41467-022-33075-5
- Lo et al., PNAS 115, 1190–1195 (2018), zero-load speed, ion-motive force and stator-number scaling. https://doi.org/10.1073/pnas.1708054114
- Mattingly and Tu, Nature Physics 22, 131–138 (2026), nonequilibrium global mechanical coupling as a current theoretical account. https://doi.org/10.1038/s41567-025-03105-2
Release falsifiers
- A hidden world field enters
stepAgent. - A synthetic frame is labeled as a live measurement.
- Prediction is overwritten by the later observation instead of scored.
- Posterior probabilities fail normalization or the VFE identity.
- RUN and TUMBLE are scored with unequal information.
- A thermodynamic quantity is shown with informational units or vice versa.
- The physical model is described as a bacterial-motor replica.
Observed-data result
The laboratory now includes a source-pinned, motor-level held-out analysis of the Wadhwa et al. 2022 single-motor stator-remodeling data. The held-out timing rejects a homogeneous memoryless duration model, and the frozen two-timescale UNI mixture predicts the held-out durations better than that null. A lognormal baseline obtains a slightly better held-out log score than UNI, so the run does not establish the UNI mixture as the best tested model and does not identify its latent components with biological states.
This historical observational dataset does not contain a UNI-selected action or
a measured biological posterior. It constrains only the observation and
prediction portion of the declared generative model. See
docs/OBSERVED-EXPERIMENT.md for the full protocol,
equations, results, uncertainty, alternatives and reproducibility trail.
Scientific parity status
The mechanistic parity layer now implements the source paper's D–L–T first-passage survival equation, a joint on/off competing-risk likelihood, and right-censoring contributions. It also executes source-artifact parity, synthetic parameter recovery, and motor-level held-out prediction gates.
Full parity is not achieved. The public code bundle does not reproduce the article's source-workbook theory arrays, one of three parameter-recovery runs fails its frozen tolerance, and the held-out mechanistic advantage has a motor-cluster interval crossing zero. Load transfer, switching cooperativity, live instrumentation, independent biological replication, and physical-print validation require new external work. No biological Active-Inference identity is established.
See docs/SCIENCE-GATES.md and the machine-readable
experiments/results/science-gates-report.json ledger.
sha256 caf8fa47cce7bc33 — of the original file, so what was ingested stays checkable.
Plain — written for this website, not the source document
What may and may not be claimed is set out here, as the project's own rulebook. It opens by saying the release is a teaching and experiment surface. It does not assert that a bacterium contains literal gears, that the reduced world equations replace molecular models, or that a good fit shows the organism really carries an internal probability calculation.
Then it draws hard lines. The synthetic world, the sensory boundary and the reasoning agent are separate pieces of code, and the agent cannot reach into the world. The world equations are labelled a teaching reduction, not a fit to any single paper. Two different quantities that both get called free energy are kept apart, with different units, and are never substituted for one another.
Near the end it reports an adverse result instead of hiding it. On data kept back from the fitting, a simple baseline scored slightly better than the project's own mixture, so that run does not establish the mixture as the best tested model, and full parity is not achieved.
Plain · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is caf8fa47cce7bc33
Clear — written for this website, not the source document
The document is a contract, and its first move is to say what the release is not. It is a cross-scale, evidence-linked teaching and experiment surface. It does not assert literal gears inside a bacterium, does not offer its reduced world equations as a replacement for molecular models, and does not treat a successful fit as evidence that the organism implements an internal probabilistic representation.
The separation section is the heart of it. One function advances the external world and owns the things a real cell would own. A second function is the sensory boundary, and the observation record it produces deliberately leaves out the true gradient and the stator occupancy. A third function receives only that observation record. It cannot import, reference or inspect the world object, and it returns beliefs, predictions and a bounded action.
The biological equations come next, written out and then labelled in capitals as a modeled teaching reduction whose variables and units are visible in the interface. They are not fitted reproductions of any one primary paper.
Then the mathematics of inference: a hidden state with three possible values, a predictive prior and an update, and the identity that the physical gear model realises. After that, two different free energies are defined and then firmly separated. The thermodynamic one does motor work and is reported in energy units. The variational one is a model-evidence quantity reported in nats. They are not numerically substituted for each other, and the page keeps the approximate belief conceptually distinct from the exact posterior even where the two are equal.
Four primary papers are cited as evidence anchors, with links. A short list of release conditions follows: things which, if they happened, would mean the release had broken its own contract. A hidden world field reaching the agent, a synthetic frame labelled as a live measurement, a prediction overwritten instead of scored, and the physical model described as a replica of a bacterial motor are all on that list.
The last two sections carry the adverse results. In an analysis on data kept back from the fitting, of one published single-motor dataset, the timing rejects a memoryless duration model and the frozen mixture predicts unseen durations better than that null. But a lognormal baseline scores slightly better than the mixture. So the run does not establish the mixture as the best tested model and does not identify its hidden components with biological states. Full parity is not achieved: the public code bundle does not reproduce one source artifact, one parameter-recovery run misses its frozen tolerance, and one advantage on kept-back data has an interval crossing zero. Several further questions require new external work, and no biological identity is established.
Clear · written 2026-08-01 by claude-opus-5 · not yet checked by a person · about the document whose sha256 is caf8fa47cce7bc33