Compositional Reasoning with Transformers, RNNs, and Chain of Thought
Gilad Yehudai, Noah Amsel, Joan Bruna
摘要
It is well understood that different neural network architectures are suited to different tasks, but is there always a single best architecture for a given task? We compare the expressive power of transformers, RNNs, and transformers with chain of thought tokens on a simple and natural class of tasks we term Compositional Reasoning Questions (CRQ). This family captures multi-step problems with treelike compositional structure, such as evaluating Boolean formulas. We prove that under standard hardness assumptions, none of these three architectures is capable of solving CRQs unless some hyperparameter (depth, embedding dimension, and number of chain of thought tokens, respectively) grows with the size of the input. We then provide constructions for solving CRQs with each architecture. For transformers, our construction uses depth that is logarithmic in the problem size. For RNNs, logarithmic embedding dimension is necessary and sufficient, so long as the inputs are provided in a certain order. For transformers with chain of thought, our construction uses n CoT tokens for input size n. These results show that, while CRQs are inherently hard, there are several different ways for language models to overcome this hardness. Even for a single class of problems, each architecture has strengths and weaknesses, and none is strictly better than the others. solve all CRQs of size n (Theorem 5.4). This ability depends on the inputs being arranged in a particular order (Algorithm 1); if they are ordered adversarially, RNNs require O(n) hidden dimension (Theorem 5.2).
- In Section 6, we prove that transformers augmented with O(log n) CoT tokens cannot solve CRQs of size n, but transformers augmented with O(n) CoT tokens can (Theorem 6.1).
Each of these results fills a gap in the literature; taken together, they demonstrate the fundamental trade-offs between different models (Table 1). While deep transformers are highly parallelizable, they require O(log n) depth in the worst case, so the model size must depend (albeit mildly) on the problem size. Likewise, RNNs use little compute but must grow to handle larger problems, although their success depends on the order of the inputs. Chain of thought allows a single, logarithmic-size model to handle any CRQ, but it runs slowly and is not parallelizable. Overall, our work reveals a rich complexity landscape for an important class of reasoning problems.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper2
- The Coverage Principle: How Pre-Training Enables Post-TrainingFan Chen, Audrey Huang, Noah Golowich, Sadhika Malladi 等ICLR 2026 · 被引用 28 次
- How does Chain of Thought decompose complex tasks?Amrut Nadgir, Vijay Balasubramanian, Pratik ChaudhariICML 2026 · 被引用 1 次
它引用的顶会 Paper19
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 被引用 22,562 次
- Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi 等ICLR 2020 · 被引用 481 次
- Towards Revealing the Mystery behind Chain of Thought: A Theoretical PerspectiveGuhao Feng, Bohang Zhang, Yuntian Gu, Haotian Ye 等NeurIPS 2023 · 被引用 470 次
- Chain of Thought Empowers Transformers to Solve Inherently Serial ProblemsZhiyuan Liu, Hong Liu, Denny Zhou, Tengyu MaICLR 2024 · 被引用 259 次
- The Expressive Power of Transformers with Chain of ThoughtWilliam Merrill, Ashish SabharwalICLR 2024 · 被引用 243 次
相关 Paper
- Chain-of-Thought Provably Enables Learning the (Otherwise) UnlearnableChenxiao Yang, Zhiyuan Li, David WipfICLR 2025
- Understanding Transformer Reasoning Capabilities via Graph AlgorithmsClayton Sanford, Bahare Fatemi, Ethan Hall, Anton Tsitsulin 等NeurIPS 2024 · 被引用 84 次
- Analyzing the Power of Chain of Thought through Memorization CapabilitiesLijia Yu, Xiao-Shan Gao, Lijun ZhangNeurIPS 2025 · 被引用 2 次
- On the Reasoning Abilities of Masked Diffusion Language ModelsAnej Svete, Ashish SabharwalICLR 2026 · 被引用 8 次
- RNNs are not Transformers (Yet): The Key Bottleneck on In-Context RetrievalKaiyue Wen, Xingyu Dang, Kaifeng LyuICLR 2025
