What the memory chooses to write down

Give a model a memory it controls, and it has to decide, word by word, how hard to write each one down. Nobody specifies that policy — it is learned. So it is a rare chance to ask a question this project kept failing to answer from the outside: when a network chooses its own notion of what matters, what does it choose?

The predictions were written before looking. Two failed, and a third check weakened the headline. That is the useful part: the page separates what the memory seemed to do from what actually changed the model's output.

The question, and why it is not obvious

This project spent a long campaign trying to make training more selective by hand — paying more attention to surprising words, to words the model was improving on fastest, to rare ones. Almost all of it failed. Meanwhile the mechanisms where the network works out its own selectivity kept winning. Five interventions, five losses →

The has exactly such a learned dial: a computed fresh for every word. So we can go and look. If the gate turns out to compute surprise, then our hand-built attempts failed on details. If it computes something else entirely, that is a reason they failed at all.

What we predicted, written down first

Registered before the analysis ran

, each with the outcome that would overturn it. Two of the four were overturned, and one of those is the most informative line on this page.

  1. confirmed

    The gate tracks surprise, modestly.

    Barely, and at the very bottom of the predicted band. The residue dies entirely once word identity is controlled for.

  2. falsified

    Rare words are written hardest.

    Inverted. The hardest-written words are the common ones, because sentence boundaries are common.

  3. confirmed

    Different heads settle at different write strengths rather than all doing the same thing.

    Per-head mean write strength spans 0.21 to 0.68 inside a single model.

  4. falsified

    Erasing the soft mid-word writes is the least damaging intervention, since the model barely writes there.

    Consistently worse than the count-matched random control. A soft write is not a skipped write, which the correlations alone could never have shown.

What it actually tracks

Rank correlation between the write gate and each candidate signal. Each bar spans the three independently trained models; zero means no relationship.

token frequency0.348 (0.304–0.412)surprise (the memory’s own retrieval error)0.128 (0.079–0.153)loss (how hard the next word was)0.026 (0.017–0.045)position in the window-0.017 (-0.023 to -0.012)entropy (how unsure the model was)-0.052 (-0.072 to -0.027)-0.0720.412
Median per-head rank correlation, three independently trained models. bar = min-to-max across seeds · ring = mean · dot = one seed.

The gate essentially ignores how hard the next word was to predict — the correlation with loss is close to zero on every run. Whatever it is doing, it is not spending its memory on difficulty.

The answer shows up when you ask which words get written hardest. On every run they are sentence and clause boundaries — full stops, question marks, newlines, commas, and the Bulgarian words that open a subordinate clause (че, да) or join things (и).

The softest-written are word-internal fragments and little unstressed particles: endings like -ите, -ката, clitics like му, си.

The gate is not a curiosity signal. It commits memory at the joints of the sentence, and writes softly through the middles of words.

Testing it by breaking it

Correlation is not evidence that the policy matters. So we overrode the gate during evaluation and measured the damage. Higher is worse, and the marked row is the control: it erases the same number of writes, chosen at random, so the comparison is fair.

erase the writes at boundaries0.300 (0.274–0.336)✓ real (+0.194)erase the same number mid-word0.125 (0.107–0.141)→ all 3 seeds (+0.019)erase the same number at randomthe count-matched control0.106 (0.097–0.116)3 seeds · referenceforce hard writes mid-word0.090 (0.081–0.095)0.0810.336
Damage done by overriding the gate, against the count-matched random control. bar = min-to-max across seeds · ring = mean · dot = one seed.

Erasing the boundary writes costs about three times as much as erasing the same number of random ones, on every run. The policy is load-bearing, not decorative.

The soft mid-word writes were the surprise. Erasing them was expected to be least damaging, since the model barely writes there. It was consistently worse than random.

A soft write is not a skipped write: those positions carry above-average content per word. "Write gently here" and "write nothing here" are causally different, which the correlations alone could never have shown.

The last row completes the picture. Forcing hard writes mid-word — adding information rather than removing any — also hurts. Both ends of the learned policy are protective: hard writes at boundaries carry the content, soft writes mid-word keep it from being trampled.

The downgrade we had committed to in advance

Before running the next check we wrote down a rule: if the gate turns out to be predictable from the current word alone, ignoring all context, then calling it a "detector" is too generous and the claim has to be weakened to a "policy".

How much of the gate's behaviour is explained by word identity alone, across the three models. 1.0 would mean it is a pure lookup table.

explained by word identity alone
layer 00.944 (0.931–0.960)
layer 10.976 (0.970–0.981)
layer 20.942 (0.930–0.959)
layer 30.893 (0.883–0.908)

About 90% at every depth. The clause fired, so the headline is narrower than we wanted: the model learned a word-class write policy, not a context-sensitive boundary detector.

Those numbers come from a short training run, and a gate that has not finished training is exactly the thing you would expect to still be reading the current word. So we trained the same model thirty-two times longer and measured again.

The share falls to 87% and then stops falling, running 78% to 92% by depth rather than about 90% everywhere. The verdict holds; its size was inflated by undertraining. Quote 90% as the short-run figure, not the settled one.

The honest statement of the finding is therefore this. Given complete freedom to base its write strength on the entire context, the network converges on a mostly static policy aligned with sentence structure — and not on surprise or difficulty, which are exactly the context-dependent quantities it had every opportunity to use and demonstrably ignores.

The breaking test above is unaffected: the policy is load-bearing however it is computed.

The replication that killed the boring explanation

There was still a deflating reading available: boundary marks are common, so maybe the gate just tracks common words. The frequency correlation in the first table is the strongest one there, which is uncomfortable.

So we ran the whole thing again on a different language, a different alphabet and a different way of splitting text — English Shakespeare, one character at a time. Now boundary marks are rare rather than common, so the two explanations predict opposite results.

The boundary behaviour survived: the hardest-written characters are punctuation, newlines and capital letters, which in a play mark line starts and changes of speaker. And the frequency correlation flipped sign, from about +0.35 in Bulgarian to about −0.24 in English.

Structure is the thing that stayed. Frequency was its shadow, and it moved when the corpus moved.

Honest limits

The two models behind this, one with ordinary attention and one with the fast-weight memory, can be inspected side by side: two ways of paying attention →

The memory audited here turned out to be level with ordinary attention rather than behind it, once both were given the same sense of word order, and adding a second gate that forgets changes what that order signal is worth: telling a model the time, when it already knows →