Softmax Transformers are Turing-Complete
Hongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. Lin
Abstract
Hard attention Chain-of-Thought (CoT) transformers are known to be Turing-complete. However, it is an open problem whether softmax attention Chain-of-Thought (CoT) transformers are Turing-complete. In this paper, we prove a stronger result that length-generalizable softmax CoT transformers are Turing-complete.
More precisely, our Turing-completeness proof goes via the CoT extension of the Counting RASP (C-RASP), which correspond to softmax CoT transformers that admit length generalization. We prove Turing-completeness for CoT C-RASP with causal masking over a unary alphabet (more generally, for the letter-bounded languages). While we show that this is actually not Turing-complete for arbitrary languages, we prove that its extension with relative positional encoding is Turing-complete for arbitrary languages. We empirically validate our theoretical results by training transformers for various languages that require complex (non-linear) arithmetic reasoning.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
6 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- The Expressive Power of Transformers with Chain of Thought cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Discovering Interpretable Algorithms by Decompiling Transformers to RASP cites Thinking Like Transformers
- Transformer Circuits Can Realize Clustering Algorithms cites The Expressive Power of Transformers with Chain of Thought
- In-Context Universal Approximation, Compositional Generalization, and Algorithm Emulation cites The Expressive Power of Transformers with Chain of Thought
- On the Ability of Transformers to Verify Plans cites Thinking Like Transformers
- On the Ability of Transformers to Verify Plans cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
- A model of errors in transformers cites The Expressive Power of Transformers with Chain of Thought
- A model of errors in transformers cites Thinking Like Transformers
- A model of errors in transformers cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers6
- Discovering Interpretable Algorithms by Decompiling Transformers to RASPXinting Huang, Aleksandra Bakalova, Satwik Bhattamishra, William Merrill et al.ICML 2026 · 3 citations
- Transformer Circuits Can Realize Clustering AlgorithmsKenneth Clarkson, Lior Horesh, Takuya Ito, Charlotte Park et al.ICML 2026 · 1 citation
- On the Ability of Transformers to Verify PlansYash Sarrof, Yupei Du, Katharina Stein, Alexander Koller et al.ICML 2026 · 1 citation
- A model of errors in transformersSuvrat Raju, Praneeth Kumar NetrapalliICML 2026 · 1 citation
- In-Context Universal Approximation, Compositional Generalization, and Algorithm EmulationJerry Yao-Chieh Hu, Hong-Yu Chen, Po-Chiao Lin, Maojiang Su et al.ICML 2026
Builds on15
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
- The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 243 citations
- Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 citations
Related papers
- Universal Length Generalization with Turing ProgramsKaiying Hou, David Brandfonbrener, Sham M. Kakade, Samy Jelassi et al.ICML 2025
- What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
- Length Generalization Bounds for TransformersAndy Yang, Pascal Bergsträßer, Georg Zetzsche, David Chiang et al.ICML 2026
- The Expressive Power of Low Precision Softmax Transformers with (Summarized) Chain-of-ThoughtMoritz Brösamle, Stephan EcksteinICML 2026
- On the Representational Capacity of Neural Language Models with Chain-of-Thought ReasoningFranz Nowak, Anej Svete, Alexandra Butoi, Ryan CotterellACL 2024
