← Latest papers
🤖 machine learning

Models Take Notes at Prefill: KV Cache Can Be Editable and Composable

This paper reveals that during prefill, models primarily store field-conditioned conclusions in downstream KV cache notes rather than relying on the field's own vectors, enabling a novel approach where caches can be efficiently edited via chain-of-thought and composed across contexts to achieve near-perfect accuracy with significantly reduced latency compared to full recomputation.

Original authors: Bojie Li

Published 2026-06-17
📖 5 min read🧠 Deep dive

Original authors: Bojie Li

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Idea: The Model's "Notebook"

Imagine a large language model (like a very smart robot assistant) is reading a long document to answer a question. Usually, when the robot reads a sentence, it "thinks" about it and then moves on. If the sentence changes later, the robot has to re-read the whole document from the beginning to understand the new context. This is slow and expensive.

This paper discovers something surprising: The robot doesn't just read the document; it takes notes on a separate "notebook" (the KV Cache) as it reads.

Crucially, the robot writes its conclusions into this notebook, not just the raw words. Once it figures out, "Oh, the order status is 'shipped,' so I must deny the refund," it writes that conclusion down in the notebook. Later, when it needs to make a decision, it doesn't look back at the original sentence; it just reads its own notes.

The Problem: The "Stale Note" Trap

The researchers tried a simple fix when a piece of information changed (e.g., the order status changed from "shipped" to "pending"). They thought: "If I just update the specific word in the text, the robot will see the change and update its answer."

They were wrong.

Because the robot had already written its conclusion ("Deny the refund") into the notebook based on the old information, simply changing the original word didn't work. The robot ignored the change and kept reading its old note. It was like trying to change a math problem from 2+2=42+2=4 to 2+2=52+2=5 on a piece of paper, but the student had already written "The answer is 4" in their notebook and was just copying that down. The student wouldn't notice the change in the problem unless you forced them to re-read the whole page.

The Solution 1: The "Erratum" (The Sticky Note)

Since the robot relies on its notes, the researchers found a way to fix the mistake without re-reading the whole book.

Instead of trying to surgically erase and rewrite the old note (which fails), they simply append a new, loud note at the end of the document.

  • The Analogy: Imagine the robot is reading a contract. You can't easily cross out a clause in the middle of the contract without messing up the page numbers. Instead, you stick a bright yellow "ERRATUM" note at the very end that says: "Ignore the previous note. The status is now 'Pending'. The answer is 'Approve'."
  • The Result: The robot sees this new, loud note, updates its decision, and ignores the old note. This is incredibly fast and works almost perfectly.

The Solution 2: "Composing" Skills (The Lego Brick)

The second discovery is about reusing work.

Imagine you have a long, complex instruction manual for a specific task (like "How to book a flight"). Usually, every time you ask the robot to book a flight, it has to read that whole manual from scratch.

The researchers found that because the robot writes its conclusions into the notebook, you can pre-write the notes for that manual once, save them, and then "paste" them into a new conversation.

  • The Analogy: Instead of reading a 50-page instruction manual every time you need to build a chair, you have a pre-assembled "Chair Kit" (the notes). You just grab the kit and drop it into your workspace.
  • The Magic: You can move this kit to a different spot in the conversation (reposition it) and it still works perfectly. The robot doesn't need to re-read the manual; it just picks up the pre-written notes and continues. This makes the process 14 times faster for long documents.

Why This Matters

  1. It's Editable: If a user changes a detail (like their name or an order status), you don't need to restart the whole conversation. You just add a "correction note" at the end, and the robot instantly updates its behavior.
  2. It's Composable: You can build a library of "skills" (like a recipe for booking flights or a guide for handling returns). You can pre-compute these skills and paste them into any conversation instantly, saving massive amounts of time and computer power.
  3. It Works Everywhere: The researchers tested this on many different types of AI models (from small ones to huge ones, and even models that look at images), and it worked for all of them.

Summary in One Sentence

The paper reveals that AI models write their conclusions into a hidden notebook as they read; by realizing this, we can fix mistakes by adding a "correction note" at the end and speed up tasks by pasting in pre-written "skill notes," rather than forcing the AI to re-read everything from scratch.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →