English

Efficient Attention via Pre-Scoring: Prioritizing Informative Keys in Transformers

Machine Learning 2026-02-10 v4

Abstract

Efficient attention mechanisms enable long-context transformers but often miss globally important tokens, degrading modeling quality. We introduce a pre-scoring framework that assigns a query-independent global importance prior to keys before applying hierarchical approximate attention. Using clustering-based or leverage-style scoring, pre-scoring identifies structurally informative keys and restricts computation to this prioritized subset. Integrated with HyperAttention, pre-scoring substantially improves approximation quality on long-context language modeling: on ChatGLM with 131k-token contexts, perplexity decreases from 12.0 to 9.5 under a fixed interaction budget while retaining subquadratic efficiency. Clustering-based scoring consistently outperforms leverage-based selection under identical key budgets. Beyond language, replacing self-attention in Vision Transformers preserves most of the baseline accuracy, showing that the approach generalizes across modalities. We provide structural guarantees under a planted-subspace model, showing that clustering recovers the same heavy-key sets as leverage-based methods. Overall, pre-scoring improves the efficiency-accuracy trade-off of approximate attention by better prioritizing informative keys without sacrificing scalability.

Keywords

Cite

@article{arxiv.2505.11040,
  title  = {Efficient Attention via Pre-Scoring: Prioritizing Informative Keys in Transformers},
  author = {Zhexiang Li and Haoyu Wang and Yutong Bao and David Woodruff},
  journal= {arXiv preprint arXiv:2505.11040},
  year   = {2026}
}
R2 v1 2026-06-28T23:35:40.221Z