RNNs are not Transformers (Yet): The Key Bottleneck on In-Context Retrieval
Kaiyue Wen, Xingyu Dang, Kaifeng Lyu
摘要
This paper investigates the gap in representation powers of Recurrent Neural Networks (RNNs) and Transformers in the context of solving algorithmic problems. We focus on understanding whether RNNs, known for their memory efficiency in handling long sequences, can match the performance of Transformers, particularly when enhanced with Chain-of-Thought (CoT) prompting. Our theoretical analysis reveals that CoT improves RNNs but is insufficient to close the gap with Transformers. A key bottleneck lies in the inability of RNNs to perfectly retrieve information from the context, even with CoT: for several tasks that explicitly or implicitly require this capability, such as associative recall and determining if a graph is a tree, we prove that RNNs are not expressive enough to solve the tasks while Transformers can solve them with ease. Conversely, we prove that adopting techniques to enhance the in-context retrieval capability of RNNs, including Retrieval-Augmented Generation (RAG) and adding a single Transformer layer, can elevate RNNs to be capable of solving all polynomial-time solvable problems with CoT, hence closing the representation gap with Transformers. 3 3 Code is available at https://github.com/dangxingyu/rnn-icrag
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 28 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long Generation 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long Generation 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Artificial Hippocampus Networks for Efficient Long-Context Modeling 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Artificial Hippocampus Networks for Efficient Long-Context Modeling 引用了 Efficient Streaming Language Models with Attention Sinks
- Artificial Hippocampus Networks for Efficient Long-Context Modeling 引用了 Gated Slot Attention for Efficient Linear-Time Sequence Modeling
- Artificial Hippocampus Networks for Efficient Long-Context Modeling 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Distilling to Hybrid Attention Models via KL-Guided Layer Selection 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Distilling to Hybrid Attention Models via KL-Guided Layer Selection 引用了 Gated Slot Attention for Efficient Linear-Time Sequence Modeling
- Large Language Models are Zero-Shot Reasoners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Gated Slot Attention for Efficient Linear-Time Sequence Modeling 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- ATLAS: Learning to Optimally Memorize the Context at Test Time 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
引用它的顶会 Paper28
- Gated Slot Attention for Efficient Linear-Time Sequence ModelingYu Zhang, Songlin Yang, Rui-Jie Zhu, Yue Zhang 等NeurIPS 2024 · 93 次引用
- ATLAS: Learning to Optimally Memorize the Context at Test TimeAli Behrouz, Zeman Li, Praneeth Kacham, Majid Daliri 等ICML 2026 · 57 次引用
- Distilling to Hybrid Attention Models via KL-Guided Layer SelectionYanhong Li, Songlin Yang, Shawn Tan, Mayank Mishra 等ICLR 2026 · 17 次引用
- Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long GenerationLiliang Ren, Congcong Chen, Haoran Xu, Young Jin Kim 等NeurIPS 2025 · 12 次引用
- Artificial Hippocampus Networks for Efficient Long-Context ModelingYunhao Fang, Weihao Yu, Shu Zhong, Qinghao Ye 等ICML 2026 · 9 次引用
它引用的 Paper28
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
相关 Paper
- On the Representational Capacity of Neural Language Models with Chain-of-Thought ReasoningFranz Nowak, Anej Svete, Alexandra Butoi, Ryan CotterellACL 2024
- Compositional Reasoning with Transformers, RNNs, and Chain of ThoughtGilad Yehudai, Noah Amsel, Joan BrunaNeurIPS 2025 · 7 次引用
- Separations in the Representational Capabilities of Transformers and Recurrent ArchitecturesSatwik Bhattamishra, Michael Hahn, Phil Blunsom, Varun KanadeNeurIPS 2024 · 36 次引用
- Analyzing the Power of Chain of Thought through Memorization CapabilitiesLijia Yu, Xiao-Shan Gao, Lijun ZhangNeurIPS 2025 · 2 次引用
- Understanding Transformer Reasoning Capabilities via Graph AlgorithmsClayton Sanford, Bahare Fatemi, Ethan Hall, Anton Tsitsulin 等NeurIPS 2024 · 84 次引用
