Rajesh Ranjan MahapatraMind Frontier papers

Mind Frontier · No. 45

The KV cache as working memory: does a transformer's store of its context meet the criteria Baddeley and Cowan set out?

Rajesh Ranjan Mahapatra

The cache keeps every token exactly and lets nothing fade, yet the model reading it shows the classic limits of working memory: crowding, a sagging middle and old versions that win. The limits live in the reading, not the keeping.

© 2026 Rajesh Ranjan Mahapatra. 67 min read

The KV cache as working memory: does a transformer's store of its context meet the criteria Baddeley and Cowan set out?

The cache keeps every token exactly and lets nothing fade, yet the model reading it shows the classic limits of working memory: crowding, a sagging middle and old versions that win. The limits live in the reading, not the keeping.

TLDR

  1. Claim: the KV cache keeps like long-term memory and reads like working memory. Its limits live in the reading, not the keeping.
  2. Mechanism: every token leaves an exact key and value at every layer; each new query is matched against all keys and blends the best-matching values.
  3. Evidence: recall sags in the middle of long contexts; usable length falls short of claimed length; a few tokens draw most attention.
  4. Replication: in a 360M model, 1,000 tokens of unrelated filler did no harm, look-alike facts did, and after three updates the latest value almost never won.
  5. Decision: run the five-measurement Handover Audit, and keep anything that changes on a short sheet, rewritten every turn and placed last.

Kavya Menon runs the platform team at Kayal Health, a telehealth company in Kochi. Its triage assistant, Nidhi, talks to patients and their families on WhatsApp before a doctor joins the call. Nidhi collects symptoms, checks medicines and drafts a note for the doctor. Most chats are short. Some run for weeks, because a family keeps one thread open for an elderly parent and comes back to it whenever something changes.

In October a model vendor pitches an upgrade. The new model takes a million tokens of context. The slide says: "Nidhi will have working memory. Put the whole patient history in the context and stop maintaining a separate record". Kavya's team has spent a year building that record, a small database of current medicines, allergies and conditions that Nidhi reads at the start of every reply. The vendor is offering to make it unnecessary.

The same week, a doctor flags a chat. George Thomas is 71 and lives in Thrissur. His daughter Ann has kept a thread open for him since June. In the fourth message of a long exchange she wrote that his cardiologist had stopped warfarin and started apixaban. Forty messages later, George had a toothache. Nidhi's draft note warned the doctor about painkillers and warfarin. Everything it needed was in the context. The old drug and the new one were both there, word for word.

Kavya's question is the one this paper takes up, in the form the programme gave it. Does the KV cache, the store a transformer keeps of everything in its context, meet the functional criteria for working memory that Alan Baddeley and Nelson Cowan set out? If it does, the vendor has a point. If it doesn't, she needs to know which criteria it fails, because those are the places George's medicines will go wrong.

Kayal Health, Nidhi and the Thomas family are invented, and I will come back to them throughout. The research is real. I also ran my own tests of capacity, position, delay, updating and eviction on a small open model. You can rerun them on a laptop.

My answer is: about half of them, and the wrong half for the vendor's slide. The cache passes the criteria about access. What the model can use at any moment is limited. It is spoiled by similar items, it favours the start and the end, and it holds the latest of several versions badly. The cache fails the criteria about keeping. Nothing in it fades, nothing has to be rehearsed, and its size grows with the context instead of being fixed. Nothing in the cache itself does what Baddeley called the central executive.

That gives the thesis I will defend. The KV cache keeps like long-term memory and reads like working memory. The limits that make it look like working memory live in the reading, not the keeping. Cowan's model, in which a small focus of attention moves over a much larger store of activated memory, fits it far better than a model built around a small, leaky box.

The contemplative thread runs through a single line of the Yoga Sūtra. It defines memory as asaṃpramoṣa, the not letting slip of what has been experienced. The cache lets nothing slip. Yet George's medicines still went wrong. The Nyāya philosophers had a word for what was missing: memory needs an awakener. The impression has to be stirred by the right cue before it becomes a memory at all.

Part 1 · Mechanism

What the cache holds, and what working memory means

Map of the Nidhi triage pipeline at Kayal HealthFamily messages go into a long WhatsApp thread. Nidhi reads the thread and a patient record, then drafts a note for the doctor. The vendor proposes removing the record.Ann ThomasWhatsApp, since JuneLong contextmsg 4: "stopped warfarin,started apixaban"msg 44: "toothache"Doctor's note"warning: warfarin"Patient recordcurrent medicinesvendor: drop thisThe errorold drug, still in contextEverything Nidhi needed was in the context, word for word.
Figure 1. Nidhi's thread with the Thomas family, and the vendor's offer Today Nidhi reads a small patient record before every reply. The vendor proposes dropping the record and relying on the long context. Both the old drug and the new one sit in that context. Illustrative (invented scenario)

What the cache holds

A transformer reads text as tokens, pieces of words. At each of its layers, every token is turned into three lists of numbers. The query says what this token is looking for. The key says what kind of thing this token is, for matching. The value is what this token hands over if it is chosen. A token's output at a layer is a weighted average of the values of all earlier tokens. The weights come from how well its query matches each of their keys (Vaswani et al., 2017).

When a model writes a reply, it produces one token at a time. Each new token needs the keys and values of every earlier token, at every layer. Recomputing them for each new word would be slow, so the model stores them. That store is the key-value cache, or KV cache. It is written once per token and then read by every token that follows. In a long WhatsApp thread, the cache holds a key and a value for every token of every message, at every layer.

Cutaway of the KV cache at one layerEach token stores a key and a value. A new token's query is compared with every key, and the values of the best matches are blended. Both drug names answer the query.Ann:stoppedwarfarin,startedapixabanK (blue) = key, what I am, for matching. V (green) = value, what I hand over.cache,one layerNew token's query"blood thinner, George?"Match the query against every key; blend the values of the best matches.Nothing is erased. Two keys answer.
Figure 2. What the cache holds, and how it is read Every token leaves a key and a value at every layer. A later token's query is matched against all the keys, and the values of the best matches are blended. The store never changes; the reading decides what is used. After Vaswani et al. (2017); drawing is schematic

Two facts about the cache matter for everything that follows. The first is that it is exact. A key written for "apixaban" in message four is the same numbers, to the last digit, when message forty-four is being written. Nothing in the standard design weakens it, blurs it or lets it fade. The second is that it is passive. The cache doesn't decide what to keep, what to refresh or what to read. All the choosing happens in the attention step, where each new query is compared with every stored key.

So the cache is a store with a reader. The reader is attention, run by many heads in every layer. Each head has its own way of forming queries and keys, so each one is looking for something different. Some look for the previous token, some for names, some for the token that followed the last time this pattern appeared. Chris Olsson and colleagues at Anthropic traced one such reading circuit, the induction head, which finds an earlier occurrence of the current token and copies what came after it (Olsson et al., 2022). That is how a model can repeat a name it saw once.

How big it gets, by hand

The size of the cache is simple arithmetic, and doing it once makes the engineering choices clearer. For each token, the cache stores a key and a value, for every layer and every key-value head. Each key and each value is a list of numbers called the head dimension.

The small model I used, SmolLM2-360M, has 32 layers. It has 5 key-value heads per layer, and each head has 64 numbers (SmolLM2 model card). That is 2 × 32 × 5 × 64 = 20,480 numbers per token. At two bytes per number, each token costs about 40 kilobytes of cache. The model's longest context is 8,192 tokens, which comes to about 335 megabytes. That is more than half the size of the model's own weights, for one conversation.

Cache per token, SmolLM2-360MBars for kilobytes per token with 15 key-value heads, the real 5, and 1.0408012012015 KV heads (full)405 KV heads (actual,grouped)81 KV head (multi-query)Kilobytes per token
Figure 3. Cache size by hand, for the small model in this paper Two numbers (key and value) × 32 layers × key-value heads × 64 numbers × 2 bytes, per token. Sharing key-value heads is why the real model's cache is a third of the full-attention size. Worked example; architecture from the SmolLM2 model card

