Nearly Optimal Attention Coresets
Alexandr Andoni, Eldar Kleiner, Edo Liberty
NeurIPS page · Open on the map
Category: Time Series, PDEs & Probabilistic ML › Coresets and Efficient Summarization for Clustering · Type: theory · Keywords: attention compression, coresets, theoretical bounds, transformer efficiency, approximation guarantees
Summary
The paper introduces nearly optimal attention coresets that approximate the attention mechanism within ε for all bounded queries, providing provable size guarantees.
Explained to a 5-year-old
We want to understand how a computer looks at many pieces of information at once. It uses something called attention to focus on the most important parts. The paper finds a way to pick only a few key pieces that still give almost the same result. This helps the computer use less memory and run faster. It’s like choosing only the biggest cookies to share the taste.
Explained to a 5-year-old, longer
Imagine a computer that reads many words at the same time. It looks at each word and decides which ones are most important. The paper shows how to pick a small group of those important words that still work well. This small group is called a coreset. By using fewer words, the computer needs less memory. It can still understand the text almost as well as before. The method works for any size of words and any type of questions. It also tells us how small the group can be at best. This helps make big language models run faster on small devices. It also saves energy because less data is processed. The idea is simple: pick the best few to represent the many. This makes complex computers easier to use everywhere.
For a technical reader
The paper addresses the problem of compressing the attention operation in transformer models while preserving its output accuracy. It proves that a carefully selected subset of keys and values (a coreset) can approximate the full attention matrix within a user-specified error ε for all queries with bounded norm. The derived upper bound shows the subset size scales as O(√d eζ/ε), and a matching lower bound demonstrates this scaling is optimal. This theoretical result provides a principled way to reduce memory footprint and computational load in production-grade models. Engineers can use these guarantees to design more efficient attention implementations without extensive empirical tuning.
Problem
Estimating the attention mechanism using a small subset of keys and values (a coreset) while guaranteeing approximation error ε for all queries with bounded norm.
Method
The authors construct a subset of keys and values (a coreset) whose size scales as O(√d eζ/ε) and prove that it approximates the full attention output within ε for all queries with norm ≤ ζ. They also derive an improved lower bound matching this scaling up to lower-order terms.
Results
The proposed coresets achieve size O(√d eζ+o(ζ)/ε), improving upon prior results, and the lower bound shows that coresets must be at least Ω(√d eζ/ε) in size.
Contributions
Provides nearly optimal size coresets for attention with provable approximation guarantees and matches a new lower bound, advancing theoretical understanding of attention compression.
Limitations and assumptions
Assumes unit-norm keys and values and bounded query norm ζ; analysis may not cover non-unit-norm or unbounded queries.
Practical relevance
Enables more memory-efficient deployment of attention mechanisms in large models without sacrificing accuracy.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction