ATLAS: Learning to Optimally Memorize the Context at Test Time
这篇论文提出了Atlas,一个长期记忆模块,通过优化记忆来优化测试时的上下文记忆,从而在语言建模、常识推理、召回密集型和长上下文理解任务中超越了Transformer和最近的线性循环模型。
更新于 2025-05-30。作者:Ali Behrouz、Zeman Li、Praneeth Kacham、Majid Daliri、Yuan Deng、Peilin Zhong、Meisam Razaviyayn、Vahab Mirrokni。
中文摘要
Transformer 已成为序列建模中最受欢迎的骨干网络,这主要得益于它们在上下文检索任务中的有效性和大规模学习的特点。然而,它们的二次内存和时间复杂度限制了它们在长序列中的应用,这也促使研究人员探索有效的替代架构,如现代循环神经网络(也称为长期循环记忆模块)。尽管它们在最近的各种下游任务中取得了成功,但在需要长上下文理解和长序列外推的任务中仍然存在挑战。我们观察到,这些不足源于其设计中的三个相互独立的方面:(1)有限的内存容量,由内存架构和输入特征映射的限制所决定;(2)更新的在线性质,即仅针对最后一个输入优化内存;(3)对固定大小内存的较少表达性管理。为了增强这三个方面,我们提出了 ATLAS,这是一个具有高容量的长期记忆模块,通过基于当前和过去标记优化内存来学习记忆上下文,克服了长期记忆模型在线的性质。在此基础上,我们提出了一组新的类似 Transformer 的架构,称为 DeepTransformers,这是原始 Transformer 架构的严格推广。我们在语言建模、常识推理、记忆密集型和长上下文理解任务上的实验结果表明,ATLAS 在性能上超越了 Transformer 和最近的线性循环模型。ATLAS 进一步提高了 Titans 在长上下文上的性能,在 BABILong 基准的 10M 上下文长度上实现了 +80\% 的准确率。
英文摘要
Transformers have been established as the most popular backbones in sequence modeling, mainly due to their effectiveness in in-context retrieval tasks and the ability to learn at scale. Their quadratic memory and time complexity, however, bound their applicability in longer sequences and so has motivated researchers to explore effective alternative architectures such as modern recurrent neural networks (a.k.a long-term recurrent memory module). Despite their recent success in diverse downstream tasks, they struggle in tasks that requires long context understanding and extrapolation to longer sequences. We observe that these shortcomings come from three disjoint aspects in their design: (1) limited memory capacity that is bounded by the architecture of memory and feature mapping of the input; (2) online nature of update, i.e., optimizing the memory only with respect to the last input; and (3) less expressive management of their fixed-size memory. To enhance all these three aspects, we present ATLAS, a long-term memory module with high capacity that learns to memorize the context by optimizing the memory based on the current and past tokens, overcoming the online nature of long-term memory models. Building on this insight, we present a new family of Transformer-like architectures, called DeepTransformers, that are strict generalizations of the original Transformer architecture. Our experimental results on language modeling, common-sense reasoning, recall-intensive, and long-context understanding tasks show that ATLAS surpasses the performance of Transformers and recent linear recurrent models. ATLAS further improves the long context performance of Titans, achieving +80\% accuracy in 10M context length of BABILong benchmark.
解读
一句话总结
这篇论文提出了Atlas,一个长期记忆模块,通过优化记忆来优化测试时的上下文记忆,从而在语言建模、常识推理、召回密集型和长上下文理解任务中超越了Transformer和最近的线性循环模型。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:现有的Transformer架构在处理长序列时存在内存和时间的二次复杂度,限制了其在长上下文理解和长序列推断中的应用。
- 现有方案不足:现有的循环神经网络在长上下文理解、上下文检索和长序列推断方面表现不佳,主要原因是内存容量有限、更新方式为在线且内存管理表达能力不足。
- 研究目标:设计一个长期记忆模块,通过优化记忆来优化测试时的上下文记忆,提高长上下文理解能力。
问题2:论文的核心创新点是什么?
- 技术创新:提出了Atlas,一个基于优化记忆的长期记忆模块,通过优化记忆来优化测试时的上下文记忆。
- 方法改进:引入了滑动窗口更新规则(Omega规则),优化和更新记忆基于给定上下文窗口中的所有过去标记,而不是仅基于最后一个标记。
- 优势:与现有的Transformer和线性循环模型相比,Atlas在长上下文理解和长序列推断任务中表现出更好的性能。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在语言建模、常识推理、召回密集型和长上下文理解任务上对Atlas、OmegaNet、DeepTransformers和Dot进行了评估。
- 性能提升:Atlas在这些任务上超越了Transformer和最近的线性循环模型,特别是在长上下文理解任务中,取得了显著的性能提升。
- 对比结果:与Titans相比,Atlas在10M上下文长度的BABILong基准测试中实现了+80%的准确率。
问题4:这个研究的实际应用价值是什么?
- 应用场景:语言建模、常识推理、召回密集型和长上下文理解任务。
- 实施建议:在需要长上下文理解和长序列推断的应用中使用Atlas。
- 局限与展望:Atlas的内存管理仍然依赖于梯度下降,可能会收敛到局部最优解。未来的工作可以探索更有效的优化器,以进一步提高性能。