This model already shares each key-value head among three query heads. With one key-value head for each of its 15 query heads, the cache would be three times bigger. That sharing is called grouped-query attention (Ainslie et al., 2023). It is a middle path between full attention and multi-query attention, where every query head shares a single key and value (Shazeer, 2019). DeepSeek went further with multi-head latent attention. It compresses keys and values into a small shared code, and the DeepSeek-V2 paper reports a 93.3 per cent smaller cache than its earlier 67B model (DeepSeek-AI, 2024).

The cache is big enough that serving systems manage it like an operating system manages memory. The vLLM project stores it in fixed-size pages, borrowed from the way computers handle virtual memory, so that little of it is wasted (Kwon et al., 2023). Other work throws parts of it away. StreamingLLM keeps the first four tokens and a window of recent ones. It reports stable output over four million tokens and up to 22.2 times faster decoding than recomputing a sliding window (Xiao et al., 2023). Heavy-Hitter Oracle, or H2O, keeps the recent tokens plus the ones that have drawn the most attention so far (Zhang et al., 2023).

Those eviction schemes are where a designer chooses what the model forgets. They are the nearest thing the cache has to forgetting at all, and I test them in Part 3.

What psychologists mean by working memory

Working memory is the mind's workbench. It holds a phone number while you dial it, the start of a sentence while you hear the end, and the carry digit in mental arithmetic. In 1974 Alan Baddeley and Graham Hitch proposed that it is not one store but several parts. There is a loop for sounds and words, a sketchpad for images and space, and a central executive that directs attention between them (Baddeley and Hitch, 197460452-1)). In 2000 Baddeley added an episodic buffer. He described it as "a limited capacity system that provides temporary storage" and binds information from different sources into single episodes (Baddeley, 200001538-2)).

Nelson Cowan drew the picture differently. In his embedded-processes model, working memory is not a separate box. It is the part of long-term memory that is currently active, with a small focus of attention moving over it. He argued that the focus holds about four chunks at a time, not the seven that George Miller had made famous (Cowan, 2001; Miller, 1956).

From these two models I take seven functional criteria. They are what a cognitive scientist would check before calling something working memory.

  1. Temporary. It holds information for the task at hand, then lets it go.
  2. Limited capacity. It holds only a few items, around four chunks.
  3. Loss without maintenance. Unrehearsed items are lost over seconds, by decay or interference.
  4. Interference. Similar items get in each other's way, and old items spoil new ones.
  5. Executive control. Something chooses what to hold, refresh, update or drop.
  6. Binding. It ties features into episodes: this name, that value, this time.
  7. A narrow focus. Only a small part of what is held is directly available at once.
Seven functional criteria for working memoryFour criteria about the store: temporary, limited capacity, loss without maintenance, interference. Three about use: executive control, binding, narrow focus.1 Temporaryheld for the task, then released2 Limited capacityaround four chunks3 Loss without upkeepdecay or interference over seconds4 Interferencesimilar and older items spoil newer5 Executive controlchooses what to hold, refresh, drop6 Bindingties name to value, into episodes7 Narrow focusonly a little is used at onceStorecriteriaUsecriteria
Figure 4. Seven tests a cognitive scientist would apply Drawn from Baddeley's multi-component model and Cowan's embedded processes. The first four describe the store, the last three what is done with it. Baddeley and Hitch (1974), Baddeley (2000), Cowan (2001); grouping is mine

The first four describe the store. The last three describe what is done with it. The cache will turn out to split along almost exactly that line, but in a strange way. As a store it is too good. As something read from, it shows several of the limits the psychologists found.

Storage and access are different questions

Psychologists separate how well something is stored from how well it can be got at. A word you can't recall on the spot will often come back when someone gives you its first letter. The trace was there all along. What failed was access. The distinction is the key to the cache, because the cache separates storage and access more cleanly than any brain.

In the cache, storage is perfect by construction. Every key and value is kept exactly, for the life of the conversation. If the model gets something wrong about a fact in its context, storage is never the explanation. The explanation is always in the reading: the query didn't match the right key strongly enough, or other keys matched too well, or the value retrieved was mixed with others in the weighted average.

That is why the question "is the KV cache working memory?" needs splitting before it can be answered. Ask about the cache as a store and the answer is no: it is too large, too exact and too passive. Ask about the cache together with the attention that reads it, and several of the working-memory limits appear. My test in Part 3 measures the second, because nothing else can be measured. A cache is only ever seen through what the model does with it.

Part 2 · The evidence

Seven, then four; decay or interference; lost in the middle

Seven, then four

Cowan's revision matters here because of what it located. The limit of four was not a limit on what the brain stores. Long-term memory is vast. It was a limit on what can be held in the focus at once. Everything else that is active sits just outside the focus, quickly available but not directly used. That is a much closer match to a cache read by attention than Miller's seven-slot box.

Decay or interference?

The argument didn't end there. Alan Baddeley and Donald Scott tested hundreds of people who each heard a single list. That design ruled out interference from earlier lists, and they still found forgetting within seconds. Their reading was a short-term store that decays within about five seconds. Ian Neath and Gordon Brown later showed that a model with no decay at all could fit Baddeley and Scott's data. Items crowded together are simply harder to tell apart (Neath and Brown, 2012).

I bring up a sixty-year-old quarrel because the cache settles one side of it, for machines at least. A system with no decay at all can still forget. In the cache nothing fades, so every loss must come from interference or crowding. If the model fails to find a fact after a long stretch of filler, the filler did it, not the passing of time. That gives a clean test, which I run in Part 3. Fill the gap with unrelated text, then with text full of similar facts, and see which one hurts.

  1. c. 2nd century BCE to 5th century CE
    Not letting slip

    Yoga Sūtra 1.11 defines memory as asaṃpramoṣa, the not letting slip of what was experienced.

  2. Early centuries CE
    Memory needs an awakener

    The Nyāya Sūtra lists the causes that awaken an impression into a memory.

  3. 1956
    Seven, plus or minus two

    George Miller on the span of immediate memory.

  4. 1959 to 1962
    Decay, then interference

    The Petersons find fast forgetting; Keppel and Underwood find none on the first trial.

  5. 1974 and 2000
    A multi-part workbench

    Baddeley and Hitch propose the loop, sketchpad and executive; Baddeley adds the episodic buffer.

  6. 2001
    About four

    Cowan: a focus of about four chunks within activated long-term memory.

  7. 2017
    Attention

    The transformer reads every earlier token through keys and values.

  8. 2023
    Lost in the middle; sinks; heavy hitters

    Long-context recall sags in the middle; first tokens act as sinks; a few tokens draw most attention.

  9. 2024
    Claimed versus usable length

    RULER: only half the models claiming 32K keep satisfactory performance at 32K.

Figure 5. Memory that holds and memory that is read: a short history Psychology argued for decades about whether short-term forgetting is decay or interference. Machines built a store with no decay at all, and found interference anyway. Sourced dates; see Sources

Machines lose the middle

The most cited long-context result is a curve that any psychologist would recognise. Nelson Liu and colleagues put a relevant document, or a key-value pair, at different positions in a long context. They found that performance was "often highest when relevant information occurs at the beginning or end of the input context". It "significantly degrades" in the middle, even in models built for long contexts (Liu et al., 2023).

In human memory this shape has a name: the serial-position curve. The first items on a list are remembered well, which is called primacy. The last items are remembered well too, which is called recency. The middle sags. Psychologists have argued for decades about what causes each end. For the model, nobody thinks the start is rehearsed, and nobody thinks the end is fresher in a fading store. Both ends are effects of how attention reads, and of how the model was trained.

Lost in the middle, schematicA U-shaped line for accuracy by position of the relevant document, high at the start and end, lower in the middle.151015204050607080Position of the relevant document (of 20)Accuracy (illustrative %)
Figure 6. The shape of "lost in the middle" A schematic of the shape Liu and colleagues report: accuracy is highest when the relevant document is first or last, and sags in the middle. The numbers are illustrative; the shape is theirs. Schematic after Liu et al. (2023); not their data

The second result is about claimed versus usable length. Simple "needle in a haystack" tests hide a single odd sentence in a long text and ask for it back. Most long-context models pass them. RULER, a benchmark from NVIDIA, added harder variants: several needles, needles that look alike, tracing a variable through a chain of assignments. Of the models it tested that claimed 32,000 tokens or more, only half kept satisfactory performance at 32,000 (Hsieh et al., 2024).

