NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Positions Are Not Facts: The Mismatch Between KV Caches and Memory

Changhai Zhou, Yuhua Zhou, Shiyang Zhang, Jun Gao, Zhen Li, Hua Wu, Hanchao Yu, Haifeng WangarXiv 2026

Updating a large language model's (LLM) knowledge is a bit like trying to edit a book that’s already been printed. In the world of efficient LLM serving, we often use a Key-Value (KV) cache to store the "history" of a conversation or a document, avoiding the need to re-process the same text over and over. But what happens when a fact in that history changes?

A new paper, "Positions Are Not Facts: The Mismatch Between KV Caches and Memory," explores the subtle and often surprising ways that updating a KV cache can go wrong. The authors argue that simply hiding or deleting "outdated" positions in the cache isn't enough because LLM memory is more than just a collection of tokens at specific coordinates—it's a web of dependencies.

TL;DR

Updating facts in an LLM's KV cache is harder than it looks because later cache states depend on earlier ones. Simply masking old records often leads to incomplete answers or lost historical context; instead, preserving the internal relations between tokens is crucial for maintaining a reliable "updatable memory."

What Problem Does This Paper Address?

When we provide an LLM with new information that contradicts old information (e.g., a new project deadline), we want the model to use the new fact for current tasks while potentially still remembering the old one for historical queries.

In serving systems, we try to do this by manipulating the KV cache. The "cheap" way is to just mask the old tokens so the model can't "see" them anymore. The "expensive" way is to delete the old text and recompute the entire cache from scratch. This paper investigates the gap between these methods, revealing that positions in a cache are not the same as semantic facts.

Figure 1: Updating a cached history. Whole-source and number-only masks change access to the same prefilled cache; recomputation rebuilds states from the retained text. We compare complete current, his- torical and unrelated answers, alongside preference between supplied candidates. Record recognition and the cost of applying a decision are separate parts of an update.

Methods

The researchers conducted a series of "intervention experiments" across eight different models (including variants of Qwen, Llama, and Gemma). They compared three main strategies for handling an update:

  1. Whole-source masking: Hiding the entire old record from the model's attention.
  2. Value-only masking: Hiding only the specific outdated value (like a number) while keeping the surrounding context (like the units).
  3. Recomputation: Deleting the old text and rebuilding the cache for the remaining history.

They also looked at how models recognize that an update has even occurred, comparing simple vector similarity in the cache against learned "readouts" and dedicated text detectors.

Datasets

The study utilized a diverse set of benchmarks to test different aspects of memory:

  • Quantity Task: A synthetic task where a later record updates a number but might refer back to the earlier record for the unit (e.g., "Duration = 18; use the earlier unit").
  • MQuAKE: A multi-hop reasoning dataset adapted to contextual updates.
  • BABILong: A long-context (up to 32k tokens) dataset testing the ability to track object trajectories over time.
  • MINTEval & FactConsolidation: Tasks involving Wikipedia revisions and accumulated factual updates in long histories.
  • OAKS: A dataset derived from public-domain novels to test transitions in natural narrative text.

Key Insights and Ideas

  • Preference is not Completeness: This is perhaps the most striking "aha moment." Masking an old record might make a model prefer the new value (higher log probability), but it often results in an incomplete answer. For example, if you mask "12 hours" to update it to "18," the model might give you "18" but forget the unit "hours" because it was only mentioned in the now-hidden record.
Figure 2: Preference and complete answers on the same 60 replacements whose later record refers to the earlier unit. Whole-source masking increases the current-minus-old candidate margin in all eight models, yet six lose complete answers; number-only masking keeps 100% (60) in all eight. Rates use 60 questions per model; counts are in parentheses. Margin changes use each mask’s equal-token control, with all paired 95% group-bootstrap intervals above zero. Full access and source-mask controls both give 98.3–100% (59–60) complete answers per model; the same six lose answers against either. Generic means “unit(s)”.
  • The "Ghost" in the Cache: Later tokens in a KV cache are computed while "looking at" earlier ones. These later states actually store relational information. The authors found that deleting an old record and recomputing these later states at their original positions actually lowered historical accuracy by 20–41 points. However, simply moving (compacting) the existing states had almost no negative effect. This proves that the content of the cache rows carries information that recomputation loses.
  • Similarity $\neq$ Replacement: We might assume that if two records have similar "Keys" in the cache, one replaces the other. The authors found this isn't true. While high key similarity can identify related records, it doesn't tell you if the new one actually supersedes the old one.
  • Query-Dependent Access: There is no single "best" way to update. A strategy that helps answer a question about the current state might break the model's ability to answer a question about the past.

Key Results

The quantitative findings highlight the risks of aggressive cache cleaning:

  • Quantity Task: While masking strengthened the preference for new values in all 8 models, 6 of them lost the ability to provide a "complete" answer (e.g., missing units or failing to stop generating).
  • Historical Accuracy: In multi-hop reasoning (MQuAKE), recomputing the cache after an update caused a massive drop in the model's ability to answer questions about the "before" state, whereas "compacting" the existing cache preserved that knowledge.
  • Model Differences: Different models fail in different ways. For instance, under masking, Gemma models tended to generate correct answers but then fail to stop, hitting token limits, while Qwen models were more likely to omit units entirely.
Figure 3: Answer outcomes on 373 source-answerable FactConsolidation questions from two overlapping histories. Numbers are percentages (counts), with gain/loss contributions in percentage points. Bands connect the same questions across operations. Capped outputs reach 1,024 tokens and may contain incorrect claims; the other categories require normal completion recorded by an EOS token.

Limitations and Future Work

The authors acknowledge several hurdles for practical implementation:

  • Logical Masking Costs: While masking is "cheap" to apply, it doesn't actually free up memory storage, and it can even increase total request time if it causes the model to generate longer, more rambling responses.
  • The Recognition Gap: Detecting replacements in natural, messy text remains a significant challenge. Current detectors aren't yet reliable enough to automate these masking decisions without human-in-the-loop or very specific task constraints.
  • Future Directions: The paper points toward the need for "query-aware" memory systems—systems that don't just have one version of the "truth" in their cache, but can dynamically route different questions to different versions of the history.

Summary updated

BibTeX
@misc{zhou2026positions,
  author = {Changhai Zhou and Yuhua Zhou and Shiyang Zhang and Jun Gao and Zhen Li and Hua Wu and Hanchao Yu and Haifeng Wang},
  title = {{Positions Are Not Facts: The Mismatch Between KV Caches and Memory}},
  year = {2026},
  eprint = {2609.33759},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.33759},
}
Figure