Part of the ANN–BNN series. Project page: Where an inference law lives.
The question
Animals that learn a conditioned stimulus predicts food show something an in-context learner does not. Spaced training is retained better than massed training at long delays, and, in the reading this series uses, the memory outlasts the short-term state that carried it. In the decomposition I use for this series, prior, inference, and write, the first two are what a meta-trained network does in context. The third is a change to the network itself. The question for this week was narrow: does a write channel gated on surprise add retention-relevant content that the in-context prior lacks?
The instrument is the one from the first post: streams of cue and reward tokens, with the contingency present or absent. C/T is the ratio of the background cycle between rewards to the cue duration; massed training means a short cycle (C/T 4.5 here) and spaced training a long one (C/T 27). Each contingent stream is paired with a circular-shift control that has the same marginals and no contingency.
The discipline
Each run had a predictions file written first, hashed with sha256, and committed alone before any powered seed ran. The files declare the arms, the dose rule, the gates that must pass before the predictions are scored, the predictions with their directions and thresholds, and the falsifiers. If a gate fails, the predictions are not scored, and the result is recorded as an instrument label rather than a null on the idea. No gate moved after a result was seen. In one run, R2, two design faults found in a smoke test were fixed and disclosed inside the addendum before hashing.
The hashes, in order: 412ca57d (gated GRU arm), e933c287 (E), dd497cc4 (F), 59aded98 (G), ed4ad0aa (P), 197e87c2 (Q), 80da7092 (R), 25ef6daf (R2).
What happened
The gates have codes in the files, so here they are in words. A dose gate (GP0 in P, Q, R and R2; GE2 in E; PF1 in F) asks that the write register on a write-only readout, with the hidden state zeroed so that only the store can carry the belief, while the shuffled control does not acquire. A specificity gate (GG1 in G) asks that the control not acquire at the chosen dose. A retention-reference gate (GP3 in R) asks that the frozen network’s own retention profile be flat enough for the retention contrast to mean what the prediction says.
| run | design | gate outcome | reading |
|---|---|---|---|
| GRU arm | leaky GRU with a gated gradient write at the training learning rate | specificity clean, write did not register | instrument: dose too small |
| E | dense vs scalar write, gated vs ungated, calibrated step | dose gate GE2 failed: the scalar arms moved 0.0001 against a gate of 0.10 | every arm within 0.02 of the frozen network |
| F | tag-and-capture selection, offline stabilise or prune | dose gate PF1 not reached | selection deltas exactly zero: nothing to select |
| G | calibrated dose by a weakest-first ladder | specificity gate GG1 failed, 6 to 20 false acquisitions of 20 | a dose that registers destroys specificity |
| P | separated write store, calibrated on the ungated rule | dose gate GP0 failed | no specificity-preserving dose |
| Q | separated store, calibrated on the gated rule, no bias term | dose gate GP0 failed | route closed as an operationalisation |
| R | cue-keyed episodic slot store | GP0 passed, retention-reference gate GP3 failed by my misspecification | first specific write; gated arm wrote more under massed training |
| R2 | same store on change-point streams | GP0 failed at every dose | the write holds nothing that separates signal from control |
All eight stopped at a gate: seven at the dose or specificity gate, and R one stage later, at a retention-reference gate I had written for the transformer’s flat retention rather than the leaky GRU’s, so its predictions were not scored either.
The eighth run explains the other seven
Amendment R found the first write that was specific. A content-keyed slot store wrote on both streams (the control wrote on 8 of 8 reinforcements against 4 to 4.5 on the contingent stream), but only the contingent stream acquired through the store: 0 to 2 of 64 false acquisitions on the shuffled control. The specificity was in the readout, not in the writing. But the gated arm wrote more under massed training than spaced, the reverse of what a surprise gate is supposed to do. Surprise is measured against the meta-trained prior, and the prior is best exactly where the contingency is clearest. Where the prior is good, the gate is silent.
R2 moved the test to streams where the prior is wrong: a non-contingent prefix followed by a switch to contingency. The gate fired. But it fired only when a reinforcer happened to land shortly after a cue, because that is the only event that is surprising on a non-contingent background. Half of what the store held at the switch was written before the switch, and the stored waits were biased short: a median of 1.26 log units against a true post-switch value of 1.91 and a background value of 4.68. The same bias was written on the real stream and on its control, so the store could not tell them apart at any confidence dose. Where the prior is wrong, the gate is a biased sampler. The next post works through that diagnostic.
That pair closes the operationalisation. A write gated on prediction error relative to a good meta-trained prior is silent in distribution and selection-biased on change-point streams. Among the two regimes tested there is none left for it on this substrate; contingencies with C/T or T outside the training range, the third route named after R, were not run.
What these outcomes close
They close the error-surprise gate on a frozen leaky GRU with a slot store and a running-mean update, as an operationalisation. They do not close the write channel, and under the frozen rules none of them is a null on the idea: the predictions were never scored. The diagnostic points at a different trigger: write when the inference arm’s own belief changes, not when prediction misses, and replace slot values instead of averaging them. That is a write gated by inference, which is what the decomposition said from the start, and it is the next hashed file.
Why hash at all
Because the week would otherwise have produced a paper. One of the eight runs, R, showed a spaced-over-massed effect on the write-only readout with confidence intervals that excluded zero, in a cell that was not pre-specified and in the ungated arm as well as the gated ones, which is why it is exploratory and is reported as such. The cost of the discipline was eight gate outcomes in a week and no scored prediction. The benefit is that the one mechanism that did come out, the biased sampler, is an exploratory diagnostic I can describe exactly, with its label on, rather than a result I would have to defend.
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.