TL;DR
This paper provides a mathematical proof for why Chain-of-Thought (CoT) prompting works: it fundamentally changes the "learnability" of a task. By breaking a complex problem into smaller steps, CoT reduces the difficulty of learning to that of the single hardest subtask. This allows Transformers to in-context learn functions—like parity and complex polynomials—that are mathematically impossible for them to learn from direct input-output examples alone.
The Mystery of In-Context Learnability
While we know empirically that Chain-of-Thought (CoT) prompting helps Large Language Models (LLMs) solve complex problems, the theoretical "why" has remained fuzzy. Most existing theory focuses on expressivity—proving that a Transformer could represent a certain logic. However, expressivity doesn't explain in-context learnability: whether a model can actually figure out a new task from just a few demonstrations provided in the prompt.
The authors tackle a specific gap: some tasks are inherently "unlearnable" in-context. For example, a standard linear learner (which a single Transformer layer often emulates during in-context learning) cannot learn "parity" functions (like XOR) because they are too complex to grasp from a few examples. The paper asks: How does task decomposition change the sample complexity of learning, and can CoT make the unlearnable learnable?
Theoretical Framework: The Bottleneck Principle
The authors formalize the problem using the framework of PAC (Probably Approximately Correct) Learnability applied to In-Context Learning (ICL).
Their theoretical contributions are built on several key pillars:
- Step-by-Step Learning Algorithm: They define a learning algorithm that takes CoT demonstrations and learns a sequence of simpler functions, composing them step-by-step.
- Transformer Expressivity for Learning: They prove that a Transformer with linear depth (relative to the number of CoT steps) can express this step-by-step learning process. Specifically, the Transformer's forward pass can implement Kernel Gradient Descent (KGD) to learn each sub-step.
- The Bottleneck Principle (Upper Bound): They derive an error upper bound showing that the total error of a CoT-enabled learner is dominated by the error of the "hardest" subtask in the chain. If you can decompose a "Level 10" difficulty task into ten "Level 1" steps, the model only needs the sample efficiency required to learn a Level 1 task.
- Impossibility Proofs (Lower Bound): They prove that without CoT, certain Boolean functions (like sparse parities) have an intrinsic complexity that makes them impossible to learn for the hypothesis classes typically used by Transformers in ICL.
Experimental Validation
To test whether these theoretical predictions hold true in practice, the authors evaluated real-world LLMs (GPT-4o and GPT-3.5-turbo) on synthetic benchmarks designed to isolate specific mathematical properties:
- Compositional Arithmetic Functions: Target functions built by composing elementary operations (+, -, *). This allows precise control over the "hardness" of the overall task versus the hardness of individual steps ($H_{max}$).
- Canonical Boolean Functions: Including (n, k)-Parities (learning to compute the XOR of a subset of bits) and 3-Term DNF (Disjunctive Normal Form, or logical "OR of ANDs" formulas).
Key Results
- The $H_{max}$ Effect: In arithmetic tasks, LLM performance dropped sharply as the difficulty of the hardest step ($H_{max}$) increased, even if the total number of operations remained the same. This empirically confirms the theoretical "Bottleneck Principle."
- Making the Unlearnable Learnable: On (10, 4)-parity tasks, GPT-4o's success rate was only 54% (barely above random guessing) without CoT. With a provably effective CoT decomposition, the success rate jumped to 94%.
- DNF Formulas: Similar improvements were seen in Boolean formulas, where CoT moved GPT-4o from ~62% accuracy to ~80% accuracy on width-9 DNF tasks.
Limitations and Future Work
While the paper provides a robust theoretical foundation for CoT, it acknowledges a few practical limitations. First, the theory treats the number of steps as a constant; in practice, compounding errors can occur. As the chain grows, the probability of a "hallucination" in an early step increases, potentially leading to exponential error growth. Second, the proofs rely on clean mathematical functions. Real-world CoT often involves messy natural language where subtasks aren't clearly defined or mathematically orthogonal. Finally, the study focuses on in-context learning at test time and does not account for how pre-training data biases the model toward certain decompositions.
Summary updated