Where an inference law lives

Artificial and animal learners compared on one conditioning instrument against one ideal observer. A meta-trained transformer acquires a cue-reward contingency in context with timescale invariance; eight pre-registered runs on a surprise-gated write channel all stopped at a gate, and the last gave an exploratory reason why.

At a glance

Question
Where do the laws that animal conditioning and in-context learning share actually live, in the prior a learner starts with, in the inference it makes in state, or in the write that makes an inference permanent, and can a gated write channel on a meta-trained network be made to show the animal retention pattern?
My contribution
One conditioning instrument (cue and reward token streams with the contingency present or absent, a circular-shift control, and a Bayes rate observer on the same streams), a retention probe that separates inference from write, eight pre-registered write-channel runs with predictions hashed before scoring, and two exploratory developmental batteries.
Result & scope
One positive, which is the null expectation for an approximately Bayesian learner: a meta-trained transformer acquires the contingency in context with no acquisition on the control and no effect of trial length at fixed C/T (medians 5, 5, 6 trials at C/T 4.5 and 3, 3, 3 at C/T 27 for T of 4, 12, 36). Its C/T slope is unmeasured, because the prior saturates the readout. A pre-registered retention probe fails on its literal wording; read against a reference chosen afterwards, it shows no forgetting and no spacing effect, the inference-only signature, reported as exploratory. All eight write-channel runs stopped at a gate and no prediction was scored; two exploratory readings are consistent with a surprise gate being silent in range and a biased sampler on change-point streams. No critical period and no learning-specific developmental alignment on small networks. Nothing here is a claim about brains.
In this write-up

Work in progress. The one positive result is in-context acquisition with timescale invariance; the slope on C/T, the number that would place the learner between the ideal observer and the animals, has not been measured, because every checkpoint so far saturates the readout. The retrain that would measure it is designed and not run. Every write-channel run stopped at a gate, and the investigation below records each one by the instrument that stopped it. Two adversarial reviews on 13 November corrected a truncated likelihood ratio in the acquisition reference, a slope-axis mismatch, a post hoc reference in the retention probe and an artefact in the developmental battery’s shape report; the page reflects those corrections and says where. The belief readout against the Bayes observer, trial by trial, and the Bayes-floor plot run in the browser at the Hugging Face demo (one seed, one architecture, no slope claimed).

The puzzle

Animals learning that a cue predicts food obey laws that look mathematical. Trials to acquisition fall as a power of (C/T − 1), where C/T is the ratio of the background cycle to the cue duration, with a slope near −0.66 across rat groups when fitted on log(C/T − 1) (Harris and Gallistel, 2026); the law is invariant to rescaling every interval; a random pairing of cue and reward teaches nothing. In October I tried for a week to find a synaptic-level quantity that artificial and biological learners share. Eighteen operationalisations failed or were true by construction. The law that did hold was the animal one, and the learner that satisfied it was not a gradient learner but an ideal observer computing a posterior over rates in state.

That reframes the comparison. Any learner is a prior it starts with, an inference it makes in state within an episode, and a write from state into durable structure. The conditioning laws are theorems of rate estimation, so any learner near the normative solution inherits them in the inference component, and a meta-trained transformer, whose in-context learning is approximately Bayesian on its training distribution, should reproduce them with no biological ingredient. Reproducing them is therefore the null expectation. The comparison is informative only where the two kinds of learner differ: where the prior came from, and how an inference made in state gets written into structure. The programme on this page is the attempt to measure that split on one instrument.

The sibling project on the same machine, predicting causal signal flow in the C. elegans brain, asks a question about worms; this one asks a question about learners.

The investigation

Each entry is one run, with the gate that stopped it where one did. Nine entries had their predictions hashed before any powered seed: the retention probe and the eight write-channel runs. The two developmental batteries and the threshold check on the reference observer were exploratory and say so.

kept partial ruled outtap any step to expand

What survived

In context, a meta-trained transformer acquires the contingency, leaves the shuffled control at zero false acquisitions, and does not care about absolute time at fixed C/T. On the write channel, eight hashed runs stopped at gates, one stage further for the cue-keyed store than for any increment write.

Left: median trials to acquisition against trial length for C/T 4.5 and C/T 27, flat in T. Right: the eight hashed write-channel runs and the stage at which each stopped; only R passed the dose and specificity stage.

Findings and limits

