Efficiently Representing Algorithms With Chain-of-Thought Transformers
On the map: LLM reasoning → Prompting and chain-of-thought reasoning
Abstract (arXiv)
The increasing popularity of reasoning models -- language models that output a series of reasoning or thought tokens before producing an answer -- is justified, in part, by theoretical results showing that chain-of-thought (CoT) transformers can simulate Turing machines, and thus perform arbitrary computation. However, the Turing machine, while suitable for complexity-theoretic analysis, is not convenient, intuitive, or efficient for discussing algorithms. Algorithms are typically designed and analyzed at a higher level of abstraction, captured by the Word RAM model with random-access memory and unit-cost operations on bigO(log n)-bit words. As a result, Word RAM algorithms can be substantially more efficient than their Turing machine counterparts, raising the question: Can CoT transformers efficiently simulate Word RAM algorithms? For instance, can they sort n items in bigO(n log n) steps or run Dijkstra's algorithm in bigO(E + V log V) steps? We answer affirmatively, up to poly-logarithmic overhead. We first establish this for finite-precision transformers with poly-logarithmic width and rightmost unique hard attention, then strengthen the result to two more practical settings with finite width and log-precision: continuous CoT, where reasoning takes the form of vectors rather than tokens, and a hybrid architecture in which transformer layers sit atop a recurrent (linear RNN) layer. In all three cases, we find that CoT can efficiently simulate any Word RAM algorithm with only a poly-logarithmic overhead in n. This overhead reduces to log-square when the Word RAM has a ``flat'' instruction set, and only logarithmic for multiplication-free flat instructions -- in stark contrast to known CoT simulations of Turing machines, which require quadratic overhead over Word RAM.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Prompting and chain-of-thought reasoning, one of 17 directions in LLM reasoning. Builds on 5 of its 35 references that are in the map. First posted on arXiv 18 Jun 2026.
Builds on
5 of 35 references.
References · 5
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
- 2024OpenAI o1 System Cardcited by 1,220
- 2022In-context Learning and Induction Headscited by 930
- 2025Olmo 3cited by 95
- 2026Why Are Linear RNNs More Parallelizable?cited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Barriers to Universal Reasoning With Transformers (And How to Overcome Them)
- 2025To CoT or To Loop? A Formal Comparison Between Chain-of-Thought and Looped Transformers
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
- 2024On the Representational Capacity of Neural Language Models with Chain-of-Thought Reasoning
- 2025Analyzing the Power of Chain of Thought through Memorization Capabilities
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective
- 2025The Kinetics of Reasoning: How Chain-of-Thought Shapes Learning in Transformers?
- 2025Continuous Chain of Thought Enables Parallel Exploration and Reasoning