How LLMs Could Place Explicit Memories

From Memorizing Transformers to Latent Sparse Attention, and the placement neither has

In December 2021 I sent Markus Rabe a short note. I was attending, online, the weekly reading group that Christian Szegedy ran, and as I recall the group had been discussing the work on memory that Rabe, Szegedy and two colleagues would post three months later. The note built on that work:

Can we synthesize scratchpads using the dataset-rearrangement-by-memory-retrieval idea? If we iteratively fine-tune a language (decoder) model on the rearranged dataset, the model learns to predict the retrieval inserts. To get this effect to work, we should not penalize inserts if the predictions following them are successful. Emergent scratchpad behavior!

The proposal had two halves. Train a model on text interleaved with what a retriever would have fetched, and the model starts to produce that material itself. Spare the material that helped with what came next, and the model starts to keep notes. The note also asked whether, given the right curriculum, such a model would invent the right-to-left school algorithm for long multiplication or the left-to-right expert one, a contrast taken from a study in the ACT-R cognitive architecture.

The paper appeared in March 2022 as Memorizing Transformers, by Yuhuai Wu, Markus Rabe, DeLesley Hutchins and Christian Szegedy. Its abstract opens with a wish: “Language models typically need to be trained or finetuned in order to acquire new knowledge, which involves updating their weights. We instead envision language models that can simply read and memorize new data at inference time, thus acquiring new knowledge immediately.”

Four years later that wish has been granted at a scale nobody then proposed. In October 2026, Latent Sparse Attention read ten million tokens with a fixed number of keys per query. Earlier the same month, Memorilla gave a frozen model a persistent store of documents, read through sixteen tokens.

This essay follows that line and asks where a language model should place what it reads. A memory can be placed by position, where it arrived; by content, what it resembles; or into connections, what it taught. Every Layer a Store described the stores of the 2026 models, and Filling the Stores described how they are trained. Here the subject is explicit memory: facts and episodes that a model should be able to find again. The line traced here is one of ideas, not of citations. Latent Sparse Attention cites none of the 2022 and 2023 papers below, and Memorilla comes from a different literature altogether.

1. A memory beside the context

Memorizing Transformers added one thing to a transformer: a layer that could read a long record of its own past. The main runs used the ninth of twelve layers. Each head of that layer kept the most recent (key, value) pairs of the document, up to a size M, and the record was cleared when a new document began. For each query the layer found the 32 most similar keys by approximate nearest-neighbour search and attended to those alone. A learned scalar for each head mixed this read with ordinary local attention.

Three of its design choices set the terms for everything after.

The memory was non-differentiable. In the paper’s words, “gradients are not backpropagated into the external memory”. Keys and values were stored as computed and never revisited, which the authors call “critical to the scalability of our technique”.

The memory held the model’s own representations. Earlier retrieval methods such as REALM and RAG fetched text from a corpus and put it in front of the model. kNN-LM and neural caches intervened at the output. Memorizing Transformers kept internal keys and values from the model’s own reading, so its retrieval was a form of attention. That branch is the one that survived.

The keys went stale. Because a long document spans many training steps, the query that reads a key is computed by newer weights than the ones that wrote it. The section of the paper on this problem is titled “Distributional Shift”. The authors normalized keys and queries, and they admit the limit of the fix: “Normalization does not eliminate staleness, but it at least ensures that older keys and newer keys do not differ in magnitude.” Training from scratch with a very large memory was sometimes unstable, so they pretrained with 8K and fine-tuned upward.

The results justified the machinery. Perplexity improved on all five corpora: web text, mathematics papers, books, code and formal proofs. It kept improving as memory grew to 262K tokens. At 1 and 8 billion parameters, an 8K memory matched a vanilla model about five times larger. A pretrained model fine-tuned to use memory closed 85 percent of the gap to one trained with it within 20,000 steps.

The gains concentrated on rare tokens: names, citations, function names. The Isabelle corpus of formal theories gave the clearest case. To name a lemma, the model often looked up its definition: “the model looked up the definition from earlier in the proof”. The authors checked ten such predictions by hand and found the needed body in eight. That is the explicit memory this essay is about, a fact the weights do not contain, found where it was written down.

2. Teaching the memory to ignore distractors

Scale brought a new failure. A nearest-neighbour memory works when the right key stands out, and as a store grows, more keys compete with it. Every Layer a Store treated long context as an interference problem in general. In 2023 the problem got a name and a training procedure.

Focused Transformer, by Szymon Tworkowski and colleagues, follows Memorizing Transformers in its memory layers (“we follow most of its design choices, except for the gating”) and calls the failure the distraction issue. Its remedy is crossbatch training. Each slot of a batch holds one document, and the memory layers attend, in a single softmax, to the current context, to the previous context of the same document, and to previous contexts of other documents in the batch. The other documents act as negatives. No separate contrastive loss is needed. The ordinary objective teaches the model to tell its own document’s keys from strangers’. With this procedure, 3B and 7B models handled passkey retrieval at 256K.

The group was also working on retrieval-augmented training that used the batch contrastively. Crossbatch training is a method of that kind, and Focused Transformer’s authors include Wu and thank Rabe and Szegedy.

