mlsanityData to 14 Oct 2026

Simulating Hard Attention Using Soft Attention

arXiv 2412.09925 ↗First posted 13 Dec 2024cs.LG cs.CL cs.FLcited by 15

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2016Layer Normalizationcited by 5,669
  3. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  4. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
  5. 2022Transformers Learn Shortcuts to Automatacited by 268
  6. 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 260
  7. 2024The Illusion of State in State-Space Modelscited by 187
  8. 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
  9. 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
  10. 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
  11. 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
  12. 2015Representation Benefits of Deep Feedforward Networkscited by 86
10 more
  1. 2024Transformers, parallel computation, and logarithmic depthcited by 79
  2. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 75
  3. 2017DiSAN: Directional Self-Attention Network for RNN/CNN-Free Language Understandingcited by 71
  4. 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 49
  5. 2023Learning Transformer Programscited by 41
  6. 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
  7. 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 38
  8. 2024Transformers Can Represent n-gram Language Modelscited by 32
  9. 2024Transformers as Transducerscited by 8
  10. 2024Improving Rare Word Translation With Dictionaries and Attention Maskingcited by 2

Built on by

Cited by year (2026 to 14 Oct)

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

15 papers.

Sort:

By area: