mlsanityData to 14 Oct 2026

Selective Attention: Enhancing Transformer through Principled Context Control

arXiv 2411.12892 ↗First posted 19 Nov 2024cs.LG cs.CLcited by 16

Not on the map. Why?

Abstract (arXiv)

The attention mechanism within the transformer architecture enables the model to weigh and combine tokens based on their relevance to the query. While self-attention has enjoyed major success, it notably treats all queries q in the same way by applying the mapping V^topsoftmax(Kq), where V,K are the value and key embeddings respectively. In this work, we argue that this uniform treatment hinders the ability to control contextual sparsity and relevance. As a solution, we introduce the textitSelective Self-Attention (SSA) layer that augments the softmax nonlinearity with a principled temperature scaling strategy. By controlling temperature, SSA adapts the contextual sparsity of the attention map to the query embedding and its position in the context window. Through theory and experiments, we demonstrate that this alleviates attention dilution, aids the optimization process, and enhances the model's ability to control softmax spikiness of individual queries. We also incorporate temperature scaling for value embeddings and show that it boosts the model's ability to suppress irrelevant/noisy tokens. Notably, SSA is a lightweight method which introduces less than 0.5% new parameters through a weight-sharing strategy and can be fine-tuned on existing LLMs. Extensive empirical evaluations demonstrate that SSA-equipped models achieve a noticeable and consistent accuracy improvement on language modeling benchmarks.

Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Builds on 45 of its 55 references that are in the map. First posted on arXiv 19 Nov 2024.

Builds on

45 of 55 references.

References · 45

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  6. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  7. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  8. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  9. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  10. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  11. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  12. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
33 more
  1. 2016Pointer Sentinel Mixture Modelscited by 3,096
  2. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  3. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  4. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  5. 2020GLU Variants Improve Transformercited by 1,804
  6. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  7. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  8. 2021Multitask Prompted Training Enables Zero-Shot Task Generalizationcited by 1,470
  9. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  10. 2022In-context Learning and Induction Headscited by 964
  11. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  12. 2016Language Modeling with Gated Convolutional Networkscited by 702
  13. 2020Long-tail learning via logit adjustmentcited by 618
  14. 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
  15. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 419
  16. 2022Long Range Language Modeling via Gated State Spacescited by 265
  17. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 213
  18. 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
  19. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  20. 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
  21. 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
  22. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
  23. 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
  24. 2023SlimPajama-DC: Understanding Data Combinations for LLM Trainingcited by 72
  25. 2024MambaByte: Token-free Selective State Space Modelcited by 59
  26. 2023Max-Margin Token Selection in Attention Mechanismcited by 58
  27. 2022AutoBalance: Optimized Loss Functions for Imbalanced Datacited by 49
  28. 2023GateLoop: Fully Data-Controlled Linear Recurrence for Sequence Modelingcited by 46
  29. 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformerscited by 34
  30. 2022Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision Transformerscited by 30
  31. 2023Sparse Modular Activation for Efficient Sequence Modelingcited by 20
  32. 2023Attention Alignment and Flexible Positional Embeddings Improve Transformer Length Extrapolationcited by 9
  33. 2024Class-attribute Priors: Adapting Optimization to Heterogeneity and Fairness Objectivecited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 10.

16 papers.

Sort:

By area:

  1. 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 283
  2. 2026Semantic XPath: Structured Agentic Memory Access for Conversational AIcited by 7
  3. 2026Attention Smoothing Is All You Need For Unlearningcited by 7
  4. 2025SpiLiFormer: Enhancing Spiking Transformers with Lateral Inhibitioncited by 3
  5. 2025DSAS: A Universal Plug-and-Play Framework for Attention Optimization in Multi-Document Question Answeringcited by 3
  6. 2026Scaling Limits of Long-Context Transformerscited by 3
  7. 2025OmniSparse: Training-Aware Fine-Grained Sparse Attention for Long-Video MLLMscited by 2
  8. 2025PromptDistill: Query-based Selective Token Retention in Intermediate Layers for Efficient Large Language Model Inferencecited by 1
  9. 2026TranX-Adapter: Bridging Artifacts and Semantics within MLLMs for Robust AI-generated Image Detectioncited by 1
  10. 2026Screening Is Enoughcited by 1
  11. 2025Can We Go Beyond Visual Features? Neural Tissue Relation Modeling for Relational Graph Analysis in Non-Melanoma Skin Histologycited by 0
  12. 2026Attention-guided Evidence Grounding for Spoken Question Answeringcited by 0
4 more
  1. 2026Good Token Hunting: A Hitchhiker's Guide to Token Selection for Visual Geometry Transformerscited by 0
  2. 2026Enhancing Multi-Agent Communication through Attention Steering with Context Relevancecited by 0
  3. 2026Pre-registered tests of solid-state-physics-inspired LLM compression: a cluster-level negative result at small-language-model scalecited by 0
  4. 2026Message Passing Does More with Less for In-Context Learning on Graphscited by 0