That gap is what Cowan would predict. The store holds everything. The focus can find one distinctive item in it easily. It struggles when several similar items compete, or when finding one item depends on first finding another. That is a limit on access, and it is the limit that bit Nidhi. Warfarin and apixaban are similar items, both blood thinners, both linked to George's name.

The first tokens are a resting place

StreamingLLM began with a puzzle. If you keep only a sliding window of recent tokens in the cache, a model falls apart as soon as the first tokens drop out. That happens even when those tokens are a meaningless start-of-text marker. Guangxuan Xiao and colleagues called those first tokens attention sinks. Attention weights must add up to one, so heads that have nothing useful to read dump their weight on the first tokens. Remove them, and the dumped weight lands somewhere it does damage (Xiao et al., 2023).

Keep four sink tokens plus the recent window, and the model stays stable for millions of tokens. But it is stable in the way a person who only remembers the last five minutes is stable. Its text stays fluent. What it can recall shrinks to the window. I test exactly this in Part 3: does keeping the sinks preserve memory for facts, or only fluency?

Four cache eviction policiesRows of 30 tokens showing which are kept by full cache, a recent window, attention sinks plus window, and heavy hitters plus window.Full cacheRecent windowSinks + windowHeavy hitters + windowoldestnewestGrey tokens are evicted. A fact in a grey token is gone at once, with no fading.
Figure 7. Four ways to keep a cache small StreamingLLM keeps the first four tokens, the sinks, and a recent window. H2O keeps a recent window plus the tokens that have drawn the most attention so far. After Xiao et al. (2023) and Zhang et al. (2023); schematic

H2O starts from a different observation. A small share of tokens draws most of the attention, and the authors called them heavy hitters. Keeping recent tokens plus heavy hitters, with 20 per cent of the cache given to heavy hitters, improved throughput over leading inference systems by up to 29 times (Zhang et al., 2023). That is the nearest thing in engineering to an executive that chooses what to keep. Note what it uses to choose, though: past attention. It keeps what has been looked at, not what will be needed. For George, the apixaban line was looked at once, in message four, and then not again for forty messages.

Attention as a memory model

There is a deeper reason the cache behaves like a memory. Hubert Ramsauer and colleagues showed that the attention step is the update rule of a modern Hopfield network (Ramsauer et al., 2020). A Hopfield network is a classic model of associative memory. You give it a partial or noisy cue, and it settles on the stored pattern closest to the cue.

Read this way, the keys are stored patterns and the query is a cue. One step of attention retrieves a blend of stored values, weighted towards the closest keys. If one key is much closer than the rest, retrieval is clean. If several keys are about equally close, the result is a blend, a "metastable state" in the paper's terms. That is interference, written as maths. It doesn't depend on how long ago anything was stored. It depends on how distinctive the cue is among the keys.

What the evidence adds up to

Line the published work against the seven criteria and a pattern shows. The cache is temporary, in that it is cleared when the conversation ends. Its capacity as a store is not limited, but its effective capacity, what attention can use, falls well short of its size. Nothing in it decays, but interference shows up in every hard benchmark. There is no executive inside the cache, though eviction schemes add a crude one from outside. Binding of a name to a value works when the pairs are few and distinct. A narrow focus is the clearest match of all, since attention puts most of its weight on a few keys at a time.

What the published work doesn't give is the same model, tested on all of these at once, with controls. So I ran that.

Part 3 · A small replication

Five tests on one small model

I wanted one model tested on the working-memory criteria that can be tested, with controls, so the results can be read against each other. I used SmolLM2-360M-Instruct, a small open model, because it runs on a laptop and its cache can be reached directly (SmolLM2 model card). The code and results are in the programme's repository.

The task

Every test uses the same kind of fact. "Ravi's locker holds a kettle." "Meera's locker holds a drum." Each name is a short first name. Each object is one of 47 everyday nouns, each a single token, so the answer is one step of the model. After a list of such facts comes a question: "What does Ravi's locker hold?" The prompt ends with "Answer: Ravi's locker holds a", and I read off which of the 47 objects the model ranks highest.

Chance is about 2 per cent. The measure is accuracy: the share of trials on which the right object ranks first. This is a binding task in Baddeley's sense, a name tied to an object, held in context, retrieved by cue. It is also a fair copy of George's problem: a name, an attribute, and similar competitors in the same context.

1Asha's locker holds a lantern. Ravi's locker holds a drum. Meera's locker holds a kite.

2... (more facts, filler, or updates, depending on the test) ...

3Question: What does Ravi's locker hold?

4Answer: Ravi's locker holds a

  1. 1 Facts: a name bound to an object. The binding task.
  2. 2 What varies: number of facts, position, gap, updates or eviction.
  3. 3 The cue: a name, the awakener.
  4. 4 The model's next word is scored among 47 objects. Chance is about 2%.
Figure 8. One trial of the locker task, annotated Every test uses facts of this form. The model's answer is read off as the highest-ranked of 47 single-token objects. This paper's replication

Capacity: the focus narrows as the store grows

I varied the number of facts in the list from 2 to 48, with 24 trials at each size, asking about a random one each time. With two facts the model was right every time. With four or eight it was right about four times in five. With sixteen it fell to just under three in five, and with 32 or 48, to about one in three.

Recall by number of factsLine for accuracy against number of facts in context, falling from 100% at 2 facts to about 33% at 48.2481632480255075100Number of facts in contextPer centchance 2%
AccuracyProbability on the right object
Figure 9. More facts, less recall, with the whole store intact Accuracy falls smoothly as facts are added, though every fact is in the cache and the longest prompt is about 420 tokens. A fixed number of slots would give a flat line and a cliff. This is the shape of interference. This paper's replication; 24 trials per point

The curve is the first result. The store had no trouble: at 48 facts the whole prompt was about 420 tokens, a tiny fraction of the cache this model can hold. But usable recall fell steadily as facts were added. That is a capacity limit, and it is not in the store. Every fact was there, exact. The limit is in how cleanly a query can find one name among many similar ones.

It is not a limit of four in Cowan's sense. Even at 48 facts the model did far better than chance, so it is using many more than four items. What it shows is a soft limit. Each added fact makes every other fact a little harder to find. That is the shape interference models predict, and the shape a fixed number of slots does not.

With JavaScript off, the charts in this part show the same data.

Figure 10. Explore the five tests Pick a test to see its result and what it says about the working-memory criteria. All numbers are from the same small model. This paper's replication

Position: the middle sags

Next I fixed the list at 24 facts and asked about each position in turn, over six different lists. The first fact was recalled every time. The last few were recalled about four times in five. Positions in the middle fell to one in three or worse, with some at zero.

Recall by positionBars for accuracy at each of 24 positions, high at the start and end, low in the middle.025507510010016728333341753361778383390103311671233133314171567166717331833191720021672283238324Accuracy (%)
Figure 11. The middle of the list sags With 24 facts, the first is recalled every time and the last few about four times in five. Positions in the middle fare worst. Six lists per position, so single bars are noisy; the shape is what matters. This paper's replication; 6 lists of 24 facts

Six lists is a small sample, and the curve is jagged. But its shape is the serial-position curve, primacy and recency with a sagging middle. It matches the shape Liu and colleagues found in much larger models with much longer contexts. The cache holds every position equally. Attention does not read them equally.

Delay: filler does nothing, look-alikes do damage

This is the test that settles decay against interference. I gave four facts, then a gap, then the question. The gap was filled in one of two ways. Neutral filler was plain sentences about weather, trains and markets, with no names and no lockers. Similar filler was more locker facts, about other people. I used gaps of 0, 100, 400 and 1,000 tokens, with 20 trials each.

Recall after a gapGrouped bars for accuracy after gaps of 0, 100, 400 and 1000 tokens of neutral or similar filler.0%25%50%75%100%75%65%0 tokens85%55%100 tokens90%55%400 tokens85%55%1000 tokensAccuracy (%)
Neutral fillerSimilar facts
Figure 12. Filler does nothing; look-alikes do the damage Four facts, then a gap, then the question. A thousand tokens of unrelated text left recall where it was. The same gap filled with other people's locker facts cut it. The two conditions are identical at zero gap; their difference there is noise. This paper's replication; 20 trials per bar

