Manuscript Offprint

arXiv:2608.30376

Kathleen Remembers: Length-Invariant One-Shot Recall Without Attention

George Fountzoulas

Abstract

Recurrent, attention-free sequence models — the family to which Kathleen belongs, alongside state-space models and linear-attention variants — share a known structural weakness: a fading state cannot perform exact recall of something seen once, far in the past. The transformer answer, quadratic-cost attention over a growing window, is exactly what this series set out to avoid. We add to the Kathleen trunk a second memory layer — a notebook: a fixed-key holographic (HRR) associative store with a learned local write gate, a self-gating raw read, and write-triggered forgetting — 25K parameters that attach to the logits of any trunk. (1) Mechanism. On a controlled needle-in-haystack task, the notebook reaches 80–82% one-shot recall at 4× the training length (learned gates, two seeds) where the bare trunk scores ~4% and a parameter-matched attention head scores 100% inside its training length and 0% beyond it. The route to this result is reported as a ten-round, fully pre-registered forensic sequence: three independent length leaks (gate receptive fields too narrow to represent the correct write rule; ℓ2\ell_2 normalization amplifying empty-memory noise; trained trunk logits drifting out of range at unseen lengths) are isolated with oracle gates, counterfactual read-outs, and gate autopsies, and each is closed by construction rather than by tuning. The final design’s addressing is length-invariant by construction — fixed random content keys composed over a 7-byte window with unitary role keys — and the memory alone, untrained, recalls at 90% accuracy identically at 512, 2048 and 4096 bytes. Because the store is a linear superposition, two capabilities follow from arithmetic alone: selective unlearning — one subtraction erases one fact to chance (4.3/3.1%, chance 3.8) while retained facts are unharmed (84%), at both lengths — and per-token attribution — counterfactual erasure names the source fact of every correct byte with 100% provenance, at zero interference with ordinary prediction. (2) Real text. On WikiText-2 bytes, the notebook improves prediction of repeated rare words by +0.15–0.27 bits/byte over the same trunk, the gain growing with the distance between mentions and holding zero-shot at 4× training length, at zero overall cost; the write gate learns with no supervision to spend its ink on content words ( β=0.28\beta = 0.28 on repeated-word bytes vs 0.19 elsewhere). Write-triggered forgetting — decay tied to write mass, not to time, so no clock re-enters the design — eliminates the only observed failure mode (memory pollution at 8× length: first-mention cost +0.33 → -0.004). (3) Scope and scale. Two honest boundaries: a parameter-matched attention head does generalize on natural-text repetition (its collapse is specific to surgical one-shot recall), so the notebook’s claim is exact recall at O(L)O(L), not repetition in general; and attached to a word-level model the notebook is largely absorbed — exact recall needs questions with exact answers, which bytes provide and words do not. Within its habitat the value scales: on a WikiText-103 ladder (8 → 32 → 128 → 512 MB) the notebook’s zero-shot repeat gain rises monotonically (+0.06 → +0.11 → +0.15 → +0.16 bits/byte, two seeds at the top rung) at zero-to-negative overall cost throughout. Memory, in this family, is not a small-model crutch but a capability that matures with the model. All experiments are pre-registered, seeds reported, and reproducible on a single free-tier GPU.

1 Introduction

Papers 1–3 of this series built a byte-level, attention-free architecture — wavetable encoding, multi-scale reverberant state, causal convolutions — and showed it classifies [19], learns without pretraining, and writes [20], at sub-million parameter scale, beating parameter-matched transformers on data scaling throughout. Paper 3 closed with a diagnosis rather than a victory lap: the reverberant state is a lossy compressor by design. It holds a fading summary of everything, and therefore an exact copy of nothing. Ask a Kathleen model to reproduce a key-value pair it saw once, two thousand bytes ago, and it fails — not from lack of scale but from the shape of its memory. The same diagnosis applies, in the published record, to the whole attention-free family: state-space models [3, 4] and linear-attention variants [7, 5] trade the transformer’s total-recall window for O(L)O(L) cost, and give up exact long-range recall in the bargain.

This paper adds the missing organ. The design goal was set by three constraints the series already committed to: O(L)O(L) (no quadratic window), constant state (a fixed-size memory, not a growing cache), and byte-native (no tokenizer, no positional table). The result — we call it the notebook — is a 25K-parameter module that attaches to the logits of any trunk:

• fixed content keys: every byte value owns a random unit vector in d=2048d = 2048 dimensions, drawn once and never trained; keys for a position are composed from the last 7 bytes with unitary role vectors (an nn-gram bundle in the HRR/holographic tradition [1, 2]). Addresses depend on what the text says, never on where — length generalization by construction, not by hope.

• a learned local write gate: a small causal convolution over a 16-byte window decides what is worth writing. It cannot see sequence length, absolute position, or global state — so it cannot learn a length-dependent policy even by accident.

• a self-gating read: the retrieved vector’s raw magnitude is the gate. An empty or irrelevant memory returns near-zero and adds nothing; a hit returns a large vector and speaks. No read gate is learned, because none is needed.

• write-triggered forgetting: each write erases a little of what came before (mem ← (1 - gβ) mem + β write). Decay is tied to write mass — to content — not to elapsed time, so no clock re-enters the design and junk cannot accumulate with length.

The contributions, in the order the paper argues them:

  1. A mechanism result. One-shot key-value recall at 4×4\times the training length with fully learned gates (80–82%, two seeds), where the bare recurrent trunk scores ∼4%\sim4\% and a parameter-matched attention head scores 0% (Section 3). The memory path alone, untrained, is length-flat to at least 8×8\times (90% at 512/2048/4096).

  2. A forensic method result. The path to (1) required isolating three independent length leaks — none of which was the memory itself. We argue the isolation tools (oracle gates, counterfactual read-outs, gate autopsies at two lengths, pre-registered verdicts for every round) are as reusable as the design (Section 3.3).

  3. An algebraic-consequences result. Because the store is a linear superposition, erasure is subtraction and provenance is counterfactual subtraction: one fact is unlearned to chance with the others unharmed, and every correct byte names its source fact with 100% provenance — both length-invariant, both without retraining (Section 4).

  4. A real-text result. The notebook pays on natural text exactly where theory predicts — repeated rare words at distance — at zero overall cost, with an unsupervised write gate that discovers content-word salience (Section 5).

  5. Two honest boundaries. Attention does generalize on loose natural-text repetition (its zero-shot collapse is specific to exact recall); and the notebook is absorbed by a word-level model, because words do not ask questions with exact answers (Section 6).

  6. A scaling result. On an 8→5128 \rightarrow 512 MB data ladder the notebook’s zero-shot value rises monotonically (+0.06→+0.16(+0.06 \rightarrow +0.16 bits/byte, two seeds at the top rung, zero-to-negative overall cost throughout): memory in this family matures with the model instead of being replaced by it (Section 7).

References (18)