CoChat

Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective

Open access

The DOI matches its DataCite record; 77 of the 77 references it cites were found in a registry or an index; none of the 27 sources its claims cite is checked for support yet.

Abstract

Recent studies have discovered that Chain-of-Thought prompting (CoT) can dramatically improve the performance of Large Language Models (LLMs), particularly when dealing with complex tasks involving mathematics or reasoning. Despite the enormous empirical success, the underlying mechanisms behind CoT and how it unlocks the potential of LLMs remain elusive. In this paper, we take a first step towards theoretically answering these questions. Specifically, we examine the expressivity of LLMs with CoT in solving fundamental mathematical and decision-making problems. By using circuit complexity theory, we first give impossibility results showing that bounded-depth Transformers are unable to directly produce correct answers for basic arithmetic/equation tasks unless the model size grows super-polynomially with respect to the input length. In contrast, we then prove by construction that autoregressive Transformers of constant size suffice to solve both tasks by generating CoT derivations using a commonly used math language format. Moreover, we show LLMs with CoT can handle a general class of decision-making problems known as Dynamic Programming, thus justifying its power in tackling complex real-world tasks. Finally, an extensive set of experiments show that, while Transformers always fail to directly predict the answers, they can consistently learn to generate correct solutions step-by-step given sufficient CoT demonstrations.

Overview

CoChat Summary

TL;DR

This paper gives a theoretical account of why Chain-of-Thought (CoT) helps LLMs: bounded-depth log-precision Transformers cannot directly solve basic arithmetic/equation tasks unless their size grows super-polynomially, but constant-size autoregressive Transformers can solve them by generating CoT derivations. It extends this to Dynamic Programming and supports the theory with experiments where direct prediction fails while 3-layer CoT Transformers achieve near-perfect accuracy.

Key findings

  • Assuming TC⁰ ≠ NC¹, Theorems 3.1 and 3.2 show that no log-precision autoregressive Transformer with depth \(L\) and hidden dimension \(d \le Q(n)\) can solve Arithmetic\((n,p)\) or Equation\((m,p)\) for any polynomial \(Q\), any prime \(p\), and any integer \(L\).
  • Theorems 3.3 and 3.4 prove by construction that constant-size autoregressive Transformers can generate CoT solutions: depth \(L=5\) with 5 heads per layer for Arithmetic, and depth \(L=4\) with 5 heads per layer for Equation, with parameters bounded by \(O(\mathrm{poly}(n))\) and \(O(\mathrm{poly}(m))\), respectively.
  • Theorem 4.7 shows that any Dynamic Programming problem satisfying Assumptions 4.2–4.5 can be solved by a constant-depth, constant-hidden-dimension, constant-head autoregressive Transformer with CoT; Theorem 4.8 shows CFG Membership Testing cannot be solved directly by bounded-depth polynomial-size log-precision Transformers unless TC⁰ = NC¹.
  • Experiments on Arithmetic, Equation, LIS, and ED show direct prediction accuracy mostly below 60%, while 3-layer Transformers with CoT achieve near-perfect performance; with 30% of data missing an intermediate CoT step and single-token corruption, accuracy remains above 95%, and models trained on 1–15 operators extrapolate to 16–18 operators.

Methods

  • Theoretical analysis uses circuit complexity: bounded-depth log-precision Transformers are upper-bounded by TC⁰, while the math tasks are shown NC¹-hard; positive results are constructive, using attention COPY/MEAN operations and MLP lemmas to build CoT generators.
  • Experiments cover four tasks—Arithmetic, Equation, LIS, and ED—with increasing difficulty; each training dataset has 1M samples and each test set 0.1M samples, with duplicate train/test samples removed.
  • Models use hidden dimension \(d=256\), heads \(H=4\), depths \(L=3,4,5\), AdamW with \(\beta_1=0.9\), \(\beta_2=0.999\), learning rate \(10^{-4}\), weight decay 0.01, dropout 0.1, trained for 100 epochs on 4 V100 GPUs; CoT models generate token-by-token with greedy search, and accuracy is the evaluation metric.

Limitations

  • Stated: the paper does not answer how the CoT generation process is triggered by specific prompts; it does not theoretically explain how model size affects CoT; it studies expressivity rather than generalization; and it leaves open how models learn CoT from limited demonstrations or purely direct datasets.
  • Evident from the text: the positive theoretical results are existence/construction results, not learning guarantees; the experiments use synthetic tasks and relatively small Transformers (\(d=256\), \(L \le 5\)), not large LLMs; the math analysis uses finite fields modulo a prime \(p\); and the DP theorem relies on assumptions including polynomial-efficiency approximation and polynomially bounded state spaces.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2305.15408

Cites

77 of 77 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Verification

Claims the paper makes

0 Valid · 5 Not valid · 23 Not checked · 111 Own results and interpretations

87 more claims

Create a free account to see all 139 claims and every source verdict.

See all claims — free account
  • Probably not a substantial claim. 15
  • The quote only partly states this claim. 7
  • It may state two separate claims as one. 30

Create a free account to see these claims.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

1 more claim about this paper

Create a free account to see every claim other papers make about this one.

See all claims — free account

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

3 of 3

Citations

Cites

Show all 77 references

Research works printed but not linked: 3

  1. Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
  2. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
  3. Itiroo Sakai. Syntax in universal translation. In Proceedings of the International Conference on Machine Translation and Applied Language Analysis, 1961.

Cited by

Metadata

Authors
Feng, G., Zhang, B., Gu, Y., Ye, H., He, D., & Wang, L.
Venue
arXiv
Publisher
arXiv
Published
2023
Pages
70757-70798
ISSN
1049-5258 (ISSN-L)
OpenAlex
W7133198832
Cited by
444
References
69
Citations by year
2026: 183 · 2025: 171 · 2024: 79 · 2023: 11
FWCI
27.45
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion, other-oa)
Funders
  • Microsoft Research
  • National Natural Science Foundation of China (NSFC62276005)
  • Microsoft Research Asia
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › Artificial Intelligence Applications
Keywords
chain-of-thought prompting, large language models, circuit complexity, impossibility results, arithmetic reasoning, equation solving, dynamic programming, autoregressive transformers, mathematical reasoning, decision-making

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

A language model drew the claims from the paper on 2026-10-23, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-23 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.