When Can Attention Heads Be Statically Defined?
Not on the map. Why?
Abstract (arXiv)
Some attention heads learn similar patterns across inputs. Reusing these patterns could reduce training cost by avoiding repeated query-key score computation and softmax. Through controlled pretraining comparisons, we identify Selective Attention Freezing (SAF), which selects heads with low attention-pattern variance and replaces their attention weights with fitted post-softmax means halfway through training. We represent these fixed patterns with absolute-position and relative-distance preferences, reducing storage from quadratic to linear in sequence length. A fused kernel reconstructs the patterns and executes ordinary-attention and replaced heads together. At matched training-token budgets, replacing 25% of attention heads gives 1.056x faster post-replacement optimiser updates at 124M parameters and 4K context, with a 0.77% perplexity increase. At 1B and 8K context, post-replacement updates are 1.068x faster on four GPUs including communication, with a 0.51% perplexity increase. The resulting models also accelerate long-input finetuning and causal prefill. After associative-recall adaptation, the 124M model with 25% replacement generalises to more key-value pairs at a fixed length better than ordinary attention and two pruning controls.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 44 of its 48 references that are in the map. First posted on arXiv 28 Sep 2026.
Builds on
44 of 48 references.
References · 44
- 2017Attention Is All You Needcited by 60,361
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2022Training Compute-Optimal Large Language Modelscited by 3,019
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
32 more
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
- 2019Are Sixteen Heads Really Better than One?cited by 816
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 415
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 383
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 383
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 288
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
- 2021QuALITY: Question Answering with Long Input Texts, Yes!cited by 208
- 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 205
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
- 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 115
- 2023Fluctuation-based Adaptive Structured Pruning for Large Language Modelscited by 111
- 2020Accelerating Training of Transformer-Based Language Models with Progressive Layer Droppingcited by 93
- 2017FreezeOut: Accelerate Training by Progressively Freezing Layerscited by 54
- 2021AutoFreeze: Automatically Freezing Model Blocks to Accelerate Fine-tuningcited by 48
- 2020Fixed Encoder Self-Attention Patterns in Transformer-Based Machine Translationcited by 43
- 2020Hard-Coded Gaussian Attention for Neural Machine Translationcited by 42
- 2023What can a Single Attention Layer Learn? A Study Through the Random Features Lenscited by 40
- 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 21
- 2024Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactionscited by 12
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformercited by 12
- 2023BERT is not The Count: Learning to Match Mathematical Statements with Proofscited by 10
- 2026Spectral Attention Steering for Prompt Highlightingcited by 8
- 2025From Local to Global: Revisiting Structured Pruning Paradigms for Large Language Modelscited by 6
- 2026Why Attention Patterns Exist: A Unifying Temporal Perspective Analysiscited by 5
- 2025LayerLock: Non-collapsing Representation Learning with Progressive Freezingcited by 4
- 2025Compute-Optimal Quantization-Aware Trainingcited by 4
- 2024Pruning Large Language Models to Intra-module Low-rank Architecture with Transitional Activationscited by 2
- 2025Deconstructing Attention: Investigating Design Principles for Effective Language Modelingcited by 2
- 2025The Strong Lottery Ticket Hypothesis for Multi-Head Attention Mechanismscited by 2
Built on by
Not cited yet.