SoftmaxLift reduces key retrieval for long-context attention
Attention via Black-Box Vector Search · arXiv:2610.10135

In plain words
Long-context AI models compare a new token with earlier tokens to decide what information matters. This paper develops a method for estimating that attention from a small set of retrieved keys, where each key represents an earlier token and carries a score for the new query.
Its SoftmaxLift method gives keys random priorities and retrieves the highest ones. On 60 matched 128K examples, it produced lower attention error and a higher task score than two other retrieval strategies using the same exact search and 128-key budget.
The research
As contexts grow, exact attention compares each new query with every preceding token, so computation grows with the context.
Sparse methods can retrieve keys with large query scores, but the key question is whether they can estimate the full attention result accurately with a bounded search and retrieval budget.
It develops priority sampling for maximum inner product search (MIPS), which finds high-scoring keys, then adds a dimension so one index can estimate attention with O(1/ε²) retrieved keys.
Priority sampling gives keys random priorities based on their attention weights, then uses a threshold to reweight the selected keys. This lets a small retrieved set estimate the weighted values and total weight that exact attention would compute over the whole context.
On 60 matched 128K examples, SoftmaxLift more closely matched the full attention result and achieved a higher score on RULER’s synthetic long-context tasks than TopK and TopK+Sampling. The methods used the same exact search and a 128-key retrieval budget. This supports the comparison under those evaluated conditions.
The theoretical guarantees assume an exact search oracle and do not account fully for the cost of building or implementing search. The 1M-context comparison covers only eight examples and changes both the attention procedure and hardware path, so it is preliminary.
What the evidence shows
- The attention estimation problem
This paper’s priority-sampling framework is a method for estimating attention from keys found by maximum inner product search (MIPS), which retrieves keys whose inner products with a query are large. The motivating issue is that exact attention compares a new query with every preceding token as context grows.
Sparse attention uses fewer keys, but retrieving only the largest attention weights may not estimate the full result well.
- How sampling builds an estimate
Priority sampling gives each key a random scale and divides its attention weight by that scale to set a priority. The method retrieves the highest priorities and uses the next priority as a threshold to reweight the selected keys.
This is designed to estimate both parts of attention: the weighted sum of values and the total weight. The retrieval strategy determines how the highest priorities are found.
- Search budget sets the cost
The theory measures the tradeoff between the number of search indices and the number of retrieved keys. With one ordinary MIPS index, O(√n/ε) keys suffice for the stated accuracy, and the lower bound is Ω(min{n, √n/ε}).
With Θ(log n) indices, an adaptive method uses O(log n+1/ε²) keys, near the corresponding lower bound up to a log log n factor.
- Augmentation changes the bound
SoftmaxLift adds a dimension to keys and queries so their inner products rank keys by randomized priority. In the augmented model, the paper proves that one index and O(1/ε²) retrieved keys suffice, independent of context length. This guarantee assumes an exact search oracle and applies to the augmented-key model.
- Tests support a bounded result
In a comparison on 60 matched 128K-context examples, SoftmaxLift had lower attention error and a higher percentage task score on RULER’s synthetic long-context tasks than TopK and TopK+Sampling, with the same exact search oracle and 128-key budget.
At 1M context, it also had a higher generation rate than exact GPU attention on eight examples, but with a lower task score and a different hardware path. The larger-context evidence is preliminary.
Deep
- Original paper authors
- Stepan Zharkov, Krish Singal, Ashwin Padaki, Alexandr Andoni
- Submitted to arXiv
- License
- CC BY 4.0