acceptodds
Published as a conference paper at NeurIPS 2026

Efficiently Representing Algorithms With Chain-of-Thought Transformers

Yanhong Li, Anej Svete, Ashish Sabharwal, Will Merrill

Abstract

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 a complexity theoretic analysis, isn't convenient, intuitive, or efficient when 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 -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 items in steps or run Dijkstra's algorithm in 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 . 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.

Keywords:
Atlanta, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 17%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.00 over 3 reviews, above 17% of the others.
Reviewer_1CFUOpenReview ↗
Rating
5
Clarity
3
Confidence
3
Originality
3
Quality
4
Significance
3
Read review
Summary

This paper studies whether chain-of-thought Transformers can efficiently simulate Word RAM algorithms, rather than only achieving Turing completeness through inefficient Turing-machine simulation. The motivation is that Word RAM is closer to how standard algorithms are designed and analyzed, with random access memory and unit cost operations on logarithmic-size words. The paper proves that, under several architectural settings, CoT Transformers can simulate Word RAM programs with only polylogarithmic overhead. The results first use polylogarithmic width and finite precision Transformers with hard attention, and then extend the simulation to fixed-width models using either continuous CoT or a hybrid Transformer–RNN architecture. The main contribution is a more algorithmically efficient expressivity result for CoT computation, connecting Transformer reasoning theory more directly to textbook algorithmic complexity.

Strengths and weaknesses

Strengths: i): The paper asks a clear and important theoretical question: whether CoT Transformers can efficiently simulate Word RAM algorithms, rather than only achieving universality through inefficient Turing machine simulation.

ii): The technical contribution is clean and meaningful. The paper gives direct Word RAM simulation results with polylogarithmic overhead, which better matches standard algorithmic complexity than prior Turing-machine-based expressivity results.

iii): The paper carefully studies several architectural settings, including polylogarithmic-width Transformers with hard attention, fixed-width models with continuous CoT, and hybrid Transformer–RNN models. This gives a broader and more informative picture of which architectural resources are needed for efficient algorithm simulation.

Weaknesses:

i): The strongest results do not directly apply to ordinary fixed-width decoder-only Transformers with discrete CoT. The first construction requires polylogarithmic width and rightmost unique hard attention, while the fixed-width constructions require either continuous CoT or an additional linear RNN layer. These are meaningful theoretical models, but they narrow the scope of the conclusion: the paper does not show that standard discrete-CoT Transformers can efficiently simulate Word RAM algorithms.

ii): Some of the efficiency claim depends on strong simulation assumptions and instruction-level abstraction. In particular, the fixed-width results use a bit-serial instruction implementation with cost κ(w)\kappa(w), and complex Word RAM operations such as multiplication, division, and modulo are not preserved as true unit-cost operations in the CoT simulation. This is reasonable from a theoretic perspective, but it weakens the interpretation that the model directly matches Word RAM algorithmic efficiency.

iii): The paper establishes an expressivity result, but it does not address whether such simulations are learnable, robust, or likely to arise in trained reasoning models. The construction relies on highly structured transcript formats, address-value encodings, attention-based retrieval, and precise numerical representations. Therefore, the result shows that suitable architectures can represent efficient algorithm simulation, but it does not explain whether practical CoT models can discover or reliably execute these mechanisms through training.

Questions

Q1: Could the authors clarify whether their results can be extended to ordinary fixed-width decoder-only Transformers with discrete CoT, without continuous CoT or an additional recurrent layer? If not, what is the precise obstruction that prevents efficient Word RAM simulation in this more standard setting?

Q2: Could the authors clarify how the instruction-level cost κ(w)\kappa(w) should be interpreted relative to the usual unit-cost Word RAM model? In particular, for operations such as multiplication, division, and modulo, to what extent does the simulation preserve Word RAM efficiency, and to what extent does it reintroduce bit-level computation inside each simulated instruction?

Q3: Could the authors discuss whether the proposed simulation mechanisms are learnable or robust in trained reasoning models? The construction relies on structured transcript formats, address-value encodings, exact retrieval behavior, and precise numerical representations, so it would be useful to know whether the authors view the result purely as an expressivity theorem or as evidence for mechanisms that could plausibly emerge in practical CoT models.

Limitations

