Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysis
Hongkang Li, Songtao Lu, Pin-Yu Chen, Xiaodong Cui, Meng Wang
摘要
Chain-of-Thought (CoT) is an efficient prompting method that enables the reasoning ability of large language models by augmenting the query using multiple examples with multiple intermediate steps. Despite the empirical success, the theoretical understanding of how to train a Transformer to achieve the CoT ability remains less explored. This is primarily due to the technical challenges involved in analyzing the nonconvex optimization on nonlinear attention models. To the best of our knowledge, this work provides the first theoretical study of training Transformers with nonlinear attention to obtain the CoT generalization capability so that the resulting model can inference on unseen tasks when the input is augmented by examples of the new task. We first quantify the required training samples and iterations to train a Transformer model towards CoT ability. We then prove the success of its CoT generalization on unseen tasks with distribution-shifted testing data. Moreover, we theoretically characterize the conditions for an accurate reasoning output by CoT even when the provided reasoning examples contain noises and are not always accurate. In contrast, in-context learning (ICL), which can be viewed as one-step CoT without intermediate steps, may fail to provide an accurate output when CoT does. These theoretical findings are justified through experiments.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Bounds of Chain-of-Thought Robustness: Reasoning Steps, Embed Norms, and Beyond 引用了 Let's Verify Step by Step
- Bounds of Chain-of-Thought Robustness: Reasoning Steps, Embed Norms, and Beyond 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Dynamics of Spontaneous Topic Changes in Next Token Prediction with Self-Attention 引用了 Language Models are Few-Shot Learners
- Dynamics of Spontaneous Topic Changes in Next Token Prediction with Self-Attention 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Let's Verify Step by Step 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Compositional Generalization from Learned Skills via CoT Training: A Theoretical and Structural Analysis for Reasoning 引用了 Let's Verify Step by Step
- Compositional Generalization from Learned Skills via CoT Training: A Theoretical and Structural Analysis for Reasoning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Learning Transferable Visual Models From Natural Language Supervision 引用了 Language Models are Few-Shot Learners
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes 引用了 Language Models are Few-Shot Learners
- Multi-head Transformers Provably Learn Symbolic Multi-step Reasoning via Gradient Descent 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper11
- Enhancing Graph Transformers with Hierarchical Distance Structural EncodingYuankai Luo, Hongkang Li, Lei Shi, Xiao-Ming WuNeurIPS 2024 · 26 次引用
- Multi-head Transformers Provably Learn Symbolic Multi-step Reasoning via Gradient DescentTong Yang, Yu Huang, Yingbin Liang, Yuejie ChiNeurIPS 2025 · 8 次引用
- Compositional Generalization from Learned Skills via CoT Training: A Theoretical and Structural Analysis for ReasoningXinhao Yao, Ruifeng Ren, Yun Liao, Lizhong Ding 等ICLR 2026 · 6 次引用
- Bounds of Chain-of-Thought Robustness: Reasoning Steps, Embed Norms, and BeyondDingzirui Wang, Xuanliang Zhang, Keyan Xu, Qingfu Zhu 等ICLR 2026 · 3 次引用
- Dynamics of Spontaneous Topic Changes in Next Token Prediction with Self-AttentionMumin Jia, Jairo Diaz RodriguezNeurIPS 2025 · 3 次引用
它引用的 Paper35
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards 等ICLR 2024 · 3,045 次引用
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
相关 Paper
- Transformers Learn to Implement Multi-step Gradient Descent with Chain of ThoughtJianhao Huang, Zixuan Wang, Jason D. LeeICLR 2025
- Unlabeled Data Can Provably Enhance In-Context Learning of TransformersRenpu Liu, Jing YangNeurIPS 2025 · 3 次引用
- LaRS: Latent Reasoning Skills for Chain-of-Thought ReasoningZifan Xu, Haozhu Wang, Dmitriy Bespalov, Xian Wu 等EMNLP Findings 2024 · 4 次引用
- Dissecting Chain-of-Thought: Compositionality through In-Context Filtering and LearningYingcong Li, Kartik Sreenivasan, Angeliki Giannou, Dimitris Papailiopoulos 等NeurIPS 2023 · 12 次引用
- To Think or Not to Think: The Hidden Cost of Meta-Training with Excessive CoT ExamplesVignesh Kothapalli, Ata Fatahi Baarzi, Hamed Firooz, Maziar SanjabiACL 2026
