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