Retrieval Capacity of Self-Attention Under Competition
Researchers measure how few high-attention tokens language models need to match full-context prediction loss.
The paper estimates effective attention set size by keeping only the highest-attention tokens at each head, layer, and query without retraining, then measuring the rise in negative log-likelihood. Small selected sets can stay close to full-attention loss and beat random selection, but the required size grows as context lengthens even as its fraction of context falls. Extra background tokens push a fixed supporting fact down the attention ranking. Renormalizing retained weights can shrink the needed set, and theory links competition and attention-mass retention to larger sets without more distinct information.
- Highest-attention tokens are kept with original weights unchanged.
- Attention selection beats random selection at preserving NLL.
- Longer context raises required set size but lowers its fraction.
- Renormalizing retained weights can substantially shrink the set.
From the original article
1 min read at huggingface.coHow many tokens from its context does a language model actually use, and what determines that number? We study this question through self-attention. Without retraining, we retain only the tokens with the highest attention weights at each head, layer, and query, keeping their original weights unchanged.
By Timur Mudarisov, Mikhail Burtsev, Radu State · huggingface.co
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.