Learning When Not to Attend Globally
Not on the map. Why?
Abstract (arXiv)
When reading books, humans focus primarily on the current page, flipping back to recap prior context only when necessary. Similarly, we demonstrate that Large Language Models (LLMs) can learn to dynamically determine when to attend to global context. We propose All-or-Here Attention (AHA), which utilizes a binary router per attention head to dynamically toggle between full attention and local sliding window attention for each token. Our results indicate that with a window size of 256 tokens, up to 93% of the original full attention operations can be replaced by sliding window attention without performance loss. Furthermore, by evaluating AHA across various window sizes, we identify a long-tail distribution in context dependency, where the necessity for full attention decays rapidly as the local window expands. By decoupling local processing from global access, AHA reveals that full attention is largely redundant, and that efficient inference requires only on-demand access to the global context.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 36 of its 41 references that are in the map. First posted on arXiv 27 Dec 2025.
Builds on
36 of 41 references.
References · 36
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 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
24 more
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Trainingcited by 1,053
- 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
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 815
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 506
- 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 283
- 2024Mixture-of-Depths: Dynamically allocating compute in transformer-based language modelscited by 258
- 2015Conditional Computation in Neural Networks for faster modelscited by 167
- 2023CoLT5: Faster Long-Range Transformers with Conditional Computationcited by 84
- 2022Mixture of Attention Heads: Selecting Attention Heads Per Tokencited by 60
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengthscited by 44
- 2020Controlling Computation versus Quality for Neural Sequence Modelscited by 27
- 2020Differentiable Window for Dynamic Local Attentioncited by 8
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026On-Demand Attention: Language Models Know When to Recallcited by 0
- 2026On-Demand Attention: Language Models Know When to Recall17 Sep 2026