Landmark Attention, by Amirkeivan Mohtashami and Martin Jaggi, moved retrieval into attention itself. A landmark token represents each block of the context, and the model is trained so that attention to the landmarks selects blocks. Nothing outside the attention mechanism does the choosing. Unlimiformer made the same kind of change to an encoder–decoder, with a kNN index over encoder states inside cross-attention.

Rearranging datasets by retrieval also reached print that year, in two forms. In-Context Pretraining builds a graph of nearest-neighbour documents and walks it to produce a training order. SPLiCe uses retrieval “to collate mutually relevant documents into long and coherent training examples”. Both show that a model learns to use long context better when its training context is relevant. Neither lets the model decide what to insert, and neither spares an insert because it helped. That was the note’s second half.

By the end of 2023 the memory was turning into blocks of the context, read through attention, by a model trained to ignore the wrong blocks.

3. The memory is the cache

Over the next two years the memory became the cache, and the vocabulary followed. Methods such as Quest, InfLLM and MInference select blocks of the key–value cache by simple summaries of their keys, with no training at all. ClusterKV, RetrievalAttention, RetroInfer and IceCache organize the cache by content, through clusters, graphs or trees, at inference time. Reformer and the Routing Transformer had tried content addressing at short context years before.

Then labs built selection into the models, in three designs of 2025 that train it natively. DeepSeek’s Native Sparse Attention (NSA) runs three branches side by side and mixes them by a learned gate. One attends to compressed blocks of the context, one to the original tokens of the blocks the compressed branch scored highest, and one to a window of recent tokens. Moonshot’s Mixture of Block Attention (MoBA) routes each query to blocks of the context, as a mixture of experts routes each token to experts. The query scores every earlier block by the mean of its keys, reads the best few, and always reads its own block. The router has no parameters of its own.

DeepSeek Sparse Attention selects single positions with a small learned indexer, and Every Layer a Store describes how the 2026 models use it. In that essay’s words, “A selector is a second, cheaper store placed in front of the first.” Filling the Stores records the newest case. Kimi K3.1 Pro’s post-training added indexers to a model released without them.

So the store is no longer beside the context, and the question has moved. Within the window, nothing is thrown away. The question is what to read. The cost of answering it became the bottleneck. In the sparse attention of GLM-5.3-Flash, as the Latent Sparse Attention paper measures it, “at 10M tokens, 98% of the prefill time of a sparse attention layer is spent on indexing”. The indexer still scores every key, so sparse attention had made reading cheap and left finding expensive. CISA adds selection to models trained with full attention, NVIDIA’s Nemotron 3 among them. It scores fixed-size chunks of the cache by compact summaries of their keys, and its own measurements show the same cost. At a million tokens its core attention decodes 13.0 times faster than dense attention, and 3.0 times faster once chunk scoring and selection are counted.

4. Ten million tokens

Latent Sparse Attention, by Ales Kubicek and colleagues at Prefrontal AI and ETH Zurich, with James Whittington as senior author, replaces that scan with an index. (Two other 2026 methods share the abbreviation: Meituan’s LongCat Sparse Attention and Lookahead Sparse Attention. Below, LSA means the Latent one.)

The keys are projected into a small latent space, normalized, pooled four at a time, and clustered bottom-up into buckets, each with a centroid and a list of key positions. A query scores centroids rather than keys, takes the best buckets, and attends to a fixed number of long-range keys, plus a few sink keys and a recent window. Flat search scores every bucket. Tree search descends a hierarchy of them, so a query scores O(\log T) centroids and prefill becomes subquadratic. A robot searched its memory the same way two decades earlier. SAIL, short for Self-organizing, Autonomous, Incremental Learner, was a developmental robot in Juyang Weng’s lab at Michigan State University. It kept its experience in a tree of prototypes, Incremental Hierarchical Discriminant Regression, which found the best match “in a fast logarithmic time” and added a prototype whenever an input differed enough from it.

The distilled variant, D-LSA, retrofits a released model. On Qwen-3.8-27B at ten million tokens it scores 63.9 on RULER against 59.9 for full attention, and 29.1 against 19.8 on PaperTrail, a new benchmark. In one layer it runs 72 times faster than full attention in prefill and 42 times faster in decode. Served end to end on eight H200 GPUs, full attention takes 4,582 seconds to its first token at that length, about 76 minutes. D-LSA takes about 500.

The other test model gives a more sober picture. On GLM-5.3-Flash, D-LSA replaces DeepSeek Sparse Attention and trails it on RULER by up to about 8 points at 2 to 5 million tokens, and by 6 to 7 points on PaperTrail. Tree search, the part that makes the method subquadratic, loses accuracy faster than flat search past a million tokens (55.8 against 66.8 on RULER at ten million, on GLM). LSA makes finding cheap, and on one of two models it is at least as accurate as full attention.

Nor is ten million the record. LSA’s own table lists HSA-UltraLong at 16 million, and Memory Sparse Attention, discussed in Section 6, reports 100 million.

