Simulating Hard Attention Using Soft Attention
Not on the map. Why?
Abstract (arXiv)
We study conditions under which transformers using soft attention can simulate hard attention, that is, effectively focus all attention on a subset of positions. First, we examine several subclasses of languages recognized by hard-attention transformers, which can be defined in variants of linear temporal logic. We demonstrate how soft-attention transformers can compute formulas of these logics using unbounded positional embeddings or temperature scaling. Second, we demonstrate how temperature scaling allows softmax transformers to simulate general hard-attention transformers, using a temperature that depends on the minimum gap between the maximum attention scores and other attention scores.
Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Builds on 22 of its 33 references that are in the map. First posted on arXiv 13 Dec 2024.
Builds on
22 of 33 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2016Layer Normalizationcited by 5,669
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2022Transformers Learn Shortcuts to Automatacited by 268
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
- 2024The Illusion of State in State-Space Modelscited by 187
- 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
- 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
- 2015Representation Benefits of Deep Feedforward Networkscited by 86
10 more
- 2024Transformers, parallel computation, and logarithmic depthcited by 79
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
- 2017DiSAN: Directional Self-Attention Network for RNN/CNN-Free Language Understandingcited by 71
- 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 49
- 2023Learning Transformer Programscited by 41
- 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
- 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 38
- 2024Transformers Can Represent n-gram Language Modelscited by 32
- 2024Transformers as Transducerscited by 8
- 2024Improving Rare Word Translation With Dictionaries and Attention Maskingcited by 2
Built on by
Citing papers per year: 2025: 9; 2026: 6.
15 papers.
Sort:
By area:
- 2025Unique Hard Attention: A Tale of Two Sidescited by 10
- 2025The Counting Power of Transformerscited by 9
- 2025Softmax Transformers are Turing-Completecited by 9
- 2025The Transformer Cookbookcited by 6
- 2025SlideBot: A Multi-Agent Framework for Generating Informative, Reliable, Multi-Modal Presentationscited by 5
- 2026Parity, Sensitivity, and Transformerscited by 5
- 2026Length Generalization Bounds for Transformerscited by 4
- 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More Morecited by 3
- 2025Concise One-Layer Transformers Can Do Function Evaluation (Sometimes)cited by 3
- 2026Characterizing the Expressivity of Local Attention in Transformerscited by 3
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2025The Role of Logic and Automata in Understanding Transformerscited by 1
3 more
- 2026VC Dimension and Expressivity of Real-Valued Transformers25 Sep 2026
- 2026On the Expressive Power of Transformers13 Aug 2026
- 2026Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't28 May 2026
- 2026Characterizing the Expressivity of Local Attention in Transformers1 May 2026
- 2026Length Generalization Bounds for Transformers13 Feb 2026
- 2026Parity, Sensitivity, and Transformers5 Feb 2026
- 2025Softmax Transformers are Turing-Complete25 Nov 2025
- 2025SlideBot: A Multi-Agent Framework for Generating Informative, Reliable, Multi-Modal Presentations12 Nov 2025
- 2025The Transformer Cookbook1 Oct 2025
- 2025The Role of Logic and Automata in Understanding Transformers28 Sep 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025The Counting Power of Transformers16 May 2025
- 2025Softmax Transformers are Turing-Completecited by 9
- 2025Softmax Transformers are Turing-Complete25 Nov 2025
- 2025Unique Hard Attention: A Tale of Two Sidescited by 10
- 2025The Counting Power of Transformerscited by 9
- 2025The Transformer Cookbookcited by 6
- 2026Parity, Sensitivity, and Transformerscited by 5
- 2026Length Generalization Bounds for Transformerscited by 4
- 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More Morecited by 3
- 2025Concise One-Layer Transformers Can Do Function Evaluation (Sometimes)cited by 3
- 2026Characterizing the Expressivity of Local Attention in Transformerscited by 3
- 2025On the Existence of Universal Simulators of Attentioncited by 1
- 2025The Role of Logic and Automata in Understanding Transformerscited by 1
- 2026Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don'tcited by 1
- 2026On the Expressive Power of Transformerscited by 0
12 most cited of 13 All 13 (JSON)
- 2026VC Dimension and Expressivity of Real-Valued Transformers25 Sep 2026
- 2026On the Expressive Power of Transformers13 Aug 2026
- 2026Revisiting Padded Transformer Expressivity: Which Architectural Choices Matter and Which Don't28 May 2026
- 2026Characterizing the Expressivity of Local Attention in Transformers1 May 2026
- 2026Length Generalization Bounds for Transformers13 Feb 2026
- 2026Parity, Sensitivity, and Transformers5 Feb 2026
- 2025The Transformer Cookbook1 Oct 2025
- 2025The Role of Logic and Automata in Understanding Transformers28 Sep 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025The Counting Power of Transformers16 May 2025
- 2025Concise One-Layer Transformers Can Do Function Evaluation (Sometimes)28 Mar 2025
- 2025Unique Hard Attention: A Tale of Two Sides18 Mar 2025
12 newest of 13 All 13 (JSON)