A Little Depth Goes a Long Way: The Expressive Power of Log-Depth Transformers
William Merrill, Ashish Sabharwal
摘要
Recent theoretical results show transformers cannot express sequential reasoning problems over long inputs, intuitively because their computational depth is bounded. However, prior work treats the depth as a constant, leaving it unclear to what degree bounded depth may suffice for solving problems over short inputs, or how increasing the transformer's depth affects its expressive power. We address these questions by analyzing transformers whose depth can grow minimally with context length . We show even highly uniform transformers with depth can express two important problems: recognizing regular languages, which captures state tracking abilities and was known to be expressible only by an unconventional, non-uniform model of transformers, and graph connectivity, which underlies multi-step reasoning. Notably, both of these problems cannot be expressed by fixed-depth transformers under standard complexity conjectures, demonstrating the expressivity benefit of growing depth. Moreover, our theory quantitatively predicts how depth must grow with input length to express these problems, showing that depth scaling is more efficient than scaling width or chain-of-thought steps. Empirically, our detailed experiments designed to bridge the expressivity vs. learnability gap reveal that our theoretical depth requirements for regular language recognition closely match the practical depth requirements for successfully training transformers. Thus, our results clarify how depth affects a transformer's reasoning capabilities, and provide practical guidance for effective depth selection for sequential reasoning.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 26 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Constant Bit-size Transformers Are Turing Complete 引用了 Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
- Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 Exact Expressive Power of Transformers with Padding
- Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 The Impact of Positional Encoding on Length Generalization in Transformers
- Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
- Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalization 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Exact Expressive Power of Transformers with Padding 引用了 Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
- Exact Expressive Power of Transformers with Padding 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Exact Expressive Power of Transformers with Padding 引用了 On Layer Normalization in the Transformer Architecture
- Coevolutionary Continuous Discrete Diffusion: Make Your Diffusion Language Model a Latent Reasoner 引用了 Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought
- The Impact of Positional Encoding on Length Generalization in Transformers 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain of Thought Empowers Transformers to Solve Inherently Serial Problems 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain of Thought Empowers Transformers to Solve Inherently Serial Problems 引用了 On Layer Normalization in the Transformer Architecture
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought 引用了 Chain of Thought Empowers Transformers to Solve Inherently Serial Problems
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous Thought 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper26
- Reasoning by Superposition: A Theoretical Perspective on Chain of Continuous ThoughtHanlin Zhu, Shibo Hao, Zhiting Hu, Jiantao Jiao 等NeurIPS 2025 · 86 次引用
- Transformers Provably Learn Chain-of-Thought Reasoning with Length GeneralizationYu Huang, Zixin Wen, Aarti Singh, Yuejie Chi 等NeurIPS 2025 · 22 次引用
- Constant Bit-size Transformers Are Turing CompleteQian Li, Yuyi WangNeurIPS 2025 · 21 次引用
- Exact Expressive Power of Transformers with PaddingWilliam Merrill, Ashish SabharwalNeurIPS 2025 · 21 次引用
- Coevolutionary Continuous Discrete Diffusion: Make Your Diffusion Language Model a Latent ReasonerCai Zhou, Chenxiao Yang, Yi Hu, Chenyu Wang 等ICML 2026 · 21 次引用
它引用的 Paper14
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng 等ICML 2020 · 1,388 次引用
- The Impact of Positional Encoding on Length Generalization in TransformersAmirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das 等NeurIPS 2023 · 444 次引用
- Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth ApproachJonas Geiping, Sean McLeish, Neel Jain, John Kirchenbauer 等NeurIPS 2025 · 431 次引用
- Chain of Thought Empowers Transformers to Solve Inherently Serial ProblemsZhiyuan Liu, Hong Liu, Denny Zhou, Tengyu MaICLR 2024 · 259 次引用
相关 Paper
- Understanding Transformer Reasoning Capabilities via Graph AlgorithmsClayton Sanford, Bahare Fatemi, Ethan Hall, Anton Tsitsulin 等NeurIPS 2024 · 84 次引用
- The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 243 次引用
- Reasoning with Latent Thoughts: On the Power of Looped TransformersNikunj Saunshi, Nishanth Dikkala, Zhiyuan Li, Sanjiv Kumar 等ICLR 2025
- Generalizing Reasoning Problems to Longer LengthsChangnan Xiao, Bing LiuICLR 2025
- Transformers Learn Shortcuts to AutomataBingbin Liu, Jordan T. Ash, Surbhi Goel, Akshay Krishnamurthy 等ICLR 2023 · 11 次引用