Figure 1. The largest store each method was tested with, on a log scale. In 2022 and 2023 the memory sat beside the context. Since then the context has been the memory, with one exception that keeps a pooled store. Memorilla has no point on this axis: its store is counted in documents, and its reads in sixteen tokens. Figure 1. The largest store each method was tested with, on a log scale. In 2022 and 2023 the memory sat beside the context. Since then the context has been the memory, with one exception that keeps a pooled store. Memorilla has no point on this axis: its store is counted in documents, and its reads in sixteen tokens.

Long-context attention is retrieval. The paper’s Appendix A runs an oracle on Qwen-3.8-27B at 128K, on RULER. “Top-k Oracle Attention keeps 98% of the RULER accuracy of Full Attention down to k = 512, while each query attends to 0.8% of the keys.” Each query also keeps a 4-token sink and a 512-token window, and one list of keys serves all heads. This is the empirical licence for the whole line: on this task, most of what attention reads, it does not need.

PaperTrail and the Isabelle lemma. PaperTrail plants a trail of fabricated facts in unseen 2026 arXiv papers and asks questions that connect them. It tests what Memorizing Transformers showed in Isabelle, the use of a fact met only in context. Because the facts are fabricated, recall cannot come from the weights.

The two ends of the line compare as follows.

Memorizing Transformers (2022) Latent Sparse Attention (2026)
Store a per-head cache beside the local context the key–value cache itself
Read by one layer, gated against local attention every attention layer
Index approximate kNN hierarchical clusters in a learned latent space
Staleness keys from older weights, in training buckets fixed once built
Gradient into selection none none, or a KL target from a frozen model
Largest scale tested 262K 10M

In both designs the weights learn nothing at test time. Both separate a store from an index over it, and the separation has survived every change around it. LSA’s authors state what it leaves undone: “LSA reduces the cost of finding the keys, but not of storing them, and the KV cache still grows linearly with the context.” The cache is also written in one model’s key space, and it ends with the session.

5. Who teaches the index

Filling the Stores explains why a selector needs a teacher and how retrofits like D-LSA get one. D-LSA’s indexer trains on 352 million tokens to match, by KL divergence, the attention of the frozen layer it serves, and nothing else in the model moves. The paper’s second version traces distilling from a trained model to Schmidhuber’s 1992 work on history compression. A native variant, N-LSA, needs no teacher: it clusters the attention’s own keys. A training-free variant of D-LSA uses the keys’ leading principal directions.

Who Teaches the Weights? set two conditions on a teacher: it must know more than the student, and its targets must be ones the student can absorb. The indexer meets both in a clean form. Dense attention knows more, because it has looked at every key. Its target is a ranking of clusters, which 64-dimensional projections can represent. The student never has to know what any key means, only where the teacher would look.

The training-free variant makes the same point from the other side. Retrieval needs little teaching once the model has learned its keys. CISA is a second case. Its summaries come from keys the model already computes, so it changes none of the model’s weights, and it stays within about two RULER points of full attention at a million tokens. Compare what it takes to teach content. In Where Experience Goes, teaching a model a corpus by fine-tuning took generated text hundreds of times the corpus’s length. Telling a model where to look is cheap. Teaching a model what it read is expensive.

6. Memory moves back out

Earlier in the same month as LSA, the memory left the context again.

Memorilla, by Adibvafa Fallahpour and colleagues at Stanford, Toronto, Penn and MIT, with Jure Leskovec, “separates persistent knowledge storage from the context required for each query”. Its store holds an embedding of each chunk of a document collection, one or two hundred tokens long, computed once by a frozen embedding model and independent of any language model that will use it. A reader of 194 million parameters is trained for each language model. Its inputs are the whole store and the prompt, embedded by the same frozen model. Its output is sixteen vectors in the language model’s token embedding space, which the model receives ahead of the prompt as if they were sixteen extra tokens. The authors call the reading “a continuous, query-conditioned read over all stored documents rather than a discrete top-k selection”. “No LLM layer or attention mechanism is changed.” No document text reaches the model either: RAG uses embeddings to find passages, and Memorilla reads the embeddings themselves. The abstract uses this essay’s verb: the module “learns to retrieve and place query-specific information”.

Set beside LSA, it makes the opposite trade at almost every point.

Latent Sparse Attention Memorilla
Store the key–value cache an embedding matrix outside the model
Written by the model’s forward pass a frozen encoder
Bound to one model yes the store no, the reader yes
Lasts the session across sessions
Read sparse, hard selection, every attention layer soft, over every document, once, ahead of the prompt
Fidelity exact keys and values “can lose fine-grained factual details”

So 2026 does not end with memory settled inside the context. In the terms of Where Experience Goes, Memorilla is a new form of the ladder’s third rung, harness memory, held in latent vectors instead of text. LSA strengthens the first rung, the context, and Memorilla the third. Memory Sparse Attention from Evermind and Shanda, not to be confused with MiniMax’s method of the same initials, sits between them: a one-time offline pass over a corpus builds what the paper calls “a structured, retrievable latent store” in the model’s own key space, mean-pooled, and it reports less than 9 percent degradation up to 100 million tokens on MS MARCO, with a 4B model.

Retrieval, even if intelligent

Memorilla matters most as a test of a question left open by the continual-learning series. How far can retrieval go if the retriever is itself trained?

