Chiosa
Machine Learning

SoftmaxLift reduces key retrieval for long-context attention

2 min ·

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.

Analysis

Deep