UNI Universal Natural Intelligence

Wiki · The Flagellar Motor

Observed single-motor experiment

The Flagellar Motor · docs/OBSERVED-EXPERIMENT.md @ b909801f3db4 (hierarchical-aif/motor-stack) — opens the published snapshot 8b4b5935bcba

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.

Result in one sentence

In a motor-level held-out analysis of the source-pinned Wadhwa et al. single- motor stator-remodeling data, dwell-time variability rejected a homogeneous memoryless process and the frozen UNI two-timescale mixture predicted unseen durations better than that null; however, a lognormal baseline achieved a slightly better held-out log score than the UNI mixture.

This is evidence about dwell-time structure and predictive models. It is not evidence that a bacterium performs Active Inference or contains the latent variables used by UNI.

Source identity

The source paper reports 50 Hz stator-remodeling traces from individual tethered E. coli motors after electrorotation is removed and load increases. The public raw artifact contains 129 motor records.

Frozen protocol and data boundary

experiments/preregistration.v1.json was frozen before this implementation computed its outcomes. The source paper's conclusion was already known, so this is honestly classified as a local reproduction and prospective held-out prediction protocol—not blind discovery or third-party preregistration.

The observation boundary contains only:

motor identity, timestamp, step-fitted stator occupancy

The analysis never reads a source-paper molecular label as a hidden truth. It also never uses holdout durations or transition directions to fit parameters. All events from a motor stay in one partition:

partition(motor) = SHA256(motor_name) mod 5
holdout when remainder = 0; training otherwise

The first dwell in the analysis window is discarded as left-truncated. The last dwell is recorded as right-censored and excluded from the uncensored duration likelihood. Primary states are N = 0..8; the frozen eligibility gate requires at least 20 holdout events from at least five holdout motors for each state.

Predictive models

For every eligible stator count N, the training mean duration μ_N is frozen and each duration is normalized:

y = t / μ_N

All model densities have mean one on the normalized scale. The seconds-scale predictive density includes the Jacobian 1/μ_N.

M0: homogeneous memoryless baseline

p(y) = exp(-y)
S(y) = exp(-y)
CV² = Var(T) / E[T]² = 1

M1: Weibull baseline

One common shape k is fitted on training events. Its scale is constrained to 1 / Γ(1 + 1/k) so the normalized mean remains one.

M2: lognormal baseline

One common σ is fitted on training events, with μ_log = -σ²/2 so the normalized mean remains one.

M3: UNI two-timescale generative model

p(y) = w λ_fast exp(-λ_fast y)
     + (1-w) λ_slow exp(-λ_slow y)

w/λ_fast + (1-w)/λ_slow = 1

w and λ_fast are fitted on training data. λ_slow is fixed by the mean-one constraint. When an observed dwell survives without a transition, the declared Bayesian posterior is exact:

q(slow | T > y)
  = (1-w) exp(-λ_slow y)
    / [w exp(-λ_fast y) + (1-w) exp(-λ_slow y)]

This is an inference performed by the UNI analysis model. The historical data contain no measurement of a bacterium's posterior, so the posterior is never attributed to the biological motor.

Results

The frozen eligibility rule retained states N = 1..8, 793 training events from 80 motors, and 233 held-out events from 19 different motors.

The mean held-out CV² across eligible states was 3.150, with a 95% motor- cluster bootstrap interval [1.514, 3.568]. The complete interval lies above the memoryless value of one.

Training-fitted M3 improved held-out log predictive density over M0 by 0.210 nats per event, with 95% motor-cluster interval [0.069, 0.325].

Held-out mean log scores, where higher is better:

Model nats/event
M0 exponential -3.260
M1 Weibull -3.096
M2 lognormal -3.013
M3 UNI two-timescale -3.050

M3 minus M2 was -0.037 nats per event, interval [-0.068, 0.015]. Therefore the observed run does not establish M3 as the best tested predictive model. M3 beats the strict memoryless null, is unresolved against Weibull, and is slightly worse than lognormal on this holdout.

State-conditioned transition-direction frequencies slightly improved the point estimate of holdout log loss, but the interval crossed zero. That secondary result is inconclusive.

What was proved, supported, and left open

The exact algebra proves only consequences of each declared probability model. The deterministic tests establish that the code implements those declared calculations for the tested contracts.

Within the frozen analysis population, the observed data support:

  • dwell timing inconsistent with a homogeneous memoryless duration model;
  • held-out predictive value in modeling more than one timescale;
  • an exact shift toward the slower M3 posterior when a dwell survives longer.

The run does not distinguish among all causes of non-memoryless timing. Cell-to-cell heterogeneity, temporal nonstationarity, continuous rate mixtures, measurement segmentation, and discrete molecular states remain competing explanations. The lognormal result makes this limitation empirical, not merely verbal.

The data contain no action selected by a UNI agent, no policy manipulation, and no measurement of a biological belief. Consequently, this experiment tests the observation/prediction part of the generative model only. It does not test an Active Inference action loop.

Uncertainty and audit trail

All reported intervals use 2,000 nonparametric bootstrap replicates with motors, not events, as the resampling unit; seed 20260717. The event artifact preserves every exclusion and censored dwell. The result JSON preserves fitted parameters, state summaries, scores, calibration diagnostics, curves, claims, limitations, and code/data identities.

Machine-readable artifacts:

  • experiments/preregistration.v1.json
  • experiments/data/wadhwa-2022-events.json
  • experiments/results/observed-experiment-report.json
  • experiments/results/audit-manifest.json

Reproduce

Install the frozen CPU analysis dependencies, obtain the pinned upstream raw file, and run:

python -m pip install -r requirements-experiments.txt
python scripts/ingest-wadhwa-data.py /path/to/remodeling_data.mat
npm run experiment:run
npm run experiment:verify
npm test

Ingestion stops on a raw-file hash mismatch. Running the experiment twice from identical protocol, event, and code identities must produce an identical report SHA-256. experiment:verify independently rebuilds the model fits, held-out scores and overdispersion statistic with NumPy/SciPy and fails if they disagree with the production JavaScript engine.

sha256 8622b9791400b0b0 — 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)

One analysis of real, published recordings of single bacterial motors. The recordings came from another laboratory; this project took no readings of its own and re-analysed someone else's file.

The question was about waiting times. If a motor's state changed at a constant rate, the spread of waiting times would look one particular way. It does not. Data kept back from the fitting reject that simple picture, and the project's own two-timescale model predicts unseen waiting times better than it.

The honest part is what comes next. A plain, ordinary alternative — a lognormal curve — scored slightly better than the project's model on that same kept-back data. So the run does not show the project's model to be the best one tested. It shows that more than one timescale helps, and that the reason for it is still open.

The page is careful to say what the data cannot touch. These are historical recordings. They contain no action chosen by the software and no measurement of a bacterium's belief, so nothing here tests an action loop.

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

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)

The page opens with its result in one sentence, and the sentence carries its own contradiction. In an analysis on data kept back from the fitting, taken from a published single-motor dataset, the variability of dwell times rejects a homogeneous memoryless process, and a frozen two-timescale mixture predicts unseen durations better than that null. However, a lognormal baseline achieved a slightly better score on that kept-back data than the mixture. The page then states plainly that this is evidence about dwell timing and predictive models, and is not evidence that a bacterium performs the inference or contains the latent variables the model uses.

Source identity comes next: the primary article, the public repository, a frozen commit, the raw file and its checksum, and the licence. The protocol was frozen before the outcomes were computed, but the source paper's conclusion was already known, so the page classifies this honestly as a local reproduction and a kept-back prediction protocol, not blind discovery.

The data boundary is narrow and declared. The analysis sees motor identity, timestamp and step-fitted occupancy, and nothing else. It never reads a molecular label as hidden truth and never uses kept-back durations to fit parameters. All events from one motor stay in one partition, so nothing leaks between the two sets. The first dwell in each window is discarded as left-truncated and the last is treated as censored.

Four predictive models are then defined on a normalized scale so that shapes are compared fairly: a memoryless baseline, a curve with a fitted shape, a lognormal, and the project's two-timescale mixture. For the mixture, the page writes down the exact belief that a surviving dwell belongs to the slower component. It immediately adds that this is an inference performed by the analysis model, since the historical data contain no measurement of a bacterium's own belief.

The results section reports the kept-back scores as a table, with the lognormal in bold as the best. The paired difference between the mixture and the lognormal has an interval crossing zero. The page therefore states, in bold, that the run does not establish the mixture as the best tested predictive model. It beats the strict memoryless null, is unresolved against the fitted shape, and is slightly worse than the lognormal on the data kept back. A secondary result about transition direction is called inconclusive because its interval also crossed zero.

The section on what was proved and what was left open is unusually careful. The algebra proves only consequences of each declared probability model; the tests establish that the code implements those declared calculations. Within the frozen population the data support timing inconsistent with a memoryless model and predictive value in modelling more than one timescale. They do not distinguish among the causes: cell-to-cell variation, drift over time, continuous mixtures of rates, segmentation of the measurement, and discrete molecular states all remain competing explanations. The lognormal result is what makes that limitation empirical rather than merely stated.

The page closes with uncertainty and an audit trail: resampling motors rather than events, a fixed seed, preserved exclusions, machine-readable artifacts. Then commands anyone can run to reproduce the analysis, including an independent re-implementation that fails if it disagrees with the production one.

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