历史重演:释放线性注意力中的长上下文能力
History Replays Itself: Unleashing Long-Context Capability in Linear Attention
AI总结:
该研究提出即插即用的NoteBank稀疏情景记忆,在不增加过多计算量的情况下,大幅提升线性注意力模型的长上下文检索能力,在多个基准测试中取得显著效果。
摘要:
线性注意力具备长上下文语言建模所需的效率,但其固定大小的循环状态必须同时支持持续计算和保存不断增长的历史信息。这种耦合强化了一种普遍观点,即状态的记忆容量决定了模型的长上下文能力。我们挑战这一假定上限:循环计算无需承担长期存储的全部负担。我们引入NoteBank,一种稀疏情景记忆,它在未来查询已知前归档选定文本,利用主干网络的原生特征进行写入和寻址,并通过重放在原生前向计算中读取检索到的证据。这一无需训练、即插即用的接口无需外部嵌入模型、单独训练的检索器或单独的神经读取器。在100万token时,它将Gated DeltaNet在6项RULER检索任务上的平均准确率从1.7%提升至70.3%,且在4K至1M token范围内未观察到显著的检索性能下降。这种恢复使分析FLOPs增加不超过0.025%,在匹配宽度、深度和精度的情况下,持久上下文存储约为Transformer全MHA KV缓存的1/2600。实验覆盖了3种13亿参数的循环主干网络,以及Mamba-2-8B和后训练的Qwen3.5-9B,在LongBench v1/v2和MemoryAgentBench上均取得了提升。这些结果共同表明,稀疏证据存储和原生重放可在保持循环计算效率的同时,大幅扩展预训练线性注意力模型的长上下文能力。
英文摘要:
Linear attention promises the efficiency needed for long-context language modelling, yet its fixed-size recurrent state must simultaneously support ongoing computation and preserve information from an ever-growing history. This coupling has reinforced a prevailing view that the state's memory capacity defines the model's long-context capability. We challenge this presumed ceiling: \emph{recurrent computation need not bear the full burden of long-term storage}. We introduce NoteBank, a sparse episodic memory that archives selected text before future queries are known, uses the backbone's native features for writing and addressing, and reads retrieved evidence through its native forward computation via replay. This \emph{training-free, plug-and-play} interface requires no external embedding model, separately trained retriever, or separate neural reader. At one million tokens, it raises Gated DeltaNet's mean accuracy across six RULER retrieval tasks from 1.7% to 70.3%, with no observed significant retrieval degradation from 4K to 1M tokens. This recovery adds $\leqslant$0.025% to analytical FLOPs, with persistent context storage approximately 1/2,600 that of a Transformer's full MHA KV cache at matched width, depth, and precision. Experiments extend from three 1.3B recurrent backbones to Mamba-2-8B and post-trained Qwen3.5-9B, demonstrating gains on LongBench v1/v2 and MemoryAgentBench. Together, these results show that sparse evidence storage and native replay can substantially expand the long-context capability of pretrained linear attention models while retaining the efficiency of recurrent computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。