mlsanityData to 7 Oct 2026

On the Existence of Universal Simulators of Attention

arXiv 2506.18739 ↗First posted 23 Jun 2025cs.LG cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Previous work on the learnability of transformers textemdash focused primarily on examining their ability to approximate specific algorithmic patterns through training textemdash has largely been data-driven, offering only probabilistic guarantees rather than deterministic solutions. Expressivity, on the contrary, has been devised to address the problems computable by such architecture theoretically. These results proved the Turing-completeness of transformers, investigated bounds focused on circuit complexity, and formal logic. Being at the crossroad between learnability and expressivity, the question remains: can a transformer, as a computational model, simulate an arbitrary attention mechanism, or in particular, the underlying operations? In this study, we investigate the transformer encoder's ability to simulate a vanilla attention mechanism. By constructing a universal simulator U composed of transformer encoders, we present algorithmic solutions to replicate attention outputs and the underlying elementary matrix and activation operations via RASP, a formal framework for transformer computation. We show the existence of an algorithmically achievable, data-agnostic solution, previously known to be approximated only by learning.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 48 of its 62 references that are in the map. First posted on arXiv 23 Jun 2025.

Builds on

48 of 62 references.

References · 48

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  3. 2020Rethinking Attention with Performerscited by 1,584
  4. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  5. 2018Universal Transformerscited by 613
  6. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
  7. 2021A Survey of Transformerscited by 399
  8. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  9. 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
  10. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
  11. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  12. 2022Transformers Learn Shortcuts to Automatacited by 260
36 more
  1. 2023Looped Transformers as Programmable Computerscited by 224
  2. 2022Neural Networks and the Chomsky Hierarchycited by 214
  3. 2018Sorting out Lipschitz function approximationcited by 211
  4. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
  5. 2021Thinking Like Transformerscited by 182
  6. 2021Inductive Biases and Variable Creation in Self-Attention Mechanismscited by 144
  7. 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
  8. 2023Representational Strengths and Limitations of Transformerscited by 132
  9. 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
  10. 2023What Formal Languages Can Transformers Express? A Surveycited by 120
  11. 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 110
  12. 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
  13. 2023Tracr: Compiled Transformers as a Laboratory for Interpretabilitycited by 99
  14. 2022Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexitycited by 92
  15. 2020On the Computational Power of Transformers and its Implications in Sequence Modelingcited by 85
  16. 2022A Logic for Expressing Log-Precision Transformerscited by 67
  17. 2023Transformers as Support Vector Machinescited by 67
  18. 2023Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Contextcited by 63
  19. 2020A Formal Hierarchy of RNN Architecturescited by 61
  20. 2022Your Transformer May Not be as Powerful as You Expectcited by 55
  21. 2023Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languagescited by 47
  22. 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regressioncited by 47
  23. 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
  24. 2023Logical Languages Accepted by Transformer Encoders with Hard Attentioncited by 37
  25. 2024Transformers are Minimax Optimal Nonparametric In-Context Learnerscited by 36
  26. 2023Sumformer: Universal Approximation for Efficient Transformerscited by 30
  27. 2020Approximating Lipschitz continuous functions with GroupSort neural networkscited by 27
  28. 2024Transformers in Uniform TC0cited by 25
  29. 2024How Well Can Transformers Emulate In-context Newton's Method?cited by 23
  30. 2023Transformers can optimally learn regression mixture modelscited by 15
  31. 2024Simulating Hard Attention Using Soft Attentioncited by 15
  32. 2024Transformers as Transducerscited by 8
  33. 2021Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanationscited by 7
  34. 2024ALTA: Compiler-Based Analysis of Transformerscited by 7
  35. 2024Learning Linear Attention in Polynomial Timecited by 5
  36. 2025Transformers Provably Learn Sparse XOR with Polylogarithmic Parameterscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.