What holds, on this instrument:

  • In-context acquisition with timescale invariance. With a 5% prior over contingency, median trials to acquisition are 5, 5 and 6 at C/T 4.5 and 3, 3 and 3 at C/T 27 for T of 4, 12 and 36, with 0 of 20 false acquisitions on the control. This is the one positive of the programme, and it is what an approximately Bayesian learner is expected to do.
  • The slope is unmeasured. Fitted on log(C/T − 1) over C/T 3 to 54, the transformer’s slope is −0.15, but the prior saturates the readout within 2 to 6 trials, so there is no dynamic range to measure a slope against. The acquisition reference used in that run carried a truncated likelihood ratio (log(C/T) − w/T, missing the +w/C term), found in review; with the full ratio the observer’s medians at C/T 3 to 15 are about 4, 2, 2, 1, 1, so it saturates from about C/T 9, and no observer slope from that run is quoted here. The streams also carry interval-shape evidence that the circular-shift control does not match, which is a fact about the stream construction. A retrain with a lower prior, a control with a matched reward-to-cue gap distribution, three seeds and a second architecture is the design that would measure the slope; it has not been run.
  • The inference-only signature, exploratory. With predictions hashed first and a fixed-parameter Bayes observer as the pre-registered reference, the retention prediction fails on its wording: the transformer departs from that observer by more than 0.2 in 6 of 8 cells, and massed exceeds spaced at 8C and 32C. Two changes made after the results, a hierarchical observer that marginalises C and T over the training prior (1.00 at every delay) and clipping the readout to 1, yield a flat profile: no retention decrement at delays up to 32 cycles and no spacing effect. That profile is what a learner with no write should show, and it is reported as exploratory because the reference that makes it readable was chosen afterwards.
  • Substrate signatures where the decomposition says they should be. A frozen leaky GRU forgets in absolute time (0.16 massed, 0.00 spaced at 32C) and loses timescale invariance once the cycle exceeds its state time constant (13 trials at T = 36 against 4 at T = 4 for C/T 27). It also loses it, unexplained, at the short end (14 trials at C/T 4.5, T = 4, against 3.5 at T = 12), which is recorded and not interpreted. The ideal observer shows neither.
  • The ideal observer’s slope is threshold-independent above about 30 nats: on log(C/T − 1) over C/T 4.5 to 27 it is −0.57 at 30 nats and −0.58 at 60, against −0.66 [−0.86, −0.46] for rats across all groups, −0.82 [−1.11, −0.52] for rats below C/T 72, and −1 by construction for the one-parameter pigeon model. A 60-nat threshold lands on the pigeon intercept at C/T 4.5 (83 against 85). One fitted parameter, one free prediction. An earlier version of this page compared slopes fitted on different axes.

What stopped, each labelled by its instrument:

  • Additive SGD into the inference weights has no dose window on this learner: below a learning rate of 0.1 eight updates write nothing measurable; at 0.3 they register and the shuffled control acquires as often as the signal (6 to 12 of 20 at C/T 27, 13 to 20 at C/T 3 and 9). Amendments E and F, run at the training rate, inherited the under-dose and are exploratory.
  • A separated increment store, gated or not, with or without a bias term, has no dose that registers while preserving specificity (amendments P and Q). Predictions not scored.
  • A cue-keyed slot store is the first write that registers specifically on the readout (κ = 0.25; it wrote on both streams, the control on 8 of 8 reinforcements, but the control acquired on only 0 to 2 of 64 seeds). Its retention gate was misspecified by me for the wrong substrate, so its predictions were not scored; exploratorily, the surprise-gated arm wrote more under massed than spaced training.
  • The error-surprise gate, on change-point streams where the prior is wrong, registers nothing at any dose (median write-only belief 0.001 to 0.002). The post hoc diagnostic: 51% of what it stores is written before the change point and the stored value (1.26 log units) is a biased sample of chance-short waits that is identical on signal and control. Silent where the prior is good, biased on change-point streams: the gate is closed as an operationalisation in the two regimes tested, on two exploratory readings under failed gates. Contingencies with C/T or T outside the training range were not run. The proposed replacement, a write gated on the change in the inference arm’s own belief with slot replacement, is designed and not run.
  • No learning-specific developmental alignment on a 15-metric by 7-curve battery across three small networks: 7 of 105 pairs pass, 4 of them also under shuffled targets, and all 7 are a monotone or decaying curve against another. The battery’s shape report called the per-step parameter displacement an early inverted U; review traced that to a filled-in missing value, and the curve is largest at the first update and decays, identically with shuffled targets. And no critical period on the same networks: an early input deficit is within seed noise under Adam and, under SGD, shrinks eightfold when recovery is tripled and is still falling. Both are exploratory, on small networks and at most 5,700 steps, and neither bears on deep convolutional networks, where Achille, Rovere and Soatto (ICLR 2019) reported a permanent deficit.

Open: the low-prior retrain and the slope it would give; the inference-change gate; the transfer boundary of the prior (clock-tick against interval-token representations, unseen T, C/T outside the training range); and an extinction test, which on stationary training streams is out of distribution and currently reports only the prior.

The writing on this programme is in the ANN–BNN series.

Code and data: the instrument is public at github.com/rohit-ravi2/gallistel-icl, with the meta-trained checkpoint at huggingface.co/rohitravi2/gallistel-icl and the conditioning streams at huggingface.co/datasets/rohitravi2/gallistel-streams.

Scope: this is a modelling programme on synthetic conditioning streams, not an animal study. The animal laws are Gallistel’s and colleagues’ (the rat slopes from Harris and Gallistel, 2026, eLife; the one-parameter pigeon model with slope −1 on log(C/T − 1) from Gibbon and Balsam, 1981, with the constant 297 from Harris and Gallistel’s reading of it); the claim that meta-trained transformers are approximately Bayesian in context is Wakayama and Suzuki’s (2025); the critical-period deficit in deep networks is Achille, Rovere and Soatto’s (ICLR 2019). The contribution here is the prior/inference/write decomposition as a test plan, the paired readout against a circular-shift control, the retention probe as the inference-only signature, the hashed write-channel addenda and the biased-sampler diagnostic, and the record of which of my own gates, references and shape reports did not survive review.