Further than the alternatives. On FactKG, RAG with 50 chunks falls from 78.73 to 51.75 percent as the claims compose one to four facts, while Memorilla stays in the 80s. (Part of that gap is evidence RAG never retrieves, but full context, which reads every chunk, also trails, 80.43 to 84.33.) On NarrativeQA Memorilla beats RAG on “why” and “how” questions, by 4.91 and 7.02 ROUGE-L points, and loses on “who” and “which” by 3.45 and 2.93, though the authors note that question type also varies with answer length and entity frequency. A compressed read keeps structure and loses names. The Isabelle lemma would not survive it. Some models make the same trade inside the cache. DeepSeek-V4’s heavily compressed attention layers pool every 128 tokens into one entry and keep no entry for the tokens themselves, apart from a window of recent ones.

V4 pools every block alike. A store can also write unevenly, keeping more where the text matters more. In Dynamic Memory Compression, by Piotr Nawrot and colleagues, each attention head decides at every token whether to add a new entry or merge the token into its last one, and the trained heads compress the higher layers more. EM-LLM, by Zafeirios Fountas and colleagues, keeps every token but groups the tokens into events, cut where the model’s surprise peaks. Eviction writes unevenly after the fact. Methods such as H2O and SnapKV write every token and later drop those that attention has passed over. Each of these schemes brings back the question of what to keep, and with it the need for a teacher. A read has a teacher at hand, since an indexer can imitate the attention it serves. A write is judged later, when its entry is read or not. DMC trains its choice through the language-model loss, which reaches a write only through reads within the training sequence. EM-LLM uses surprise, which needs no training. Eviction bets that the attention a token has received predicts the attention it will receive.

The limit shows in what Memorilla and RAG both miss. On PersonalizationV4, whose questions each require combining at least two persona facts, many of the shared failures “require linking facts that each appear somewhere in the user’s history, which suggests that the remaining errors come from combining information rather than from failing to find it”. Theory points the same way for a single round of hard selection.

Two hops need two reads. Eitan, Yehudai and Maron study a block built around one full-attention layer. The later layers may read its cache, but only a few entries: those the attention layer weighted most from the current position. The other layers may be recurrent, and the result holds however many there are. The task is composition. The input lists a function f_1 as a table of its values f_1(1),\dots,f_1(n), then a second function f_2 the same way, then a query x, and the answer is f_1(f_2(x)). A read from the query can fetch f_2(x), but the entry holding the answer can be found only after that read: “the query x alone lacks the information needed to identify the full retrieval chain”. When every read is chosen before any returns, the answer’s position must receive enough about f_1 to cover every value f_2(x) might take. The authors prove that this costs capacity of order \sqrt n, where capacity multiplies the width of each position’s vector, its bits of precision, and the number of entries read and layers computed after attention. A model of fixed width cannot pay a price that grows with n. The proof turns such a block into a protocol among three players and applies a known lower bound for pointer jumping.

The remedy follows links the attention layer has already laid down. In the authors’ construction, the entry of f_2’s table at x attends most to the entry of f_1’s table at f_2(x), which comes earlier in the input. Multi-hop retrieval reads, from each entry reached, the entries that entry attended to most. In the terms of The Algebraic Mind Meets the Neural World, each link turns a filler into a role: the value stored at one entry becomes the query that finds the next. With m such hops a block of fixed size computes a composition of m functions, and a composition of m+1 functions again needs size growing with n.

A second route widens a read instead of adding one. Attention over triples of positions, the 2-simplicial attention of Dispersed Minds, Simulated Selves, scores a query against two entries at once, and Kozachinskiy and colleagues show that a cheaper variant built from pairwise scores composes functions in one layer, where one layer of standard attention of modest size cannot. In those terms, multi-hop retrieval is the cheapest case: it scores only the chain from the query to the first entry and from that entry to the second.

The bound concerns one block, whose reads are fixed once chosen. In a deep model a later layer can choose again, from a state that already holds f_2(x), and a reasoning model can take one hop per step. In our reading, the bound says where hops must come from, not that sparse models cannot compose. Memorilla and RAG each read once, from the prompt. A recursive language model takes as many hops as it writes calls.

The reader is trained once and used for everyone. “Train and test users are disjoint on both, so one module serves every user and enrolling a new one requires only embedding their chats.” So its relational work happens at read time. It holds how to read, and nothing about any particular store. We return to what that implies in the next section.

Full context is not an upper bound

The paper’s most striking line concerns the baseline. Full context trails Memorilla on every benchmark except PubMedQA and on 20 of 21 metrics, “so supplying the entire collection hurts more often than it helps”. Recall that D-LSA beat full attention on Qwen at ten million tokens. Two unrelated designs reach the same finding from opposite sides: reading everything hurts. It is the distraction issue of 2023, still with us at the frontier, and it warns against treating a longer context as a free good.