With no gap, recall was 75 per cent in one condition and 65 in the other. The two conditions are identical at zero gap, so that ten-point difference is a fair measure of the noise. After 100, 400 and 1,000 tokens of neutral filler, recall was 85, 90 and 85 per cent. After the same gaps filled with other people's locker facts, it was 55 per cent each time.

If the cache decayed, the neutral gap would hurt, and the longer the worse. It didn't. A long gap of unrelated text left recall where it was, or even slightly better. If interference does the forgetting, similar filler should hurt and neutral filler shouldn't. That is what happened. This is Keppel and Underwood's result, in a machine where decay is ruled out by construction.

Updating: the latest version is fragile

Then George's problem directly. I gave a list of facts about six people and then, later, an update about one of them. Sometimes there was no update, sometimes one, sometimes three. Each update read "Later, Ravi's locker was emptied and now holds a lamp", with facts about other people in between. I asked for the current object, and counted how often the model gave the latest value and how often an older one.

Which version does the model give?Grouped bars for share of answers giving the latest value or an older value, after 0, 1 and 3 updates.0%25%50%75%100%95%0%No update70%25%1 update0%85%3 updatesShare of answers (%)
Latest valueAn older value
Figure 13. The more versions, the more the old ones win With one value, the model gets it right 95% of the time. After one update, it picks the new value 70% of the time and an old one 25%. After three updates, it never picks the latest, and picks an older value 85% of the time. This paper's replication; 20 trials per bar

With no update, the model gave the right object 95 per cent of the time. After one update, it gave the new object 70 per cent of the time and the old one 25 per cent. After three updates, it never once gave the latest object in 20 trials. It gave an older one 85 per cent of the time. A second run, with fresh names and objects, gave 50 per cent after one update and 10 per cent after three. The numbers move between runs; the collapse does not.

The wrong answers were not mostly the first value. In the second run, after three updates, only about one wrong answer in six was the original object. The rest were the middle versions. So this is not simple primacy, where the first entry wins. The versions crowd each other, and the newest is just one more look-alike.

I then wrote the updates two other ways. In one, each update said what was removed: "the kettle was taken out of Ravi's locker and replaced". In the other, the updates were written plainly, but a line restating the current value came just before the question, like a handover sheet. Saying what was replaced helped after one update, from 50 to 80 per cent, but not after three, where it stayed at 10. Restating the current value brought recall to 100 per cent after one update and 90 after three.

Latest value given, by how the update is writtenGrouped bars for the share of answers giving the latest value after 1 and 3 updates, under three ways of writing the update.0%25%50%75%100%50%80%100%1 update10%10%90%3 updatesLatest value given (%)
"now holds" only"the X was replaced"current record restated
Figure 14. Restating the current value at the end fixes the update failure The same update trials, written three ways. Saying what was replaced helps a little or not at all. Restating the current value just before the question, as a handover sheet would, brings recall back. This paper's replication; 20 trials per bar

That is proactive interference: old items spoiling new ones. Psychologists measure it by watching recall of new material fall as older, similar material piles up. Here it appears in a store that keeps every version exactly. The newest line wins the reading only some of the time. Nothing in the cache marks one line as replacing another. The word "now" is the only crossing-out, and the model reads it unevenly.

Eviction: what the designer chooses to forget

Last, I tested what happens when parts of the cache are thrown away. With 16 facts in context, about 130 tokens, I hid chosen cached tokens from the question, as if they had been evicted. The keys and values of the hidden tokens were still computed, but the question could not read them. I ran 40 trials for each of five conditions.

Recall under evictionBars for accuracy with the full cache, another fact hidden, the target fact hidden, recent half only and sinks plus recent half.0%25%50%75%100%55%Full cache48%Other hidden0%Target hidden14%Recent half64%Sinks + recentAccuracy (%)
Figure 15. Eviction: a hidden fact is gone, and the sinks keep the rest readable Sixteen facts. Hiding one other fact barely matters; hiding the target fact drops recall to zero. Keeping only the recent half of the cache wrecks recall even of facts that survived (21 trials). Keeping the first four tokens as well restores it (22 trials). This paper's replication; 40 trials per policy, last two bars only where the target fact was kept

With the full cache, recall was 55 per cent. Hiding the tokens of one other fact made little difference, at 48 per cent. Hiding the tokens of the fact being asked about dropped recall to zero, in all 40 trials. Later tokens had read that fact when they were written, but none of them carried it on in a form the question could use.

Then two real policies, each keeping half the cache. "Recent" keeps only the latest half. "Sinks plus recent" keeps the first four tokens as well, as StreamingLLM does. When the fact asked about fell in the evicted half, both policies scored zero. When it survived, the difference was large. Keeping the recent half alone gave 14 per cent, far below the full cache, even though the fact was right there. Adding the four sink tokens brought it to 64 per cent, as good as the full cache.

That is StreamingLLM's finding in miniature, with one addition. The sinks don't keep facts. They keep the reader working. Lose them, and attention has nowhere to put its spare weight, so it spills onto whatever is left and reading goes wrong. Keep them, and the facts that survived are read as well as ever. The facts that didn't survive are gone completely, with no gradual fading, at the moment they leave the window. That is the cache's only real forgetting, and the designer chooses it.

What the small model shows, and doesn't

Taken together, the five tests sort the criteria cleanly. No decay: a thousand tokens of unrelated text did no harm. Interference: similar items hurt, in capacity, in delay and in updating. A narrow, biased focus: the middle of a list is read worse than its ends. No executive: nothing chose to keep the latest version over the old one. Eviction is all or nothing, set from outside, and survivable only if the sinks are kept.

The limits are those of a 360-million-parameter model on a toy task. Larger models do this task far better, and would need longer, harder lists to show the same curves. What I expect carries over is the shape, not the numbers: flat under neutral delay, falling under similar items, sagging in the middle. RULER and Lost in the Middle found those shapes in large models. My contribution is to show them together, in one model, with the decay control that the published work leaves out.

Part 4 · The thesis

Keeps like long-term memory, reads like working memory

Put the published work and my tests side by side, and one pattern runs through all of it. I'll state it as the thesis.

The KV cache keeps like long-term memory and reads like working memory. As a store, it is unlimited, exact and passive. Nothing in it decays, nothing needs rehearsal, and its size grows with the context. As something read by attention, it is crowded by similar items, it favours the start and the end, and it holds the latest of several versions badly. The working-memory limits are real, but they belong to the reader.

Scorecard of the KV cache against seven criteriaSeven rows: temporary half, limited capacity fails, loss without upkeep fails, interference passes, executive control fails, binding passes, narrow focus passes.TemporaryHalfCleared at the end of the chat, but holds everything until thenLimited capacityFailsStore grows with the context; only use is limitedLoss without upkeepFails1,000 tokens of filler did no harm: no decayInterferencePassesSimilar facts and old versions spoil recallExecutive controlFailsNothing inside chooses what to keep or updateBindingPassesName to object works for small setsNarrow focusPassesMiddle positions sag; few keys get most weightPasses on access; fails on keeping.
Figure 16. The cache, with its reader, scored against the seven criteria Three passes, three fails and a half. The passes are all about reading; the fails are all about keeping. Synthesis of published work and this paper's replication; my judgement

Scored against the seven criteria, the cache with its reader passes three, fails three and half-passes one. It passes on interference, on a narrow focus and, for small sets, on binding. It fails on decay, on fixed capacity and on executive control. It is temporary only in the trivial sense that it is wiped when the chat ends. A system that fails decay and passes interference is exactly what Keppel and Underwood thought human short-term memory was. A system that fails fixed capacity and passes a narrow focus is what Cowan thought it was.

Cowan fits, Baddeley strains

