arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.18510cs.LGcs.CLstat.ML
收藏

RNN 尚不是 Transformer:上下文检索的关键瓶颈

RNNs are not Transformers (Yet): The Key Bottleneck on In-context Retrieval

Institute for Interdisciplinary Information Sciences, Tsinghua University(清华大学交叉信息研究院);Princeton University(普林斯顿大学)

Kaiyue Wen, Xingyu Dang, Kaifeng Lyu

AI总结:

该研究从理论层面揭示RNN与Transformer在算法问题表征上的核心差距源于上下文检索能力不足,验证了引入RAG或单层Transformer层可让RNN借助CoT解决所有多项式时间问题,从而弥合表征差距。

摘要:

本文研究循环神经网络(Recurrent Neural Networks,RNNs)与 Transformer 在解决算法问题场景下的表征能力差距。我们重点探究以处理长序列时的内存效率著称的 RNN,尤其在结合思维链(Chain-of-Thought,CoT)提示增强后,性能能否追平 Transformer。我们的理论分析表明,CoT 能提升 RNN 的表现,但不足以弥合其与 Transformer 的差距。核心瓶颈在于 RNN 无法从上下文中完美检索信息,即便使用 CoT 也不行:针对若干明确或隐含需要该能力的任务,例如联想回忆、判断图是否为树,我们证明 RNN 的表达能力不足以解决这些任务,而 Transformer 可轻松完成。反过来,我们证明采用提升 RNN 上下文检索能力的技术,包括检索增强生成(Retrieval-Augmented Generation,RAG)以及添加单层 Transformer 层,能让 RNN 具备借助 CoT 解决所有多项式时间可解问题的能力,从而弥合与 Transformer 的表征差距。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