The comparison needs its caveats. The module’s third training stage fine-tunes on “the training splits from all eight evaluation benchmarks”, with extra fine-tuning on the two personalization sets, and full context gets nothing comparable. The ablations do show the gains rest on stored evidence, since replacing documents with noise costs 5.93 points on FactKG, and a LoRA adapter of comparable size with no documents loses on every primary metric, on two of them within noise. The decoders are small, 4B and 8B. Prompts past 32,768 tokens need YaRN. Only one model family has been tested. The latency table measures the read as flat from one document to 512 (2.01 and 1.96 milliseconds). A soft read over every document must grow with the store eventually, which is our inference, and past that point an index of LSA’s kind would matter.

What “continual learning” means here

The paper’s second claim is that Memorilla “enables continual learning”. In TextWorld, a frozen Qwen3-4B agent receives eight memory vectors on top of its full history. Only the module is trained, by GRPO on game score. On held-out games, average success rises from 0.186 to 0.242, and the pass rate from 0.250 to 0.375, while an untrained module falls below the baseline.

Three facts limit this. The evaluation covers 40 prompts, so the pass rates are 15 against 10, with wide overlapping intervals. The store lasts one rollout, and the module is frozen at evaluation, so nothing carries over between games. And the claim that training teaches a new environment “without overwriting prior knowledge” holds because the model never changes, which also means nothing reaches its weights. What the experiment shows is narrower and still useful: a trained reader helps a small model use a context it already has. It does not overturn the claim of Where Experience Goes that in-context learning is the best learner on the ladder, and 4B is a weak in-context learner in any case.

The word “explicit” is under some strain too. Sixteen soft tokens are not an item one could point at and quote. They behave more like gist. The authors see the remedy: the union of Memorilla and RAG, an oracle upper bound, exceeds either alone on every benchmark, and they propose hybrids that combine “the global structure that memory captures with the exact entities that retrieval recovers”.

The exact end of that hybrid already exists, with the model itself as the retriever. In Recursive Language Models, by Alex Zhang, Tim Kraska and Omar Khattab, the prompt never enters the context. It is stored as a variable in a Python environment, and the model sees only “constant-size metadata” about it, such as its length and a short prefix. The model reads the prompt by writing code: it slices and searches the text, and calls itself on the pieces. GPT-5 run this way handles BrowseComp-Plus at six to eleven million tokens, against a window of 272,000, and beats compaction and retrieval baselines by over 29 percent. On OOLONG-Pairs, whose answers each require combining pairs of chunks, F1 rises from 0.1 for GPT-5 alone to 58.0. The store is plain text, so nothing blurs, and no weight update can stale it. The combining that defeated Memorilla and RAG on PersonalizationV4 moves into the model’s own reasoning. The authors list the price: “RLMs without asynchronous LM calls are slow”, and “models without sufficient coding capabilities struggle as RLMs”. Nothing is placed. Each read is a program the model writes, and what it gains from the reading ends with the call.

7. Two ways out of the context store

Consider the two halves of the 2021 note again. Each names a way for what a model reads to outlast the reading.

Consolidation

The first half has the model predict what retrieval would have supplied. That is retrieval distilled into the weights, the move Who Teaches the Weights? describes with the model holding privileged context as teacher. Memorizing Transformers’ abstract ran the other way: read and memorize instead of training. How much does cheap reading take from the case for consolidation? That depends on what consolidation is. The series has given two answers, and they differ.

The deflationary answer comes from Where Experience Goes: “the case for consolidation is the case for amortization”. Paying once in training buys a competence that would otherwise be rebuilt from context at every use. On this view, cheaper reading changes the bill.

The break-even. Let consolidating a competence cost c once. Let each use cost r through the context and w through the weights. Consolidation pays after

n > \frac{c}{r-w}

uses. Take c = 1000, r = 10, w = 0: it pays after 100 uses. At ten million tokens D-LSA’s time per output token on Qwen is 2.87 times lower than full attention’s, so read r as about 3.5, and the break-even moves to about 290 uses. At one million tokens the same table shows no speedup in time per output token, so at that length the bill does not change. The units are invented, and the prefill, paid once a session, is left out.

The concrete payoff follows. At ten million tokens, much of what an agent now keeps in harness memory fits in its context, where it composes better. LSA lets an agent move explicit memory from rung 3 of the ladder to rung 1. It also postpones compaction, whose cost What Breadth Reaches showed through Dwarkesh Patel’s case, where the summary kept what was decided but not why. A small study by Dennis and colleagues puts numbers on that ordering: over ten conversations, three cycles of compaction kept 36.8 percent of the knowledge, nightly LoRA consolidation 80.4, and full context 90.1. Section 6 attaches a warning, since a thing that fits in the context may still get in the way.

The substantive answer comes from What Breadth Reaches. What we call substrate modification is what deep learning calls representation learning: gradient descent “discovers representations that encode the structure of the data: features, abstractions and relations not specified in advance”. Integration across sessions comes in species. For facts about a user: “Retrieval and explicit memory substitute for this with no important loss.” For procedural patterns, substitution works “with some loss but tractably”. For taste it falls short, “because the taste is the integration”. Read cost does not enter that argument, so LSA leaves it where it stood.

The two answers divide the ground. The deflationary one is right about explicit memories, and the substantive one about what consolidation builds beyond them. Memorizing Transformers’ wish, to read and memorize instead of training, is sound within that scope and only there.

