Transformers Provably Learn to Internalize Chain-of-Thought

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Huang, Yixiao, Zhu, Hanlin, Wang, Zixuan, Jiao, Jiantao, Russell, Stuart, Sojoudi, Somayeh, Mei, Song
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910266954874880
author Huang, Yixiao
Zhu, Hanlin
Wang, Zixuan
Jiao, Jiantao
Russell, Stuart
Sojoudi, Somayeh
Mei, Song
author_facet Huang, Yixiao
Zhu, Hanlin
Wang, Zixuan
Jiao, Jiantao
Russell, Stuart
Sojoudi, Somayeh
Mei, Song
contents Chain-of-Thought (CoT) prompting substantially improves the sample efficiency of transformers, reducing the complexity of tasks like parity learning from exponential to polynomial in the input length. However, generating explicit reasoning steps at inference is computationally expensive. Implicit Chain-of-Thought (ICoT) has emerged as a promising empirical remedy that trains models to internalize intermediate steps within their hidden states, but its theoretical foundations remain poorly understood. We give the first theoretical analysis of ICoT, proving that an $L$-layer transformer trained under our proposed Log-ICoT curriculum learns $k$-parity with $\mathsf{poly}(n)$ samples and $L = \log_2 k$ training stages. This matches the sample efficiency of explicit CoT while eliminating its inference overhead, and extends prior one-layer parity guarantees to multi-layer architectures. Compared to standard ICoT, which removes thinking tokens one at a time, Log-ICoT removes them in geometric chunks, reducing the number of stages from linear in $k$ to logarithmic. Experiments on multi-layer transformers confirm the theory and visualize how reasoning is progressively absorbed into deeper layers.
format Preprint
id arxiv_https___arxiv_org_abs_2605_28600
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Transformers Provably Learn to Internalize Chain-of-Thought
Huang, Yixiao
Zhu, Hanlin
Wang, Zixuan
Jiao, Jiantao
Russell, Stuart
Sojoudi, Somayeh
Mei, Song
Machine Learning
Chain-of-Thought (CoT) prompting substantially improves the sample efficiency of transformers, reducing the complexity of tasks like parity learning from exponential to polynomial in the input length. However, generating explicit reasoning steps at inference is computationally expensive. Implicit Chain-of-Thought (ICoT) has emerged as a promising empirical remedy that trains models to internalize intermediate steps within their hidden states, but its theoretical foundations remain poorly understood. We give the first theoretical analysis of ICoT, proving that an $L$-layer transformer trained under our proposed Log-ICoT curriculum learns $k$-parity with $\mathsf{poly}(n)$ samples and $L = \log_2 k$ training stages. This matches the sample efficiency of explicit CoT while eliminating its inference overhead, and extends prior one-layer parity guarantees to multi-layer architectures. Compared to standard ICoT, which removes thinking tokens one at a time, Log-ICoT removes them in geometric chunks, reducing the number of stages from linear in $k$ to logarithmic. Experiments on multi-layer transformers confirm the theory and visualize how reasoning is progressively absorbed into deeper layers.
title Transformers Provably Learn to Internalize Chain-of-Thought
topic Machine Learning
url https://arxiv.org/abs/2605.28600