← Latest papers
🤖 machine learning

Sequential KV Cache Compression via Probabilistic Language Tries: Beyond the Per-Vector Shannon Limit

This paper proposes a sequential KV cache compression framework using probabilistic language tries and predictive delta coding to exploit the inherent linguistic structure of token sequences, theoretically achieving compression ratios orders of magnitude higher than current per-vector quantization methods like TurboQuant.

Original authors: Gregory Magarshak

Published 2026-04-20
📖 5 min read🧠 Deep dive

Original authors: Gregory Magarshak

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

Imagine you are a super-intelligent librarian (the AI) who has just finished reading a massive, 100,000-page book. To answer your next question, you need to remember everything you just read.

In the world of AI, this "memory" is called the KV Cache. It's a giant notebook where the AI writes down key details (Key and Value vectors) for every word it processes.

The Current Problem: The "Heavy Backpack"

Right now, every time the AI reads a word, it writes a whole new page in its notebook. Even if the word is just "the" or "and," it writes a full, detailed page.

  • The Old Way (TurboQuant): Researchers recently figured out how to shrink these pages. Instead of writing in full color (16-bit floating point), they write in black and white (3 bits). It's a great improvement, like switching from a hardcover book to a paperback.
  • The Limit: But there's a catch. The AI is still writing a new page for every single word, even if the word is predictable. It's like writing a new page for "The" even though you know the next word is almost certainly "cat" or "dog." You are still carrying a heavy backpack full of redundant pages.

The New Idea: "Predictive Memory"

This paper argues that the AI doesn't need to write a new page for every word. It needs to write a note about what changed.

The authors propose a two-step "magic trick" to shrink the memory by a factor of nearly one million compared to current methods.

Layer 1: The "Shared Story" Trick (Probabilistic Prefix Deduplication)

Imagine two people starting a conversation.

  • Person A: "You are a helpful assistant who loves coding."
  • Person B: "You are a helpful assistant who loves cooking."

Current AI: Writes down the entire sentence for both people. It sees "You are a helpful assistant who loves..." as different because the last word is different.
New AI: Realizes that for the first 90% of the sentence, the meaning is identical. It writes the shared part once in a master notebook. For Person A and Person B, it only writes a tiny sticky note saying: "Person A: change 'coding' to 'cooking'."

This is called Probabilistic Prefix Deduplication. It groups similar conversations together and only stores the differences.

Layer 2: The "Guess and Check" Trick (Predictive Delta Coding)

Now, imagine the AI is reading a story: "The sky is..."

  • Current AI: Writes down the full, detailed memory of the word "blue."
  • New AI: The AI is so good at reading that it already knows the next word is likely "blue." It doesn't write the memory of "blue." Instead, it writes a tiny note: "My guess was 'blue', and the actual word was 'blue'. The difference (residual) is zero."

If the word is something surprising, like "The sky is purple," the note is slightly bigger: "My guess was 'blue', but it was 'purple'. Here is the small difference."

This is Predictive Delta Coding. Instead of storing the whole memory, the AI only stores the error of its own prediction. Since the AI is usually right, the "error" is tiny and takes up almost no space.

Why This Changes Everything

The paper proves a mind-blowing mathematical fact:

  • Old Limit: The amount of space needed depends on how many "bits" you use to write a single word's memory. It's a fixed cost per word.
  • New Limit: The amount of space needed depends on how surprising the word is.
    • If the story is predictable (like a legal contract or a code tutorial), the AI is almost always right. The memory cost drops to almost zero.
    • If the story is chaotic and surprising, the cost goes up, but it's still much lower than before.

The Analogy:
Think of the old method as recording a video of a person walking. You record every single frame, even when they are just standing still.
The new method is like recording a video where you only record the movement. If the person stands still, you record nothing. If they take a step, you record just that step.

The Result

By combining these two tricks:

  1. Sharing the common parts of different conversations.
  2. Only storing the tiny differences between what the AI guessed and what actually happened.

The authors calculate that for long, coherent texts, this method could compress the memory by 900,000 times compared to the best current technology.

Why does this matter?
Currently, if you want an AI to remember a whole book, you need a supercomputer with massive RAM. With this new method, you could potentially run that same AI on a laptop or even a phone, because the "backpack" of memory becomes so light that it barely weighs anything at all.

In short: The paper says, "Stop writing down everything the AI knows. Just write down what the AI didn't guess correctly." And since the AI is a genius guesser, you end up with almost nothing to write down.

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 →