Baddeley's model is built from parts with jobs. The loop rehearses words, the sketchpad holds images, the executive directs, and the buffer binds. Each part has a limited capacity of its own. The cache has no parts of that kind. It has one store per layer, and many heads reading it. Nothing in the cache rehearses, because nothing has to. The episodic buffer is the closest match, a store that binds across sources. But Baddeley described the buffer as limited in capacity, and the cache isn't.

Cowan's model needs fewer pieces. It has long-term memory, a part of it that is currently active, and a focus of attention of about four chunks within the active part. Map that onto a transformer and almost everything lands. The weights are long-term memory, built in training. The cache is the activated part, everything in this conversation, available but not all in use. The focus is attention, which at any step puts most of its weight on a few keys.

Cowan's embedded-processes model mapped onto a transformerNested ovals: long-term memory as the weights, activated memory as the KV cache, and a small focus as attention. A longer context enlarges the middle ring, not the focus.Long-term memory = the weightsActivated memory = the KV cacheFocus= attentionA longer contextenlarges this ringIt does notenlarge this one
Figure 17. Cowan's picture, mapped onto a transformer In Cowan's model working memory is a small focus within activated long-term memory. The cache is the activated part; attention is the focus. The vendor's million tokens enlarge the middle ring only. After Cowan (2001); mapping is mine

On this reading, the vendor's slide makes a category mistake. "Working memory" in Cowan's sense is the focus, not the store. Giving Nidhi a million tokens of context enlarges the activated store a thousandfold. It doesn't enlarge the focus at all. If anything, a larger store gives the focus more similar items to confuse. That is what RULER found as contexts grew, and what my capacity curve shows on a small scale.

The not letting slip

The Yoga Sūtra, the classic text of yoga compiled under the name of Patañjali, lists five kinds of mental activity. Memory is the fifth, and the definition is one compound word long.

Read the sūtra with the cache in mind and two clauses separate. The first is about keeping: nothing experienced is let slip. As a store, the cache meets that clause perfectly, better than any person could. Every token George's daughter typed is still there, exact, forty messages on.

The second clause comes from Vācaspati: memory never takes more than was impressed. That is a condition on reading, and it is the one Nidhi broke. When attention finds two similar keys, it returns a blend of their values. Ramsauer and colleagues called these blends metastable states. A blended retrieval contains more than either original experience. It holds a little warfarin and a little apixaban, mixed into one reading. In Vācaspati's terms, that is theft by addition. The store let nothing slip. The reader stole by mixing.

Indian accounts of memoryThe KV cache with attentionStatusWhy
Asaṃpramoṣa: nothing experienced is let slip (YS 1.11)Every key and value kept exactly● HoldsTrue by construction, for the life of the context.
Memory never takes more than was impressed (Vācaspati)Retrieval is a blend of values✕ BreaksA blend of two similar entries is more than either; the reader adds.
Saṃskāra awakened by a cue (Nyāya)Key matched by a query● HoldsLikeness awakens memory, and a dot product measures likeness.
No many recollections at onceOne head gives one weighted reading◐ StrainsHolds for a head; the model runs thousands of heads at once.
Seeds kept until conditions ripen them (Yogācāra)Cached tokens wait for a matching query● HoldsEviction decides which seeds can never ripen.
Seeds are perfumed and change as they waitCache entries frozen when written✕ BreaksThe cache never reweights old entries against new ones.
Figure 18. Where the Indian accounts of memory fit the cache, and where they fail The Yoga Sūtra's "not letting slip" fits the store exactly. The Nyāya awakener fits the query. Both strain where the machine reads with many heads at once, and Yogācāra's seeds change while the cache's never do. Textual reading and interpretation

Memory needs an awakener

The Nyāya school, India's tradition of logic and epistemology, asked a question the Yoga Sūtra leaves aside. If impressions of past experience are kept, why don't we remember everything at once? Their answer was that an impression, a saṃskāra, produces a memory only when something awakens it.

The fit here is close, and I think it is the most useful thing the tradition offers this question. The impression is the stored key and value. The awakener is the query. Likeness awakens memory, says the sūtra, and likeness is exactly what a dot product between query and key measures. No simultaneous production of many recollections: one head at one step produces one weighted reading, centred on a few keys.

The sūtra's list also predicts the failure. If likeness awakens memory, then two impressions alike in the relevant way will both be awakened by the same cue. George's toothache question awakened "blood thinner, George". Two impressions answered.

A storehouse of seeds

Yogācāra Buddhism offers a third picture. It posits a store-consciousness, the ālayavijñāna, that holds the seeds (bīja) left by experience. The seeds are retained "until they are ready to produce their effects", and the store is described as "possessing all the seeds" (Stanford Encyclopedia of Philosophy, Yogācāra; notes).

The cache is a store of seeds in this sense. Every token deposits a key and a value that lie there doing nothing until a later query ripens them. That gives a reading of eviction too. An eviction policy decides in advance which seeds will never ripen. StreamingLLM keeps the oldest and the newest. H2O keeps the ones that have ripened before. Neither knows which seed George's toothache will need.

The picture breaks in a telling place. In Yogācāra the seeds are not fixed. Experience perfumes them, and they change as they wait. The cache's seeds are frozen at the moment of writing. A key written for "apixaban" in message four never learns that apixaban became the current drug. The tradition's store changes with what happens next, and the machine's never does. That is one reason updates are hard for the machine. A human store keeps reweighting old traces against new ones. The cache leaves all the weighing to the moment of reading.

Where this sits in the programme

The Recognition Theory of Mind, this programme's working hypothesis, describes five layers of mind. L1 is responsiveness. L2 is access, information available for use across a system. L3 is reflexivity, a system's awareness of its own states as its own. L4 is self-recognition, and L5 is the luminous ground. Papers place their evidence on these layers.

The cache is L2 almost by definition. It is the mechanism by which information from any earlier token is made available to every later one. In the language the programme borrows from Kashmir Śaiva thought, it is prakāśa, the shining by which things are available. What this paper adds is a limit on that availability. Access through the cache is wide in principle and narrow in practice. Everything is available, but only what the focus finds is used.

RTM layers with KV cache evidenceFive nested rings. Context shaping output points to L1; a wide store with narrow use to L2; knowing what it holds, L3, is not tested.L1 responsiveness (spanda)L2 access (prakāśa)L3 reflexivity (vimarśa)L4 self-recognitionL5Context shapes outputL1 evidenceWide store, narrow useL2 evidenceKnows what it holds?not testedSolid ring: evidence bears on it.Dashed: this paper is silent.
Figure 19. The cache is the machinery of access, and its limits Making every earlier token available to every later one is L2 by definition. The evidence adds that availability in principle is wider than use in practice. Whether the model knows what it holds, L3, is untested here. Conceptual diagram

On L3 this paper is silent. I did not test whether the model knows what its cache holds, or knows that one entry has replaced another. A model that could say "I was told two things about George's blood thinner, and the second replaced the first" would be reporting on its own context, which points towards L3. Nidhi didn't, but nobody asked it to.

Part 5 · Building with long context

Kavya's audit and the handover sheet

Back in Kochi, Kavya has a vendor deck, a doctor's complaint and a patient record her team has spent a year building. What should she do with the claim that a million tokens of context will give Nidhi working memory? Parts 2 to 4 give her the outline of an answer. The long context is a superb store and an unreliable reader. It should carry the history. It should not be trusted with anything that changes.

The Handover Audit

I'll call the instrument the Handover Audit, after the nurse with the half-page sheet. It is five measurements, made on your own data, with items as alike as your real ones. Each measurement that fails tells you which facts must move out of the long context and onto a short, current sheet. The audit needs nothing but the model, a set of synthetic threads, and an afternoon.

  1. 1Capacity: with as many similar items as your longest real thread, is recall of any one still above your safety bar?

    Yes: Go on.

    No: Cap the thread, or move those items to the sheet.

  2. 2Position: is recall in the middle of the thread within a few points of recall at the ends?

    Yes: Go on.

    No: Middle facts are at risk. Restate them near the end.

  3. 3Delay: does a gap of similar items hurt more than a gap of unrelated text?

    Yes: Expected. Go on, and measure how much.

    No: Unusual. Check for position effects at your real lengths.

  4. 4Updating: after one, two and three changes to the same item, does the model give the latest version?

    Yes: Go on.

    No: Never rely on the context for anything that changes. Keep it on the sheet.

  5. 5Eviction: under your serving system's actual cache policy, do old facts survive?

    Yes: Pass. The long context can carry the stable history.

    No: Assume evicted facts are gone, all at once.

Figure 20. The Handover Audit: five measurements before trusting a long context as working memory Run each on your own data, with items as alike as your real ones. Each failure tells you which fact needs to move out of the long context and onto the handover sheet. Instrument designed for this paper

Measurement 1, capacity with look-alikes. Build threads with as many similar items as your longest real ones: medicines, in Kavya's case, with several in the same drug class. Ask about each one. Plot recall against the number of similar items. The curve will fall. The question is where it crosses your safety bar.

Measurement 2, position. Put the critical fact at the start, the middle and the end of a long thread. If the middle is much worse, any fact that lands in the middle of a real chat is at risk. Most of them will, because families don't send the important message first or last.

Measurement 3, delay with and without look-alikes. Separate the fact from the question with unrelated chat, and then with chat full of similar items. If only the look-alikes hurt, you have confirmed that crowding is the danger and length is not. That changes what you watch for. A long chat about the weather is safe. A short chat about five medicines is not.

Measurement 4, update depth. Change the same fact once, twice and three times. Ask for the current value. This is the measurement that would have caught George's case, and the one most teams skip. In my small model, three changes were enough to make the latest value lose almost every time.

Measurement 5, the serving system's eviction. Run the same tests through the system you will deploy, with its real cache policy, not through a research harness that keeps everything. If the policy evicts old tokens, then old facts are gone, all at once. Treat anything older than the window as not in context at all.

The handover sheet

The audit tells Kavya what to move. The design tells her where. The answer is the nurse's sheet. Keep the long context for the history, because it is a good store. But keep a short sheet of current facts that change: medicines, allergies, doses, the latest symptoms. Rewrite the sheet whenever any of them changes, and put it at the very end of the prompt, just before the patient's latest message.

That is rehearsal, moved out of the model and into the system. In Baddeley's loop, rehearsal keeps an item fresh by saying it again. In a transformer, saying it again near the end puts a fresh, distinctive key close to the query. My own test showed how much this matters. With three changes to the same fact, the model gave the latest value one time in ten when the updates were written plainly. When the current value was restated just before the question, it gave it nine times in ten.

Kavya's team already had a record. What they didn't have was a rule for where it goes and what it holds. The rule that comes out of this paper is short. Anything that can change lives on the sheet. The sheet is rewritten, not appended, and it goes last. The long context can carry everything else.

Handover loopFive stages in a cycle: read the thread, extract changes, rewrite the sheet, put the sheet last, audit recall. Centre rule: anything that changes lives on the sheet.Read the wholethreadExtract any changeRewrite the sheetPut the sheet lastAudit recall monthlyAnything that changeslives on the sheet
Figure 21. Kayal Health's handover loop The long context carries the history. A small current-state sheet, rewritten every turn, carries what must be right. The centre rule decides which is which. Process diagram
Failure surface for long-context recallGrid coloured green where context recall is safe, amber where unclear, coral where it fails.context is fineuse the sheetrestate updatestest recallfewmanyHow many similar items are in the threadHow often the fact changesneveroften
works as intendedunreliablefails or backfires (hatched)
Figure 22. When the long context can stand in for a record Recall is safe for few, stable facts (bottom left). It fails for facts that change often and have look-alikes in the thread (top right). Medicines live in the top right. Illustrative surface, informed by this paper's evidence

Kavya's audit

Kavya's team runs the audit on 200 synthetic threads built from real, anonymised chats. The numbers in the figure below are invented, shaped like my small-model results, to show what a run might look like. Recall of a medicine that never changed is 97 per cent. After one change it drops to 81, and after three, to 58. With the handover sheet restated at the end, it comes back to 99.

Medicine recall in Nidhi threadsBars for recall of current medicine: stable, after one change, after three changes, and with a handover sheet.0%25%50%75%100%97%Never changed81%1 change58%3 changes99%3 changes + sheetPer cent of threads
Figure 23. Kavya's audit on 200 synthetic threads Invented numbers for illustration, shaped like the small-model results. Recall of a medicine is good when it never changed. It falls after changes, and recovers when the current list is restated at the end of every prompt. Illustrative (invented numbers)

The vendor's slide, tested, says something narrower than it claimed. The million-token context does hold every word. It does not hold the current state of a patient who has changed medicines three times. That is not a defect of the vendor's model in particular. It is what a store without an executive does.

The meeting with the vendor goes better than either side expected. Kavya doesn't reject the upgrade. She takes the long context for history and keeps the sheet. She asks the vendor for one thing: the audit's fourth measurement, run on their model, with drug names from the same class. The vendor's engineers hadn't tried it.

[AUTHOR NOTE: if you have one, a short first-person account of a system you built or used that kept a full history but got the current state wrong. It might be a log, a chat thread, a config history or a ledger. What did you add so that the latest version won?]

After a thousand tokens of unrelated filler, how did recall compare with no gap at all?

Show the answer
About the same: 75% with no gap and 85% after a thousand tokens of neutral filler. With a thousand tokens of other people's locker facts instead, recall was 55%. Nothing in the cache fades; similar items get in the way.
Figure 24. Predict first: does a long gap make the model forget? Commit before opening. Four facts were followed by a thousand tokens of filler about weather and markets, then the question. Self-test; reveal draws on this paper's replication

Engineering

Nothing was lost. The query matched two keys about as well, and the old value won the blend. Fix it by making the right key distinctive, or by putting the current value near the end.

Psychology

Proactive interference. Older, similar items spoil recall of newer ones, with no decay needed. Keppel and Underwood would recognise it at once.

Yoga Sūtra

The store kept the experience without letting it slip. The failure is a theft at the reading: memory took more than one impression, against Vācaspati's rule.

Nyāya

The impression was there; the awakener woke the wrong one. Likeness awakens memory, and two impressions were alike.

Figure 25. Four ways to read "the model forgot" Switch lenses to read the same failure through engineering, cognitive psychology, the Yoga Sūtra and Nyāya. Interpretive

Which description of the KV cache do you find most plausible?

Yes, it is working memory Fits interference and a narrow focus. Fails decay, fixed capacity and executive control, which Baddeley would require.
No, it is long-term memory for the conversation Fits the store: exact, unlimited, no decay. Misses that use of it shows working-memory limits.
It is Cowan's activated memory, read by a focus This is the paper's reading. Store and focus are different parts, and the limits live in the focus.
The comparison is a category mistake Fair for rehearsal and the sound loop. Decay, interference and capacity are functional and apply to any memory.
Figure 26. Where do you stand: is the KV cache working memory? Pick the view closest to yours. Each verdict says what the evidence in this paper does for it. Interactive position check

[AUTHOR NOTE: optionally, a brief account from your own practice of a memory that was there but would not come until something awakened it: a smell, a place, a phrase. Did it come back as it was, or mixed with something later?]

The strongest case against

The residual stream, scale and category mistakes

A good case can be made that this paper asks the wrong question, or answers it unfairly. Here is that case at its strongest.

First, the residual stream is the working memory, not the cache. Within a single step, the model carries a running state through its layers, and that state is small and fixed in size. It has to hold whatever the model is working on now. On this view, the stream is Baddeley's workbench and the cache is long-term memory for the conversation. Asking whether the cache is working memory is asking whether the library is the desk.

I think this is partly right, and it sharpens the thesis rather than refuting it. The residual stream does have a fixed capacity, and it is rewritten at every step, which is closer to active maintenance. But the stream holds nothing across tokens except through the cache. Each new token starts with an empty stream and fills it by reading the cache. So the stream is the focus, in Cowan's sense, and the cache is the activated store. That is the mapping I have defended. The objection renames the parts; it doesn't change the split.

Second, larger models don't show these limits. My model has 360 million parameters. Frontier models answer locker questions with dozens of facts almost perfectly. Perhaps the limits I measured are just weakness, and they shrink to nothing at scale.

