arXiv:2504.13173cs.LGcs.AI2025-04被引 58

将注意力机制重构成记忆模块,提出可插拔的序列模型设计框架

It's All Connected: A Journey Through Test-Time Memorization, Attentional Bias, Retention, and Online Optimization

  • 把Transformer等模型视为带注意力偏好的记忆系统,用新目标优化其记忆机制
  • 提出Miras框架,三种新模型在语言建模与记忆任务中超越Transformer
  • 适合研究高效序列建模、记忆机制或想替换现有架构的研究者

设计高效有效的骨干架构一直是提升基础模型能力的核心。受人类认知中注意力偏好的启发——即自然倾向于关注特定事件或刺激——我们重新构想神经架构,包括Transformer、Titan以及现代线性循环神经网络,将其视为使用内部目标(称为注意力偏好)学习键值映射的关联记忆模块。令人惊讶的是,我们发现大多数现有序列模型都利用(1)点积相似性或(2)L2回归目标作为其注意力偏好。超越这些目标,我们提出一系列替代注意力偏好配置及其有效近似,以稳定训练过程。随后,我们将现代深度学习架构中的遗忘机制重新解释为一种保留正则化,从而提出一套新的遗忘门用于序列模型。基于这些洞见,我们提出Miras,一个通用框架,用于基于四个选择设计深度学习架构:(i) 关联记忆架构,(ii) 注意力偏好目标,(iii) 保留门,(iv) 记忆学习算法。我们提出了三个新型序列模型——Moneta、Yaad和Memora——它们超越了现有线性RNN的能力,同时保持快速并行训练。实验表明,Miras的不同设计选择会产生具有不同优势的模型。例如,某些Miras实例在语言建模、常识推理和高记忆需求任务中表现卓越,甚至超过Transformer和其他现代线性循环模型。

原文摘要 · Abstract (English)

Designing efficient and effective architectural backbones has been in the core of research efforts to enhance the capability of foundation models. Inspired by the human cognitive phenomenon of attentional bias-the natural tendency to prioritize certain events or stimuli-we reconceptualize neural architectures, including Transformers, Titans, and modern linear recurrent neural networks as associative memory modules that learn a mapping of keys and values using an internal objective, referred to as attentional bias. Surprisingly, we observed that most existing sequence models leverage either (1) dot-product similarity, or (2) L2 regression objectives as their attentional bias. Going beyond these objectives, we present a set of alternative attentional bias configurations along with their effective approximations to stabilize their training procedure. We then reinterpret forgetting mechanisms in modern deep learning architectures as a form of retention regularization, providing a novel set of forget gates for sequence models. Building upon these insights, we present Miras, a general framework to design deep learning architectures based on four choices of: (i) associative memory architecture, (ii) attentional bias objective, (iii) retention gate, and (iv) memory learning algorithm. We present three novel sequence models-Moneta, Yaad, and Memora-that go beyond the power of existing linear RNNs while maintaining a fast parallelizable training process. Our experiments show different design choices in Miras yield models with varying strengths. For example, certain instances of Miras achieve exceptional performance in special tasks such as language modeling, commonsense reasoning, and recall intensive tasks, even outperforming Transformers and other modern linear recurrent models.

序列建模记忆机制Transformer改进架构设计

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。