Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective
Open accessThe 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
Cites
Statistics
Verification
Claims the paper makes
0 Valid · 5 Not valid · 23 Not checked · 111 Own results and interpretations
The paper states this without a source or data behind it here, so there is nothing to check it against. The quote shows it is in the paper.
In the paper
“Assume TC 0 ̸ = NC 1 .For any prime number p, any integer L, and any polynomial Q, there exists a problem size n such that no log-precision autoregressive Transformer defined in Section 2 with depth L and hidden dimension d ≤ Q(n) can solve the problem Arithmetic(n, p).”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > 3.2 Theoretical results
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: unclear — It is unclear why the paper says it holds.
- Rests on an assumption not shown here.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“Moreover, they even generalize well to longer input sequences”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > 1 Introduction
boostedstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“as a counterexample, we prove that bounded-depth Transformers of polynomial size cannot solve a classic DP problem known as Context-Free Grammar Membership Testing (Theorem 4.8).”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > 1 Introduction
boosted- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“For any integer m > 0, there exists an autoregressive Transformer defined in Section 2 with constant hidden size d (independent of m), depth L = 4, and 5 heads in each layer that can generate the CoT solution defined in Appendix B for all inputs in Equation(m, p).”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > Theorem 3.3. Fix any prime p.
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“Moreover, all parameter values are bounded by O(poly(n)).”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > 4.2 Theoretical results
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on 4 assumptions not shown here.
87 more claims
Create a free account to see all 139 claims and every source verdict.
- Probably not a substantial claim. 15
- The quote only partly states this claim. 7
- It may state two separate claims as one. 30
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?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Additionally, ChatGPT performs better with ''chain of thoughts'' and ''divide-and-conquer'' prompting, techniques used in natural language processing and machine learning, which involve a series of intermediate reasoning steps, which has been observed to enhance LLMs' ability to handle complex tasks [30,31].”
From Using artificial intelligence to semi-automate trustworthiness assessment of randomized controlled trials: a case study (2025) · cites this paper as [30]
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Although reasoning enhancement approaches such as CoT impressively improve LLM performance, they produce substantial additional overhead, specifically in the form of the increased number of tokens produced”
From Token-Budget-Aware LLM Reasoning (2025) · cites this paper as Feng et al., 2023
Experimental — accuracy not yet measuredThe cited source says what the claim attributes to it.
In the citing paper
“Recent theoretical analyses have demonstrated the usefulness of CoT from the perspective of model expressivity”
From Training Large Language Models to Reason in a Continuous Latent Space (2024) · cites this paper as Feng et al., 2023
The cited source says what the claim attributes to it.
In the citing paper
“By employing CoT, the effective depth of the transformer increases because the generated outputs are looped back to the input”
From Training Large Language Models to Reason in a Continuous Latent Space (2024) · cites this paper as Feng et al., 2023
The cited source says what the claim attributes to it.
In the citing paper
“On the other hand, giving models access to a scratchpad might facilitate deceptive behavior by enabling more complex reasoning (Feng et al., 2023), or perhaps, through changing the text distribution in a way that makes the LLM more likely to role-play a deceptive character (Shanahan et al., 2023; Shah et al., 2023).”
From Large Language Models can Strategically Deceive their Users when Put Under Pressure (2023) · cites this paper as Feng et al., 2023
1 more claim about this paper
Create a free account to see every claim other papers make about this one.
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.
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > 4.2 Theoretical results
“As proved in Jones & Laaser [33], the universal CFG Membership Testing is a celebrated P-complete problem”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > References
“33. Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners.”
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > Equation.
“After m -1 steps, all equations will have only one variable and the problem is solved.”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > I Robustness in Training Data Quality
“x 1 + 9x 3 = 6, x 2 + 6x 3 = 6, 4x 3 = 7, [SEP] x 1 = 4, x 2 = 1, x 3 = 10,”
Rated minor: it would not touch a result — a value no result rests on, a p-value that stays on the same side of the significance level, or a conflict that is clerical, resolved elsewhere in the paper, or outside its own findings.
In the paper
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > C.1 Technical lemmas for MLP
“W x = ReLU(W x) + ReLU(-W x)”
§ Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective > C.1 Technical lemmas for MLP
“We can use a two-layer MLP with ReLU activation to implement g(x) = W x by the following construction:”
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404 · cited 4×
“An (autoregressive) Transformer [53, 44] is a neural network architecture designed to process a sequence of input tokens and generate tokens for subsequent positions.”
BackgroundResultInfluentialBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325 · cited 1×
“[18] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.”
BackgroundReinforcement Learning: An Introduction
Sutton, R. S., & Barto, A. G. (1998) · IEEE Transactions on Neural Networks · doi:10.1109/tnn.1998.712192 · Cited by 27,225 · cited 2×
“[50] Richard S Sutton and Andrew G Barto.”
BackgroundLanguage Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 29×
“Revealing the relation between prompts and outputs is valuable for better harnessing LLMs.”
BackgroundInfluentialApproximation by superpositions of a sigmoidal function
Cybenko, G. (1989) · Mathematics of Control, Signals, and Systems · doi:10.1007/bf02551274 · Cited by 13,883 · cited 1×
“, the depth or width approaches infinity) are already universal function approximators [15, 30, 34].”
BackgroundDecoupled Weight Decay Regularization
Loshchilov, I., & Hutter, F. (2017) · arXiv · doi:10.48550/arxiv.1711.05101 · Cited by 12,522 · cited 1×
“We adopt the AdamW optimizer [33] with β1 = 0.”
MethodLLaMA: Open and Efficient Foundation Language Models
Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. (2023) · arXiv · doi:10.48550/arxiv.2302.13971 · Cited by 4,602 · cited 2×
“Among them, the autoregressive paradigm has gained arguably the most popularity [45, 8, 40, 62, 52, 13, 46, 48], based on the philosophy that all different tasks can be uniformly treated as sequence generation problems.”
BackgroundChain-Of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q. V., & Zhou, D. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-1800 · Cited by 4,505 · cited 5×
“Secondly, it has been empirically observed that scaling the model size significantly improves the CoT ability [56].”
BackgroundInfluentialLiu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2023) · ACM Computing Surveys · doi:10.1145/3560815 · Cited by 4,361 · cited 2×
“[32] Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig.”
BackgroundChain-of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., & Zhou, D. (2022) · arXiv · doi:10.48550/arxiv.2201.11903 · Cited by 4,263 · cited 5×
“Secondly, it has been empirically observed that scaling the model size significantly improves the CoT ability [56].”
BackgroundInfluential
Research works printed but not linked: 3
- Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
- 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.
- Itiroo Sakai. Syntax in universal translation. In Proceedings of the International Conference on Machine Translation and Applied Language Analysis, 1961.
Cited by
Survey of Hallucination in Natural Language Generation
Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., Ishii, E., Bang, Y. J., Madotto, A., & Fung, P. (2023) · ACM Computing Surveys · doi:10.1145/3571730 · Cited by 5,025
The rise and potential of large language model based agents: a survey
Xi, Z., Chen, W., Guo, X., He, W., Ding, Y., Hong, B., Zhang, M., Wang, J., Jin, S., Zhou, E., et al. (2025) · Science China Information Sciences · doi:10.1007/s11432-024-4222-0 · Cited by 970
The Rise and Potential of Large Language Model Based Agents: A Survey
Xi, Z., Chen, W., Guo, X., He, W., Ding, Y., Hong, B., Zhang, M., Wang, J., Jin, S., Zhou, E., et al. (2023) · arXiv · doi:10.48550/arxiv.2309.07864 · Cited by 972
UAVs meet LLMs: Overviews and perspectives towards agentic low-altitude mobility
Tian, Y., Lin, F., Li, Y., Zhang, T., Zhang, Q., Fu, X., Huang, J., Dai, X., Wang, Y., Tian, C., et al. (2025) · Information Fusion · doi:10.1016/j.inffus.2025.103158 · Cited by 178
“This capability is exemplified by the Chain of Thought (CoT) framework, where intricate problems are decomposed into a series of manageable sub-tasks, each solved sequentially using examples of step-by-step reasoning [234, 235, 236, 237].”
Roll the dice & look before you leap: Going beyond the creative limits of next-token prediction
Nagarajan, V., Wu, C. H., Ding, C., & Raghunathan, A. (2025) · arXiv · Cited by 46
Metadata
- Authors
- Feng, G., Zhang, B., Gu, Y., Ye, H., He, D., & Wang, L.
- ORCID
- Ye, Haotian
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2023
- Pages
- 70757-70798
- ISSN
- 1049-5258 (ISSN-L)
- arXiv
- 2305.15408
- OpenAlex
- W7133198832
- Semantic Scholar
- c2260403fd5cb2de73491323433e48b6ec36872c
- 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
- diamond
- doi.org
- 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.