arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.24281cs.LGcs.AI
收藏

记忆缓存:具有增长记忆的RNNs

Memory Caching: RNNs with Growing Memory

Google(谷歌)

Ali Behrouz, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, Vahab Mirrokni

AI总结:

本文提出Memory Caching技术,通过缓存RNN的记忆状态以增强其记忆容量,实现与Transformer的平衡性能,在长上下文任务中表现优异。

摘要:

转换器已被确立为最近序列建模进展的事实后背,主要归功于其增长的记忆容量,该容量随上下文长度而扩展。虽然对于检索任务来说是合理的,但它导致了二次复杂性,因此激励了最近的研究,以探索可行的亚二次递归替代方案。尽管在多个领域显示出有希望的初步结果,但此类递归架构在需要回忆的任务中表现不佳,通常归因于其固定大小的记忆。在本文中,我们介绍了记忆缓存(MC),一种简单而有效的技术,通过缓存其记忆状态(即隐藏状态)的检查点来增强递归模型。记忆缓存允许RNNs的有效记忆容量随着序列长度而增长,提供了一种灵活的权衡,介于RNNs的固定记忆(即O(L)复杂性)和转换器的生长记忆(即O(L^2)复杂性)之间。我们提出了MC的四个变种,包括门控聚合和稀疏选择机制,并讨论了它们对线性和深度记忆模块的影响。我们在语言建模和长上下文理解任务上的实验结果表明,MC增强了递归模型的性能,支持其有效性。在上下文回忆任务的结果中,尽管转换器在准确性上表现最佳,但我们的MC变种显示出具有竞争力的性能,接近转换器,并且在最先进的递归模型之上表现更好。

英文摘要:

Transformers have been established as the de-facto backbones for most recent advances in sequence modeling, mainly due to their growing memory capacity that scales with the context length. While plausible for retrieval tasks, it causes quadratic complexity and so has motivated recent studies to explore viable subquadratic recurrent alternatives. Despite showing promising preliminary results in diverse domains, such recurrent architectures underperform Transformers in recall-intensive tasks, often attributed to their fixed-size memory. In this paper, we introduce Memory Caching (MC), a simple yet effective technique that enhances recurrent models by caching checkpoints of their memory states (a.k.a. hidden states). Memory Caching allows the effective memory capacity of RNNs to grow with sequence length, offering a flexible trade-off that interpolates between the fixed memory (i.e., $O(L)$ complexity) of RNNs and the growing memory (i.e., $O(L^2)$ complexity) of Transformers. We propose four variants of MC, including gated aggregation and sparse selective mechanisms, and discuss their implications on both linear and deep memory modules. Our experimental results on language modeling, and long-context understanding tasks show that MC enhances the performance of recurrent models, supporting its effectiveness. The results of in-context recall tasks indicate that while Transformers achieve the best accuracy, our MC variants show competitive performance, close the gap with Transformers, and performs better than state-of-the-art recurrent models.

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

↑