On the Representational Capacity of Neural Language Models with Chain-of-Thought Reasoning

Franz Nowak, Anej Svete, Alexandra Butoi, Ryan Cotterell

Abstract

The performance of modern language models (LMs) has been improved by chain-of-thought (CoT) reasoning, i.e., the process of generating intermediate results that guide the model towards a final answer. A possible explanation for this improvement is that CoT reasoning extends an LM’s computational power, as RNNs and transformers with additional scratch space are known to be Turing complete. Comparing LMs to Turing machines, however, introduces a category error—Turing machines decide language membership, whereas LMs define distributions over strings. To bridge this gap, we formalize CoT reasoning in a probabilistic setting. We present several results on the representational capacity of recurrent and transformer LMs with CoT reasoning, showing that they can represent the same family of distributions over strings as probabilistic Turing machines.

Introduction

Chain-of-Thought (CoT) reasoning has emerged as a powerful technique for improving the performance of large language models on complex tasks. By generating intermediate reasoning steps, models can decompose difficult problems into manageable sub-problems. While empirically successful, the theoretical basis for this improvement has remained somewhat elusive.

Previous attempts to characterize the computational power of LMs often relied on comparisons to classical Turing machines. However, the authors identify a "category error" in this approach: Turing machines are deterministic or non-deterministic machines designed to decide language membership (binary classification), whereas LMs are inherently probabilistic generators that define distributions over strings. Furthermore, many existing proofs of Turing completeness for Transformers assume infinite precision or use symbols outside the model's vocabulary. This work addresses these gaps by formalizing CoT within a strictly probabilistic framework that aligns with modern LM functionality.

Theoretical Framework: Regular Reducibility

The core of the proposed framework is the concept of Regular Reducibility. This formalizes the idea that a complex "scratchpad" output (the CoT) can be simplified into a final answer. If the full output of a CoT-augmented model can be mapped to a clean final result using a simple finite-state machine, the model is considered regularly reducible to that task.

Figure 3: Illustration of the sequential computation in Transformers (top) and RNNs (bottom) within the probabilistic framework.

The study evaluates two primary architectures: Elman RNNs and decoder-only Transformers. A critical distinction is made regarding numerical precision:

  • Fixed precision: Models operate with a constant number of bits, reflecting standard hardware constraints.
  • Unbounded precision: The number of bits is allowed to grow with the input string length, a requirement for simulating full Turing machines.

Key Results

The primary contribution of this research is the mapping of neural architectures to formal computational classes in a probabilistic context. The authors prove that CoT reasoning fundamentally expands the representational capacity of these models.

Figure 1: Theoretical mapping of LM architectures and precision to formal language classes.

Key findings include:

  • CoT as a Non-determinism Hack: CoT allows deterministic neural networks to simulate non-determinism. By "sampling" a computational path and writing it to the scratchpad, the model can condition future steps on that path. This allows fixed-precision models to represent a wider array of probability distributions, specifically general Probabilistic Finite State Automata (PFSAs).
  • Fixed-Precision Equivalence: Fixed-precision RNNs and Transformers augmented with CoT are equivalent to PFSAs. Crucially, without CoT, fixed-precision RNNs are limited to deterministic PFSAs, which are strictly less expressive.
  • Unbounded-Precision Equivalence: When precision is unbounded, these architectures become equivalent to Probabilistic Turing Machines (PTMs). This establishes that a CoT-augmented LM can represent any distribution that a general-purpose computer can compute.
  • Weak Equivalence: The authors establish "weak equivalence," meaning these neural models can define the exact same probability distributions over final output strings as their corresponding formal automata.

Discussion and Limitations

While this work provides a rigorous foundation for CoT, several questions remain. First, the proofs focus on representational capacity—showing that weights exist to perform these computations—but do not guarantee that standard training algorithms like SGD can discover them.

Second, the gap between theoretical unbounded precision and the fixed-precision (e.g., FP16/BF16) used in practice is significant. Finally, while the paper proves that simulation is possible, it does not address the computational efficiency or the number of CoT steps required for specific tasks. Future research should explore the complexity of these representations and the learnability of the required weights.

Summary updated

BibTeX
@inproceedings{nowak2024representational,
  author = {Franz Nowak and Anej Svete and Alexandra Butoi and Ryan Cotterell},
  title = {{On the Representational Capacity of Neural Language Models with Chain-of-Thought Reasoning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=uSolh1kcku},
}
Figure