Memorilla moves the boundary without erasing it. It shows that a trained reader can do relational work that plain retrieval cannot, so some of what looked like a job for consolidation can be done at read time. But a generic reader has no history with any particular store. The note’s proposal gives a sharper contrast. A model trained to predict its own retrieval inserts learns when a retrieval would help and what it would bring. That is structure over the store, not a copy of any item in it. The experiment worth asking for is a reader, or a model, trained on one store’s history over a long use, and compared with the generic one. The evidence that consolidated facts trail facts in context says nothing either way about representations no retrieved item contains. Consolidation also has a price of its own: Filling the Stores reports that MAI’s self-distillation could erase long-context behaviour unless mid-training data was mixed back in.

Visible reasoning

The second half kept whatever helped: “we should not penalize inserts if the predictions following them are successful”. In March 2024, Quiet-STaR, by Eric Zelikman and colleagues, trained rationales at each token by REINFORCE, rewarding “the log-likelihood of the ntrue true next tokens” against the average over sampled rationales. The paper adds: “We found it useful to exclude the negative reward from the REINFORCE loss term.” That is close to the note almost word for word. It is a convergence, not an influence, since the note was a private email. The wish was in the air: two weeks before the note, MIRI had announced its Visible Thoughts Project, which wanted to “watch the AI think about how to design its output, and to verify that we can get different sensible outputs by intervening on the thoughts”.

Reasoning models then made the scratchpad the main place where retrieved material gets used, by the routes Filling the Stores describes. Retrieval of the note’s kind became one tool call among many. The field split what the note had joined: inserts the model learns to predict, and inserts kept because what follows them goes better. Training on the inserts that proved useful would rejoin the halves, and self-distillation on reasoning traces does part of that already.

The note’s rule was a reward: an insert earned its place by what followed it. Rewards still train what the model writes, as they trained Quiet-STaR’s rationales and train reasoning now. Where the model chooses what to read, the 2026 systems use a teacher instead. Filling the Stores gives the reason: one loss per query is too weak a signal to grade a choice of about a thousand entries among a quarter of a million, so indexers learn by imitating dense attention.

8. Where the brain places memories

The company behind LSA is called Prefrontal, and the paper’s senior author has spent years relating transformers to the brain, though LSA makes no brain claim itself. The comparison below is ours. It helps because the brain uses all three placements, and it shows which one language models lack.

By content. Hippocampal indexing theory, from Teyler and DiScenna in 1986, holds that “the role of the hippocampus is to form and retain an index of neocortical areas activated by experiential events”. The content stays in cortex, and the hippocampus stores where to find it. LSA’s bucket cache is an index over a store in the same sense. The link is older than LSA. In 2021, Whittington, Warren and Behrens showed that “the memory component of TEM can be viewed as a transformer self-attention”, TEM being the Tolman–Eichenbaum Machine, a model of the hippocampal formation, and they called their work “an instantiation of hippocampal indexing theory”.

By position. A review from the Oxford and UCL groups of October 2026, by Mohamady El-Gaby, Kristopher Jensen and many others including Whittington, with Timothy Behrens as senior author, proposes that prefrontal cortex works by duplicated and structured representations: “the abstract structure of the world is embedded locally in connections between prefrontal neurons encoding conjunctions of action and context”. In sequence working memory, monkeys hold each element of a remembered sequence in near-orthogonal subspaces, and recurrent networks trained on the task learn the same “slots - according to ordinal position”. The authors draw the comparison themselves: “These flexible operations over concurrent representations bear a striking resemblance to the transformer architecture”. The review proposes a framework, and we use it as one.

Into connections. “Domain-specific structured knowledge may first arise in the hippocampus, which encodes individual episodes, and then gradually consolidate into the PFC with repeated task experience.” Replay is “ideally suited to catalyse the transfer of the transition structure of hippocampal memories” into prefrontal connections. Note what moves: transition structure, not episodes. Spens and Burgess model the process as “compressive retrieval-augmented generation”, in which replay trains a neocortical generative network that “captures the gist of specific episodes and extracts statistical patterns that generalise to new situations”.

Figure 2. Three placements. The brain uses all three. A language model now has the first two within its context, and nothing that writes into its connections during deployment, apart from a recurrent state that ends with the session. Figure 2. Three placements. The brain uses all three. A language model now has the first two within its context, and nothing that writes into its connections during deployment, apart from a recurrent state that ends with the session.

Mapped onto the ladder, the comparison gives four results.

The split between structure in connections and content in activity matches the split between weights and context. The review describes meta-reinforcement learning as “learning through dynamics”: slow plasticity learns the structure of a class of tasks, after which the circuit “can rapidly adapt to new tasks of the same class through fast recurrent dynamics alone, without further synaptic changes”. Reading that as in-context learning is our step, not theirs.

The key–value cache places content by position, as slots do. LSA adds a content address to that positional store, since its buckets group keys by similarity wherever they sit in the sequence. A language model now holds both kinds of placement within its context, where the brain divides them between prefrontal cortex and hippocampus. Memorilla’s shape is closer to the brain’s: a large separate store read through sixteen vectors, though they are learned and conditioned on the prompt, not ordinal. Its capacity result is suggestive. Going from 16 tokens to 128 moves four of eight benchmarks by less than a point, and two of them drop. In our reading, one reason may lie upstream: each chunk is already stored as a single vector.