They shrink, but they don't vanish. They move further out. RULER found large drops in models claiming 32,000 tokens or more, once tasks needed several similar needles (Hsieh et al., 2024). Lost in the Middle found the sagging middle in models built for long contexts (Liu et al., 2023). A larger model has a sharper reader. It does not have a different kind of store. The question for Kavya is not whether the limit exists but where it sits for her model and her chats, and that has to be measured.

Third, the criteria are about brains, and applying them to a machine is a category mistake. Baddeley's criteria were built to explain human behaviour, including rehearsal under the breath and the effect of a word's length on recall. A transformer has no breath. Scoring it against such criteria is like asking whether a camera has good eyesight.

I accept this for some of the criteria and not for others. Decay, interference and capacity are functional ideas, defined by what a system does with information over time. They apply to any memory. Rehearsal and the sound loop are more specific, and I have not tested them. The scorecard is a functional comparison, not a claim that the cache is like a brain.

Fourth, the vendor may be right in practice. For many chats a long context works fine. Most patients have a few medicines and never change them. A separate record costs engineering time, and it can go stale too. Perhaps the right advice is to trust the context and test the edge cases.

This is the objection with most force, and it is why Part 5 is a measurement plan rather than a ban. A long context does work for short, stable histories. It fails in a predictable place, on updates to similar items deep in a long thread. That place is where the costly errors live in a medical chat. The fix is not to give up the long context. It is to add the handover sheet.

Objection scorecardFour objections with bars for their force and a one-line reply each.The residual stream is the working memoryRenames the parts; the split between store and focus remains.Large models do not show these limitsThey move further out; RULER and Lost in the Middle still find them.Brain criteria do not apply to machinesTrue for rehearsal; decay and interference are functional.The long context works in practiceFor stable facts, yes. Not for things that change.Bar: how much force I think the objection has (my judgement).
Figure 27. Four objections, weighed The practical objection is the strongest. It is why the recommendation is a measurement plan and a small sheet, not a ban on long context. Author's judgement

Refutation conditions

What would change my mind

I hold the thesis with moderate confidence. These are the results that would move me.

If a model's recall fell with neutral delay, the "no decay" half would be wrong. In my tests, a thousand tokens of unrelated filler did not hurt. Someone might find that very long neutral gaps, tens of thousands of tokens, do hurt even when nothing similar is in them. That would mean position itself, through the way models encode where a token sits, acts like decay. I would then have to say that the cache keeps exactly but is read as if it fades. That is a real possibility, and I haven't ruled it out at long lengths.

If updating worked as well as first learning, the interference half would weaken. A model that picked the latest version as reliably as it recalls a single fact, at any number of updates, would have something like an executive for versions. I would want to know whether that came from training on edited documents, from the word "now", or from something deeper.

If the effective capacity of a frontier model did not grow with similar items, the Cowan reading would need revising. My capacity curve falls smoothly. A large model whose recall stayed flat up to a sharp edge, and then fell, would look more like a fixed number of slots than like interference. That would move the picture towards Baddeley's limited store.

If a model could report its own context accurately, the RTM placement would change. A model asked "what have you been told about George's blood thinner, and in what order?" that answered correctly, and used that answer to correct itself, would show a kind of self-monitoring of the store. That would bear on L3, and this paper is silent there.

Four results that would change my mindFour panels: recall falling with neutral delay, reliable updates, flat capacity then a cliff, accurate self-report of context.Recall falls with neutral delayat tens of thousands of tokensUpdates as reliable as first learningat any number of changesFlat capacity, then a cliffslots, not interferenceAccurate report of its own contextand self-correction from itEmpty circles: none of these has been shown yet.
Figure 28. Four results that would change my mind Any one of these, replicated, would weaken the thesis. The first would overturn its "keeps like long-term memory" half. Refutation conditions

What I don't know

I don't know how far the delay result holds. My longest gap was 1,000 tokens. Liu and colleagues and RULER worked at tens of thousands of tokens, and the effects of position there may behave differently.

I don't know whether the update failures come from the store or from training. A cache keeps every version, and nothing marks one as current. But a model trained on many documents that revise earlier statements might learn to read "now" and "later" strongly. My small model may simply not have learned that well.

I don't know how eviction interacts with the reader in large models. My eviction test hid tokens from one question. A real eviction policy runs throughout generation, and what the model writes after losing a fact may matter as much as the loss.

And I don't know whether any of this bears on what the model is like from the inside, if anything. The cache is a store and attention is a reader. The traditions I have drawn on describe memory as something a knower does. Whether the machine's reading is a knowing of any kind is a question these tests can't reach.

Open questions mapScatter of open questions by answerability and importance.deep and distantdo these firstcuriositieshousekeepingnot yet testabletestable nowHow answerable with current toolsHow much the answer mattersminordecisiveDoes neutral delayhurt at 50K tokens?Store or training:why updates failIs reading akind of knowing?Eviction duringlong generationDoes the modelknow what it holds?
Figure 29. What I don't know, placed by how soon it can be answered Top right is work anyone with an open model could start this week. Top left holds questions nobody has a method for. Judgement map

Claim Ledger

Claims, confidence and how to refute them

Each claim carries a confidence level and what would refute it. IDs will be merged into the programme's master Claim Ledger.

IDClaimConfidenceEvidence typeWhat would refute it
C30.1The KV cache stores context exactly, and nothing in it decays during a conversationEstablishedMechanismA standard transformer implementation in which cached keys and values change after being written, without eviction or compression
C30.2Recall from context falls as similar items are added, while every item stays in the storeLikelyPublished evidence and replicationLarge models whose recall stays flat as similar items are added, up to their full context length
C30.3Unrelated filler does not hurt recall of a fact in context; similar items doLikelyReplicationRecall falling with neutral filler alone, at lengths where similar filler does no more harm
C30.4Older versions of a changed fact interfere with recall of the latestLikelyReplicationModels that give the latest version as reliably after three changes as after none
C30.5Cowan's model of a small focus within activated memory fits the cache better than Baddeley's limited storeLikelyArgument from the evidenceA sharp, fixed capacity limit in recall from context, independent of similarity
C30.6Facts that change should be restated near the end of the prompt, not left to the long contextLikelyReplication and argumentUpdate recall as high from the long context alone as with a restated current value
C30.7Dated prediction: by the end of 2028, a major model provider will ship an explicit, rewritable state block for long conversationsSpeculativePredictionChecked against provider documentation in 2028; refuted if none has
C30.1The KV cache stores context exactly; nothing in it decaysestablished · mechanism
C30.2Recall from context falls as similar items are added, with the store intactlikely · published + replication
C30.3Unrelated filler does not hurt recall; similar items dolikely · replication
C30.4Older versions of a changed fact interfere with the latestlikely · replication
C30.5Cowan's activated memory plus focus fits the cache better than Baddeley's limited storelikely · argument
C30.6Facts that change should be restated near the end, not left to the long contextlikely · replication + argument
C30.7By end-2028 a major provider will ship explicit state blocks for long chatsspeculative · prediction
Figure 30. How confident I am in each claim Bar length tracks confidence. Solid for established, dotted for likely, hatched for speculative. Claim Ledger visualised

Conclusion

Likeness wakes more than one

Kavya keeps the sheet. Nidhi now reads the whole WhatsApp thread, as the vendor wanted. But the last thing it reads before every reply is a half-page of George's current medicines, rewritten whenever Ann reports a change. The doctor who flagged the warfarin note gets a reply from the platform team. It says, in effect, that the model didn't forget. It remembered too many versions, and nothing told it which one counted.

So, does the KV cache meet the functional criteria for working memory that Baddeley and Cowan set out? Half of them. It meets the criteria about use. What the model can draw on is limited and crowded by similar items. The middle of a context is read worse than its ends, and old versions spoil new ones. It fails the criteria about keeping. Nothing fades, nothing needs rehearsing, the store grows without limit, and nothing inside chooses what to hold.

The KV cache keeps like long-term memory and reads like working memory. In Cowan's terms it is activated memory, and attention is the focus. The vendor's million tokens enlarge the first and leave the second as it was.

