Chain of Thought Empowers Transformers to Solve Inherently Serial Problems

Zhiyuan Li, Hong Liu, Denny Zhou, Tengyu Ma

arXiv:2402.12875 · 2026-07-27 공개 · arXiv · PDF

transformer chain-of-thought expressiveness permutation-groups boolean-circuits serial-computation embedding-size depth

Abstract

Instructing the model to generate a sequence of intermediate steps, a.k.a., a chain of thought (CoT), is a highly effective method to improve the accuracy of large language models (LLMs) on arithmetics and symbolic reasoning tasks. However, the mechanism behind CoT remains unclear. This work provides a theoretical understanding of the power of CoT for decoder-only transformers through the lens of expressiveness. Conceptually, CoT empowers the model with the ability to perform inherently serial computation, which is otherwise lacking in transformers, especially when depth is low. Given input length $n$, previous works have shown that constant-depth transformers with finite precision $\mathsf{poly}(n)$ embedding size can only solve problems in $\mathsf{TC}^0$ without CoT. We first show an even tighter expressiveness upper bound for constant-depth transformers with constant-bit precision, which can only solve problems in $\mathsf{AC}^0$, a proper subset of $ \mathsf{TC}^0$. However, with $T$ steps of CoT, constant-depth transformers using constant-bit precision and $O(\log n)$ embedding size can solve any problem solvable by boolean circuits of size $T$. Empirically, enabling CoT dramatically improves the accuracy for tasks that are hard for parallel computation, including the composition of permutation groups, iterated squaring, and circuit value problems, especially for low-depth transformers.

한국어 요약

한 줄 요약

CoT(Chain of Thought)를 통해 트랜스포머가 직렬 계산 문제를 해결할 수 있는 이론적 근거와 실증적 증거를 제시한다.

핵심 기여도

핵심 아이디어

기존 트랜스포머는 병렬 계산에 강하지만 직렬 계산 능력이 제한된다. CoT는 모델이 중간 단계를 생성하도록 유도하여 직렬 연산을 시뮬레이션할 수 있게 한다. 이는 트랜스포머가 $\mathsf{TC}^0$보다 낮은 $\mathsf{AC}^0$까지 표현 가능하다는 이론적 상계(Theorem 3.1)를 극복하는 핵심이다. CoT 단계 수 $T$가 증가함에 따라 트랜스포머는 $\mathsf{P/poly}$까지 표현 가능하다는 것이 증명된다(Theorem 3.3). 특히, $T$가 다항 크기일 때 트랜스포머는 다항 크기 회로를 표현할 수 있으며, 이는 기존 트랜스포머의 표현력 한계를 극복한다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용