The third placement is what the brain has and these systems lack. The hippocampal index drives replay, and replay writes structure into prefrontal connections, building what no single stored episode contains. That is consolidation in the substantive sense. LSA’s index drives nothing once the session ends. A context store with a hippocampal index and no replay is a hippocampus without sleep. Research systems have begun on the missing step: Language Models Need Sleep builds a form of it into the weights, and nightly LoRA consolidation runs on one consumer GPU. We know of no deployed frontier model that does this.

There is a fast form of the third placement. Delta-rule layers write into a matrix at every token, and the second version of the LSA paper itself calls Gated DeltaNet “a form of linear attention”, citing Schmidhuber’s 1992 fast weights. Titans memorizes at test time in a similar spirit. But that store is bounded. It carries settings such as output language and persona, not content, as a study cited in Every Layer a Store found. And it ends with the session.

One disanalogy needs stating. Prefrontal working memory holds a few items, and LSA’s context holds ten million tokens. The brain’s capacity limit is part of what forces consolidation. The model’s limit is cost, which is the break-even of Section 7. That difference touches only the deflationary case. If consolidation builds structure, a brain with unlimited working memory would still need it, and so would a model with ten million tokens of cheap context.

9. Staleness returns

Suppose the third placement arrives. A deployed model consolidates into its weights while it keeps a large indexed context. The cached keys, and LSA’s fixed buckets, were computed by the previous weights. This is the staleness of 2022 again, now at deployment instead of in training.

The problem has a history. In contrastive vision, MoCo observed that keys in a memory bank “are essentially about the encoders at multiple different steps all over the past epoch and thus are less consistent”. Memorizing Transformers cites CrossBatch Memory for the same observation. In reinforcement learning, R2D2 (ICLR 2019) found stored recurrent states going stale under “representational drift”. And it has now reached the serving stack. CacheReforge notes that serving systems “assume consistent model parameters across cache creation and reuse, but adapter evolution breaks this assumption”, and it measures the result: “stale reuse can erase most gains from adaptation”. Loos and Eberle go further: “patching the KV cache from base to fine-tune can partially or fully remove fine-tuned behavior”. A stale cache carries the behaviour of the weights that wrote it. The two ways out of the context store interfere: a store written by old weights can undo what consolidation taught the new ones.

An off-policy problem without a ratio

A context cache is experience recorded by an older checkpoint and read by the current one. That is the setting of Learning About What You Do Not Do, whose worked example E lets “the behaviour policy be an older checkpoint and the target a slightly updated one”. Filling the Stores shows the labs living with this in RL, where rollouts from older weights are capped, masked or corrected.

The comparison holds up to one point, and the point explains why this case is harder. For tokens, a language model’s importance ratios are exact, so a stale rollout can be reweighted. A stale key has no ratio. It is not a sample with a probability under one policy and another. It is a vector computed by a function that no longer exists. Memorizing Transformers calls this a distributional shift, but it is closer to a change of coordinates, and reweighting does not change coordinates. An index adds a second thing to go stale. D-LSA’s projections were distilled from a frozen teacher, so a weight update stales the index space as well as the keys (our inference, since no paper we found addresses it). The two fail differently. A stale index changes only which keys are read, so it costs recall, and what it does read is still exact. A stale key changes what is read. The training-free variant could be refit cheaply, which may turn out to be its main advantage.

Five remedies

Each remedy has precedents.

Re-encode. This is the on-policy option: run the context again under the new weights. Vision calls it backfilling, and R2D2’s burn-in is a partial form. Its cost is a prefill, and LSA makes that about nine times cheaper at ten million tokens, which still leaves some eight minutes on eight GPUs for a single context. CacheReforge shows it need not be complete, recomputing 5.44 percent of layers in its adapter setting. Fast prefill turns out to serve the third placement as well as the first.

Tolerate. Normalize, and let the queries adapt. Memorizing Transformers reports that “models seem to be able to cope with a limited degree of staleness (with the small memory) by adjusting their queries accordingly”. The parenthesis matters: the evidence comes from an 8K memory, and normalization fixes magnitude, not direction.

Translate. Learn a map from the old key space to the new. Iscen and colleagues did this for continual learning, Drift-Adapter maps queries the other way for vector databases and leaves the store untouched, and Heo and colleagues fit one between the caches of different models. CacheReforge states the objection for a single model: “Directly correcting historical K/V states from the adapter update is generally insufficient because downstream states also depend on update-altered hidden representations.” A key at a deep layer depends on everything below it.

Constrain. Change the weights only in ways that keep old keys valid. Backward-compatible training does this for embeddings, and MoCo’s slowly moving encoder is a soft form. The off-policy analogue, in our reading, keeps the target near the behaviour.