The main limitations concern the scope and interpretation of the simulation results. The strongest theorem for discrete CoT requires polylogarithmic width and rightmost unique hard attention, while the fixed-width constructions rely on either continuous CoT or an additional recurrent layer. As a result, the paper does not yet show that ordinary fixed-width decoder-only Transformers with discrete CoT can efficiently simulate Word RAM algorithms. In addition, part of the efficiency guarantee depends on the instruction-level cost κ(w)\kappa(w), so complex Word RAM operations such as multiplication, division, and modulo may still require bit-level computation inside the simulation rather than being preserved as true unit-cost operations. Finally, the paper is an expressivity result and does not address whether the proposed transcript protocols, address-value encodings, and precise retrieval mechanisms are learnable or robust in trained reasoning models.

Paper formatting concerns

No specific concern on formatting.

Final justification

The rebuttal provides a good supplement, I don't have further concerns.

Reviewer_cwxXOpenReview ↗
Rating
3
Clarity
2
Confidence
2
Originality
3
Quality
3
Significance
2
Read review
Summary

This is a purely theoretical paper studying the expressivity and algorithmic simulation power of chain-of-thought transformers under the Word RAM model. Prior theoretical work has shown that CoT transformers can simulate Turing machines, but such results do not directly imply efficient simulation of standard textbook algorithms, since translating Word RAM computations into Turing-machine computations can introduce large overhead due to the lack of random access. The paper argues that Word RAM is a more natural model for reasoning about algorithms used in practice.The main contribution is a set of direct simulations of Word RAM programs by CoT-based transformer models, avoiding the detour through Turing machines. The authors consider three settings. In these settings, they aim to show that CoT transformers can simulate Word RAM algorithms with only polylogarithmic overhead. I am not familiar with this specific theoretical literature, so my evaluation should be considered together with assessments from reviewers and the AC who have stronger expertise in this area.

Strengths and weaknesses

Strengths

  • The paper studies an interesting question. Moving beyond Turing-machine simulation toward Word RAM simulation is well motivated, since Word RAM is closer to the way standard algorithms are usually described and analyzed.

  • The paper considers several different modeling assumptions, including polylogarithmic-width finite-precision transformers, fixed-width transformers with continuous CoT, and hybrid transformer-RNN models. This gives a relatively broad view of how different architectural assumptions may affect the ability of CoT models to simulate algorithmic computation.

  • The paper appears to provide a substantial amount of theoretical development, with multiple theorems, lemmas, proof sketches, and appendix proofs. While I did not verify every technical detail in depth, the overall structure is fairly detailed.

Weaknesses:

  • Although the paper is purely theoretical, I found the presentation somewhat lacking in illustration. The main results are stated as simulation theorems, but the paper does not include even a small toy example showing how a simple Word RAM program would be represented and simulated by the proposed CoT construction. 

  • The practical relevance of the theoretical models remains somewhat unclear. While these assumptions are useful for theoretical analysis, it would be helpful for the authors to discuss more concretely how these models relate to realistic transformer-based reasoning systems.

Questions

Please see the detailed comments in the weaknesses section.

Limitations

Yes.

Paper formatting concerns

No.

Reviewer_rU6FOpenReview ↗
Rating
4
Clarity
2
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

This paper proposes to analyze the expressive power of constant-depth transformers with Chain-of-Thought reasoning (CoT) via the the Turing-complete computation model Word RAM. More specifically, the authors consider three settings: (1) non-uniform (wrt to parameters) transformers with polylogarithmic width, fixed precision and rightmost-unique hard attention, and uniform transformers with fixed width, log-precision and averaging-hard attention and either (2) continuous CoT, or (3) additional linear recurrent layers. They show that the transformers in (1)-(3) are able to simulate a Word RAM with polylogarithmic CoT steps, where the exponent depends on the complexity of the instruction set.

Strengths and weaknesses

In my opinion, using formalisms from, e.g., theoretical computer science, can be a useful abstraction to better understand capabilities and limitations of what certain machine learning models/architectures can achieve. The Word RAM model seems to be a good candidate to bring us closer to practice in comparison to Turing machines. I also find value in the technical results on how to perform certain computations with bounded complexity with transformer building blocks; this could be useful for subsequent work in that direction.