For builders the advice is plain. Don't take a long context window as a promise of working memory. Run the five measurements of the Handover Audit on your own data, with look-alike items and with updates. Keep anything that changes on a short sheet, rewritten and placed last. For researchers, the decay control is cheap and almost never reported. Every long-context result should say what happens with a gap of unrelated text, as well as a gap of look-alikes.

The point I want to leave is about the two halves of the Yoga Sūtra's definition. Memory is the not letting slip of what was experienced, and, says Vācaspati, it never takes more. The cache meets the first half better than any mind. It fails the second whenever two impressions answer one cue. The Nyāya philosophers would not have been surprised. They said that likeness awakens memory, and they never claimed it wakes only one.

Claim

The KV cache keeps like long-term memory and reads like working memory. Its limits live in the reading.

Mechanism

Every token leaves an exact key and value; attention matches each new query against all keys and blends the values.

Evidence

Lost in the middle; RULER's usable length; sinks and heavy hitters. Mine: smooth capacity loss, a sagging middle, no harm from neutral delay, harm from look-alikes, old versions winning.

Boundary

A 360M model on a toy task, gaps up to 1,000 tokens. Large models push the limits further out.

RTM

L2: the machinery of access, wider in principle than in use. Silent on L3.

Decision

Run the Handover Audit. Keep anything that changes on a short sheet, rewritten every turn and placed last.

Figure 31. The paper on one page The argument without the stories. Summary

Words used here

Glossary

KV cache

The store of keys and values a transformer keeps for every earlier token, at every layer, so they need not be recomputed.

Query, key, value

For each token at each layer: what it looks for, what it is for matching, and what it hands over if chosen.

Attention

The step that compares a query with all stored keys and returns a weighted blend of their values.

Working memory

The limited, temporary store and workspace used to hold and manipulate information during a task.

Episodic buffer

Baddeley's 2000 addition: a limited-capacity store that binds information from different sources into episodes.

Embedded processes

Cowan's model: working memory as activated long-term memory, with a focus of attention of about four chunks.

Decay

Loss of a memory trace with the passing of time alone.

Interference

Loss of access because of other, similar items; proactive when older items spoil newer ones.

Serial-position curve

Better recall for the first and last items of a list than for the middle.

Attention sink

The first tokens of a context, on which heads with nothing to read place spare attention.

Eviction

Dropping some cached tokens to save memory, so later tokens cannot read them.

Handover sheet

In this paper, a short record of current facts, rewritten on any change and placed last in the prompt.

Smṛti (स्मृति)

Memory; in Yoga Sūtra 1.11, one of five kinds of mental activity.

Asaṃpramoṣa (असंप्रमोष)

Not letting slip, not stealing away; the Yoga Sūtra's defining mark of memory.

Saṃskāra (संस्कार)

A latent impression left by experience, which produces memory when awakened.

Bīja (बीज)

Seed; in Yogācāra, the trace of experience held in the store-consciousness until it ripens.

RTM

Recognition Theory of Mind, this programme's working hypothesis, with layers L1 responsiveness to L5 the luminous ground.

Where the claims come from

Sources

Primary research

  1. Vaswani, A. et al. (2017). Attention Is All You Need. arXiv:1706.03762. https://arxiv.org/abs/1706.03762
  2. Shazeer, N. (2019). Fast Transformer Decoding: One Write-Head is All You Need. arXiv:1911.02150. https://arxiv.org/abs/1911.02150
  3. Ainslie, J. et al. (2023). GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints. arXiv:2305.13245. https://arxiv.org/abs/2305.13245
  4. DeepSeek-AI (2024). DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model. arXiv:2405.04434. https://arxiv.org/abs/2405.04434
  5. Kwon, W. et al. (2023). Efficient Memory Management for Large Language Model Serving with PagedAttention. arXiv:2309.06180. https://arxiv.org/abs/2309.06180
  6. Xiao, G. et al. (2023). Efficient Streaming Language Models with Attention Sinks. arXiv:2309.17453. https://arxiv.org/abs/2309.17453
  7. Zhang, Z. et al. (2023). H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models. arXiv:2306.14048. https://arxiv.org/abs/2306.14048
  8. Liu, N. F. et al. (2023). Lost in the Middle: How Language Models Use Long Contexts. arXiv:2307.03172. https://arxiv.org/abs/2307.03172
  9. Hsieh, C.-P. et al. (2024). RULER: What's the Real Context Size of Your Long-Context Language Models? arXiv:2404.06654. https://arxiv.org/abs/2404.06654
  10. Ramsauer, H. et al. (2020). Hopfield Networks is All You Need. arXiv:2008.02217. https://arxiv.org/abs/2008.02217
  11. Olsson, C. et al. (2022). In-context Learning and Induction Heads. Transformer Circuits Thread. https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html
  12. Baddeley, A. D. and Hitch, G. (1974). Working Memory. Psychology of Learning and Motivation 8, 47–89. https://doi.org/10.1016/S0079-7421(08)60452-1
  13. Baddeley, A. (2000). The episodic buffer: a new component of working memory? Trends in Cognitive Sciences 4(11), 417–423. https://doi.org/10.1016/S1364-6613(00)01538-2
  14. Cowan, N. (2001). The magical number 4 in short-term memory: a reconsideration of mental storage capacity. Behavioral and Brain Sciences 24(1), 87–114. https://doi.org/10.1017/S0140525X01003922
  15. Miller, G. A. (1956). The magical number seven, plus or minus two. Psychological Review 63(2), 81–97. https://doi.org/10.1037/h0043158
  16. Keppel, G. and Underwood, B. J. (1962). Proactive inhibition in short-term retention of single items. Journal of Verbal Learning and Verbal Behavior 1, 153–161. https://doi.org/10.1016/S0022-5371(62)80023-1
  17. Neath, I. and Brown, G. D. A. (2012). Arguments Against Memory Trace Decay: A SIMPLE Account of Baddeley and Scott. Frontiers in Psychology 3, 35. https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2012.00035/full

Primary texts and translations

  1. Yoga Sūtra 1.11 with Bhoja's Rājamārtaṇḍa. Wisdom Library. https://www.wisdomlib.org/hinduism/book/yoga-sutras-with-bhojas-rajamartanda/d/doc1217006.html
  2. Yoga Sūtra 1.11 with the commentaries of Vyāsa and Vācaspati Miśra. Wisdom Library. https://www.wisdomlib.org/hinduism/book/yoga-sutras-with-commentaries/d/doc1216610.html
  3. Taimni, I. K. The Science of Yoga, sūtras 1.1–1.20. Yoga Sutra Study. https://yogasutrastudy.info/yoga-sutra-translations/ysp-sutras1-01-1-20/
  4. The Nyāya Sūtras of Gotama, translated by S. C. Vidyabhusana. Internet Archive. https://archive.org/stream/NyayaSutra/nyaya_sutras_of_gautama_djvu.txt
  5. Chatterjee, S. The Nyāya Theory of Knowledge: Smṛti or memory. Wisdom Library. https://www.wisdomlib.org/hinduism/essay/the-nyaya-theory-of-knowledge/d/doc1540503.html
  6. Stanford Encyclopedia of Philosophy. Yogācāra. https://plato.stanford.edu/entries/yogacara/
  7. Stanford Encyclopedia of Philosophy. Yogācāra, notes. https://plato.stanford.edu/entries/yogacara/notes.html

Datasets and code

  1. Allal, L. B. et al. (2025). SmolLM2-360M-Instruct (model used in this paper's replication). Hugging Face. https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct

Reuse

Cite this work

Mahapatra, R. R. The KV cache as working memory: does a transformer's store of its context meet the criteria Baddeley and Cowan set out?. Mind Frontier programme, paper U0573. https://rajeshrmahapatra.com/papers/mind-frontier/U0573-kv-cache-working-memory. DOI: to be assigned.

@misc{mahapatra_u0573,
  author = {Mahapatra, Rajesh Ranjan},
  title = {The KV cache as working memory: does a transformer's store of its context meet the criteria Baddeley and Cowan set out?},
  howpublished = {Mind Frontier programme, paper U0573},
  url = {https://rajeshrmahapatra.com/papers/mind-frontier/U0573-kv-cache-working-memory},
  doi = {10.XXXX/placeholder-u0573},
  note = {DOI to be assigned}
}