Lune

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.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

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
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Discovering Interpretable Algorithms by Decompiling Transformers to RASPXinting Huang, Aleksandra Bakalova, Satwik Bhattamishra, William Merrill et al.ICML 2026 · 3 citations
  2. Transformer Circuits Can Realize Clustering AlgorithmsKenneth Clarkson, Lior Horesh, Takuya Ito, Charlotte Park et al.ICML 2026 · 1 citation
  3. On the Ability of Transformers to Verify PlansYash Sarrof, Yupei Du, Katharina Stein, Alexander Koller et al.ICML 2026 · 1 citation
  4. A model of errors in transformersSuvrat Raju, Praneeth Kumar NetrapalliICML 2026 · 1 citation
  5. 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

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
  3. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
  4. The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 243 citations
  5. Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 citations

Related papers

  1. Universal Length Generalization with Turing ProgramsKaiying Hou, David Brandfonbrener, Sham M. Kakade, Samy Jelassi et al.ICML 2025
  2. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
  3. Length Generalization Bounds for TransformersAndy Yang, Pascal Bergsträßer, Georg Zetzsche, David Chiang et al.ICML 2026
  4. The Expressive Power of Low Precision Softmax Transformers with (Summarized) Chain-of-ThoughtMoritz Brösamle, Stephan EcksteinICML 2026
  5. On the Representational Capacity of Neural Language Models with Chain-of-Thought ReasoningFranz Nowak, Anej Svete, Alexandra Butoi, Ryan CotterellACL 2024
Dusk over the sea between two cliffs drawn in fine vertical lines