I often find the paper difficult to follow, as it is not very self-contained and several concepts are not, or insufficiently introduced; for example, the Word RAM model is introduced with very little explanation and no pointer to a comprehensive definition in, e.g., the appendix. In general, the paper is difficult to parse without regularly consulting other literature. Many times, the reader is referred to related work; e.g., in the appendix the reader is referred to consult further references to have a full picture of the transformer setup. Overall, the writing style is quite technical, but often switches between more rigorous and more colloquial statements, and generally assumes the reader to be familiar with quite specific vocabulary (e.g., what is a word code and where is exact-match attention defined). For the overall structure, I think it would be beneficial to discuss how your results differ and improve upon existing work in a structured manner, and perhaps move some of the technical details to the appendix, especially if they are somewhat repetitive (e.g., the theoretical results in Section 6 are largely similar to Section 5). With respect to the theoretical contribution beyond the constructions itself, I am struggling to understand the significance or implications of the results. I understand it removes the additional overhead from the Turing machine; however, given that the authors stress several times that their results are helpful for analyzing "textbook algorithms", it would be helpful to show for what tasks this would actually make a difference; e.g., what can we now do more efficiently, and what are the transformers in your considered settings able to do that less expressive (but perhaps computationally less expensive) model cannot? In the abstract and introduction there is some motivation in that direction, but there is little further discussion thereof. Finally, on the appropriateness of assumptions, the results are either non-uniform or use non-standard extensions. Additionally, it is difficult to compare the variable-width results with the fixed width results, as, for instance, also the chosen attention mechanism changes.

Explanation for scores: As explained in my review above, while generally providing new abstractions is useful, currently the paper does not sufficiently contextualize the results and explain their implications. I also found the paper difficult to parse as it is often not self-contained. I am open to change my score within the discussion period if my concerns are addressed.

Questions
  • Could you explain what you mean with uniform/non-uniform in lines 125-129? It seems to be uniformity in the model sense, i.e., a transformer of fixed size that works for all inputs. However, why is the log-precision transformer considered uniform? The parameter count is fixed, but to have the same precision for differently sized inputs, wouldn't we require more bits?

  • Could you motivate your specific settings, e.g., choice of attention mechanism, choice of extensions?

  • Could you briefly contextualize your contribution with respect to:

    • Qian L and Wang Y, Constant Bit-size Transformers Are Turing Complete. NeurIPS 2025
    • Qian L and Wang Y, Efficient Turing Machine Simulation with Transformers. arXiv preprint 2025
    • Brösamle and Eckstein S, The Expressive Power of Low Precision Softmax Transformers with (Summarized) Chain-of-Thought. ICML 2026
Limitations

Not sufficiently, please see Strengths and Weaknesses for more details and suggestions.

Paper formatting concerns

na

Final justification

I increased my score as my main concerns regarding significance and presentation were resolved during the rebuttal.

Comments on the paper

1 comment
Meta-review

Initial Metareview

The reviewers agree that this paper addresses an important and timely question in the theory of Transformer expressivity. While prior work has largely focused on the computational universality of Transformers through simulations of Turing machines, this paper takes the significant step of studying the more practically motivated Word RAM model. The reviewers also appreciate the technical sophistication of the constructions and recognize the potential value of developing new abstractions for reasoning about the computational capabilities of modern architectures.

At the same time, the current reviews identify several important issues that should be clarified. While the authors should address all substantive concerns raised by the reviewers where possible, they are encouraged to address the following questions, as these appear to be some of the the key issues:

  1. Clarify the significance of the results. Better explain the conceptual implications of the simulation results, how they relate to prior work on Transformer expressivity, and improve the accessibility of the presentation where reviewers found it difficult to follow.

  2. Clarify the scope of the main theorems. Explain the extent to which the architectural assumptions (e.g., polylogarithmic width, rightmost-unique hard attention, continuous CoT, or recurrence) limit the conclusions that can be drawn for standard fixed-width decoder-only Transformers with discrete chain-of-thought reasoning.

  3. Clarify the interpretation of the efficiency guarantees. Explain how the claimed efficiency should be understood, particularly with respect to instruction-level costs and whether complex Word RAM operations are preserved as unit-cost operations within the simulation.

Metareview after Rebuttal

The paper addresses an important question in Transformer expressivity by studying the simulation of the Word RAM model, and the reviewers appreciate both the significance of the direction and the technical sophistication of the results. The rebuttal successfully clarified several of the main issues raised in the initial reviews, particularly regarding the significance, scope, and presentation of the results, leading to a more positive assessment of the paper. Overall, the reviewers view the paper positively after the discussion, and the consensus is to accept the paper.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.