具有门控可微工作记忆的长上下文语言模型
Gated Differentiable Working Memory for Long-Context Language Modeling
AI总结:
Gdwm通过门控可微工作记忆框架,在有限计算下优化长上下文语言模型的测试时间适应,提升效率与性能。
摘要:
长上下文挑战了Transformer:注意力分数在数千个标记上稀释,关键信息常在中间丢失,且模型在推理时难以适应新模式。最近关于测试时间适应的研究通过维护一种工作记忆——在当前上下文中更新的临时参数——来解决这个问题,但现有方法依赖于统一的写入策略,这会浪费计算在低效区域,并在语义异质的上下文中导致高梯度方差。在本文中,我们将测试时间适应重新定义为一种预算受限的记忆巩固问题,重点是哪些上下文部分应在有限计算下巩固到工作记忆中。我们提出了Gdwm(具有门控的可微工作记忆),一种引入了写入控制器的框架,用于控制巩固过程。控制器估计上下文效用,一种信息论度量长期上下文依赖性,并相应分配梯度步骤,同时保持全局覆盖。在ZeroSCROLLS和LongBench v2上的实验表明,Gdwm在比均匀基线少4倍梯度步骤的情况下实现了可比或更优的性能,建立了测试时间适应的新效率-性能帕累托前沿。
英文摘要:
Long contexts challenge transformers: attention scores dilute across thousands of tokens, critical information is often lost in the middle, and models struggle to adapt to novel patterns at inference time. Recent work on test-time adaptation addresses this by maintaining a form of working memory -- transient parameters updated on the current context -- but existing approaches rely on uniform write policies that waste computation on low-utility regions and suffer from high gradient variance across semantically heterogeneous contexts. In this work, we reframe test-time adaptation as a budget-constrained memory consolidation problem, focusing on which parts of the context should be consolidated into working memory under limited computation. We propose Gdwm (Gated Differentiable Working Memory), a framework that introduces a write controller to gate the consolidation process. The controller estimates Contextual Utility, an information-theoretic measure of long-range contextual dependence, and allocates gradient steps accordingly while maintaining global coverage. Experiments on ZeroSCROLLS and LongBench v2 demonstrate that Gdwm achieves comparable or superior performance with 4$\times$ fewer gradient steps than uniform baselines, establishing a new efficiency-performance Pareto frontier for test-time adaptation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。