线性注意力中的海马体:为循环状态遗忘的内容提供精确记忆
A Hippocampus for Linear Attention: An Exact Memory for What the Recurrent State Forgets
AI总结:
针对线性注意力模型因固定大小循环状态导致早期事实被覆盖、精确回忆退化的问题,提出海马体线性注意力(HOLA),通过添加有界精确KV缓存作为互补记忆系统,实现半参数化测试时记忆,在多项基准上取得显著提升。
摘要:
线性注意力和状态空间语言模型将前缀压缩为固定大小的循环状态,实现O(1)内存,但代价是损失精确记忆:当许多键-值关联竞争时,早期事实被覆盖,针检索性能下降。受互补学习系统启发,我们为线性注意力添加了海马体互补。HOLA(海马体线性注意力)保留通常的delta规则状态作为压缩记忆,并添加一个有界精确KV缓存,形成半参数化测试时记忆:状态建模线性可压缩结构,而缓存存储不应强制通过该状态压缩的关联。缓存无需学习的驱逐模块,保留具有大beta * ||e||(实际提交到状态的预测残差)的标记;解耦的RMSNorm-gamma缓存读取将这些精确KV对转化为锐利检索而非软平均。在15B SlimPajama标记上训练的340M参数模型上,HOLA将Wikitext困惑度从27.32降至22.92(-16.1%),低于全注意力Transformer++(26.88),并将LAMBADA困惑度从30.95降至30.26。它还在线性上下文检索中达到最佳,并且在RULER针堆检索中,在32k标记(训练长度的16倍)上比GDN或匹配的HOLA+最近缓存更鲁棒。
英文摘要:
Linear-attention and state-space language models compress the prefix into a fixed-size recurrent state, yielding O(1) memory at the cost of a lossy exact memory: when many key--value associations compete, earlier facts are overwritten and needle recall degrades. Inspired by Complementary Learning Systems, we give linear attention a hippocampal complement. HOLA (Hippocampal Linear Attention) keeps the usual delta-rule state as a compressive memory and adds a bounded exact KV cache, forming a semiparametric test-time memory: the state models linearly compressible structure, while the cache stores associations that should not be forced through that state. The cache writes without a learned eviction module, keeping tokens with large beta * ||e||, the prediction residual actually committed to the state; a decoupled RMSNorm-gamma cache read then turns these exact KV pairs into sharp retrieval rather than soft averaging. At 340M parameters trained on 15B SlimPajama tokens, HOLA lowers Wikitext perplexity from 27.32 to 22.92 (-16.1%), below a full-attention Transformer++ (26.88), and improves LAMBADA perplexity from 30.95 to 30.26. It also achieves the best linear in-context retrieval and remains much more robust than GDN or a matched HOLA+recency cache on RULER needle-in-a-haystack recall out to 32k tokens (16x its training length).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。