← Latest papers
🤖 AI

Nearly Optimal Attention Coresets

This paper establishes the existence of nearly optimal-sized attention coresets for unit-norm keys and values, providing an improved upper bound of O(deρ+o(ρ)/ε)O(\sqrt{d} e^{\rho+o(\rho)}/\varepsilon) and a matching lower bound of Ω(deρ/ε)\Omega(\sqrt{d} e^{\rho}/\varepsilon) that outperforms previous results.

Original authors: Edo Liberty, Alexandr Andoni, Eldar Kleiner

Published 2026-05-08
📖 4 min read☕ Coffee break read

Original authors: Edo Liberty, Alexandr Andoni, Eldar Kleiner

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 running a massive library (a modern AI model) where every book has a "Key" (a summary of what it's about) and a "Value" (the actual content). When a reader asks a question (a "Query"), the librarian uses a special mechanism called Attention to scan all the books, figure out which ones are most relevant, and summarize their content into a single answer.

As the library grows to hold millions of books, the librarian's desk becomes cluttered. Keeping track of every single book's Key and Value takes up too much space and slows everything down. The goal of this paper is to figure out: How many books can we throw away from the desk while still giving the reader the exact same answer?

Here is the breakdown of the paper's findings using simple analogies:

1. The Problem: The "Cherry-Picker"

The authors explain that you can't just throw away random books. If a reader asks a very specific, intense question (like "Find me the one book that mentions a specific rare word"), the librarian needs to be able to isolate that single book perfectly. If you remove too many books, you might lose that specific one, and the answer will be wrong.

In technical terms, if a reader's question is allowed to be infinitely "loud" or intense, you can't compress the library at all. You'd have to keep every single book.

The Solution: The paper says, "Let's agree that readers won't shout too loudly." If we limit how intense the questions can be (a "bounded norm"), we can safely throw away most of the books and keep only a tiny, carefully selected group that represents the whole library.

2. The Magic Trick: The "Balancing Act"

The core of the paper is a mathematical method to pick which books to keep. The authors use a technique called Coreset Selection.

Imagine you have a giant pile of weights (the books) on a scale. You want to remove half the weights but keep the scale perfectly balanced so it doesn't tip.

  • The Old Way: Previous methods tried to balance the scale by looking at the weights one by one, which was slow and left a lot of extra "noise" (error).
  • The New Way: The authors use a clever mathematical trick (based on a theorem called Banaszczyk's vector balancing). They imagine the weights as arrows pointing in different directions. They assign a "plus" or "minus" sign to every book.
    • If the signs are chosen perfectly, the "plus" books and "minus" books cancel each other out almost completely.
    • The books with the "plus" signs become your new, tiny library.
    • Because the "minus" books cancelled out the noise, the "plus" books still represent the whole group perfectly.

3. The Result: "Nearly Optimal" Size

The paper proves two main things:

  • The Good News (Upper Bound): They found a way to shrink the library down to a size of roughly d×eρ\sqrt{d} \times e^{\rho} (where dd is how complex the books are, and ρ\rho is how loud the questions can be). This is the smallest size they could mathematically prove is possible using their method. It's much smaller than what anyone had found before.
  • The Bad News (Lower Bound): They also proved that you cannot go much smaller than this. If you try to shrink the library further, there will inevitably be some questions where the answer becomes wrong.

Think of it like packing a suitcase. The authors found a way to fold your clothes so tightly that the suitcase is almost as small as physically possible. They also proved that you can't fold them any tighter without crushing the clothes.

4. Why This Matters

In the world of AI, "Keys" and "Values" are the memory of the model. As AI models try to remember longer and longer conversations (context), this memory becomes huge and expensive.

This paper provides a theoretical guarantee that we can compress this memory significantly without losing accuracy, as long as the questions aren't too extreme. It tells engineers: "You don't need to keep 100% of the data. You can keep a tiny fraction, and mathematically, the AI will still work just as well."

Summary in a Sentence

The authors discovered a mathematical "folding technique" that allows AI models to shrink their memory down to the smallest possible size without losing accuracy, proving that this new size is almost the absolute limit of what is physically possible.

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 →