测试时回归:设计具有联想记忆的序列模型的统一框架
Test-time regression: a unifying framework for designing sequence models with associative memory
AI总结:
受联想回忆启发,本文提出测试时回归统一框架,将记忆形式化为回归问题,以此推导并解释了Transformers等序列模型,揭示了设计空间盲区以推导新架构,并连接了序列建模与经典回归方法。
摘要:
序列模型是现代深度学习的核心。然而,快速的发展产生了多种看似不相关的架构,例如Transformers和循环替代方案。在本文中,受联想回忆(即检索上下文相关token的能力)这一经验重要性的启发,我们引入了一个统一框架来理解和推导这些序列模型。我们将联想回忆形式化为一个两步过程:记忆和检索,并将记忆转化为回归问题。结合这两个步骤的层通过对其输入token进行“测试时回归”来执行联想回忆。包括线性注意力、状态空间模型、快速权重程序员、在线学习器和softmax注意力在内的著名层,都是作为由三个设计选择定义的特殊情况而出现的:回归权重、回归器函数类和测试时优化算法。我们的方法阐明了线性注意力为何无法捕获token间的相关性,并为softmax注意力中query-key归一化的经验有效性提供了数学证明。此外,它还揭示了设计空间中尚未探索的区域,我们利用这些区域推导出softmax注意力的新颖高阶泛化。除了统一之外,我们的工作还将序列建模与经典的回归方法联系起来,这是一个拥有大量文献的领域,为开发更强大且具有理论原则的架构铺平了道路。
英文摘要:
Sequence models lie at the heart of modern deep learning. However, rapid advancements have produced a diversity of seemingly unrelated architectures, such as Transformers and recurrent alternatives. In this paper, we introduce a unifying framework to understand and derive these sequence models, inspired by the empirical importance of associative recall, the capability to retrieve contextually relevant tokens. We formalize associative recall as a two-step process, memorization and retrieval, casting memorization as a regression problem. Layers that combine these two steps perform associative recall via ``test-time regression'' over its input tokens. Prominent layers, including linear attention, state-space models, fast-weight programmers, online learners, and softmax attention, arise as special cases defined by three design choices: the regression weights, the regressor function class, and the test-time optimization algorithm. Our approach clarifies how linear attention fails to capture inter-token correlations and offers a mathematical justification for the empirical effectiveness of query-key normalization in softmax attention. Further, it illuminates unexplored regions within the design space, which we use to derive novel higher-order generalizations of softmax attention. Beyond unification, our work bridges sequence modeling with classic regression methods, a field with extensive literature, paving the way for developing more powerful and theoretically principled architectures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。