Keep keys the model did not compute. LongMem in 2023 used a frozen backbone as memory encoder, which “effectively resolves the issue of memory staleness”. Memorilla goes further, with an encoder outside the model altogether: “Freezing both backbones keeps the store portable and the decoder untouched, at the cost of an encoder never optimized for compression.” A decoder update leaves such a store valid. In off-policy terms, the log is kept in a language no policy update changes. Text is the limiting case, and it costs a re-read. Recursive language models, in Section 6, show the re-read need not be whole. By our inference, the staleness moves to the reader, which is trained for one decoder, and Memorilla pairs encoders and decoders of one family, so the claim is still untested.

The only key that cannot go stale is one the model did not compute. That gives a reason, beyond cost, why memory may not stay in the cache. A cache in the model’s own key space is exact and fragile. A store outside it is durable and vague. A model that learns as it goes will need to decide which of its memories it can afford to keep in its own coordinates.

What the model keeps

In 2022 a model looked up a lemma’s definition from earlier in the same proof. In 2026 a model finds a fabricated fact in ten million tokens of papers it has never seen. Both forget when the document ends. A store outside the model no longer forgets, but it blurs the fact. A model that reads its context as text, through programs it writes, keeps the fact exact for the length of a call. In every case, the model comes away from what it read unchanged.

That was the point of the note. It did not ask for a bigger memory. It asked for a model that learns from what it retrieves. The line from Memorizing Transformers has made the reading vast and cheap, and Filling the Stores ended on how little one can tell about what a store holds by reading its numbers. The first placement and the second are now in hand. The third is still open, and it is the one the continual-learning series was asking about.


Sources. The memory line: Wu, Rabe, Hutchins and Szegedy, Memorizing Transformers, arXiv 2203.08913 (ICLR 2022); Tworkowski, Staniszewski, Pacek, Wu, Michalewski and Miłoś, Focused Transformer, arXiv 2307.03170; Mohtashami and Jaggi, Landmark Attention, arXiv 2305.16300; Bertsch, Alon, Neubig and Gormley, Unlimiformer, arXiv 2305.01625; Shi, Min, Lomeli et al., In-Context Pretraining, arXiv 2310.10638; Staniszewski et al., Structured Packing in LLM Training Improves Long Context Utilization, arXiv 2312.17296. Sparse attention: Yuan et al., Native Sparse Attention, arXiv 2502.11089 (ACL 2025); Lu et al., MoBA, arXiv 2502.13189; Dabbah et al., CISA, arXiv 2611.03200; Huang and Weng, “Novelty and Reinforcement Learning in the Value System of Developmental Robots”, Epigenetic Robotics 2002 (Lund University Cognitive Studies 94); Weng and Hwang, Incremental Hierarchical Discriminant Regression, IEEE Transactions on Neural Networks 18 (2007), 397–415; Kubicek, Caciolai, Peng, Sumant, Hoover, Greenlee, Battleday, Urban, Hoefler and Whittington, Latent Sparse Attention, arXiv 2610.42147 (v2) and code; Chen et al., Memory Sparse Attention, arXiv 2603.23516; Eitan, Yehudai and Maron, arXiv 2610.25250; Peng, Narayanan and Papadimitriou, On Limitations of the Transformer Architecture, arXiv 2402.08164 (COLM 2024); Kozachinskiy et al., Strassen Attention, Split VC Dimension and Compositionality in Transformers, arXiv 2501.19215 (NeurIPS 2025). Uneven writing: Nawrot, Łańcucki, Chochowski, Tarjan and Ponti, Dynamic Memory Compression, arXiv 2403.09636 (ICML 2024); Fountas et al., EM-LLM, arXiv 2407.09450 (ICLR 2025); Zhang et al., H2O, arXiv 2306.14048; Li et al., SnapKV, arXiv 2404.14469. External memory: Fallahpour, Idehpour, Kothapalli, Mounier, Wu, Pardis and Leskovec, Memorilla, arXiv 2610.21375 (v3) and code; Zhang, Kraska and Khattab, Recursive Language Models, arXiv 2512.24601 (v3). Reasoning: Zelikman et al., Quiet-STaR, arXiv 2403.09629; Soares, “Visible Thoughts Project and Bounty Announcement”, LessWrong, 30 November 2021. Neuroscience: Teyler and DiScenna, Behavioral Neuroscience 100 (1986), 147–154, and Teyler and Rudy, Hippocampus 17 (2007), 1158–1169; Whittington, Warren and Behrens, arXiv 2112.04035; Whittington, Dorrell, Behrens, Ganguli and El-Gaby, Neuron 113 (2025), 321–333; El-Gaby, Jensen et al., PsyArXiv j75zw (2026); Spens and Burgess, Nature Communications 17 (2026), 7971. Staleness: He et al., MoCo, arXiv 1911.05722; Kapturowski et al., R2D2 (ICLR 2019); Cao, Mu, Fang and Chen, CacheReforge, arXiv 2609.30884; Loos and Eberle, arXiv 2610.41480; Wang et al., LongMem, arXiv 2306.07174; Shen et al., arXiv 2003.11942. Checks are in notes/research/citecheck-retrieval-lineage-2026-11-03.md and citecheck-retrieval-lineage-predraft.md.

This article was co-authored by Łukasz Stafiniak and Claude (Opus 5.5).