Exploiting Biases in Attention for Transformers
Charles Herr, Gabriele Spadaro, Enzo Tartaglione
Key points
From the paper's conclusion- We show that this new term gives each token a scalar value indicating its anticipated influence on other tokens during the attention process, and can thus serve as a proxy for pruning attention maps.
Abstract
Attention is known to be sparse in vision transformers. In particular, we analyze the unequal relevance of attention-matrix columns to the final computation and show that this phenomenon becomes increasingly pronounced with network depth. This can be interpreted as saying that tokens have an absolute importance for the attention process, independently of queries. Inspired by this, we propose a reformulation of the attention formula that makes this phenomenon explicit by adding an input-dependent bias to the query-key dot product. We show that this new term gives each token a scalar value indicating its anticipated influence on other tokens during the attention process, and can thus serve as a proxy for pruning attention maps. Across multiple transformer model sizes, this allows us to substantially reduce the computational cost of attention, in terms of both FLOPs and inference latency, while retaining most of the original classification accuracy. We publicly released the code and models at https://github.com/EIDOSLAB/AttentionWithBias.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A survey of sparse attention in vision transformers: Taxonomy, methods and analysis.Neural networks : the official journal of the International Neural Network Society · 2026
- SVD-Attention: Efficiently Analyzing Attention Blocks in TransformersarXiv · 2026
- Not All Attention Is Equal: A Quantitative Survey of the EEI Trade-offarXiv · 2026
- ClusterAttention: A training-free speedup of bidirectional attentionarXiv · 2026
- Toward a Theoretical Understanding of Transformer Attention: Bayesian Estimation and Predictive SufficiencyarXiv · 2026
- Beyond Head Importance: Collective Computation in Video TransformersarXiv · 2026