训练策略可释放线性注意力的关联记忆召回能力
Eliciting the Recall Capacity of Linear Attention
做线性注意力模型(比如 Mamba、RWKV 这类)的人应该看看这篇。它没改架构,只靠句子复现和损失重加权两种训练手段就把召回差距拉平到 softmax 水平,训练侧的改动成本很低。
arXiv 论文《Eliciting the Recall Capacity of Linear Attention》研究线性注意力模型在语言建模中相对 softmax 注意力在关联召回(AR)上的显著差距。作者通过自然语言评测、合成召回任务和针对性训练干预来定位问题根源,并在合成设置下量化了状态规模决定可从记忆中召回条目数量的规律,发现该经验性缩放规律在所测的多种线性注意力架构上表现一致。
实验显示,即使只有单层模型在大规模下也能学习跨长距离检索数千个关联,但标准的语言模型训练并不能可靠地教会线性模型从上下文中复制内容,而可比的 softmax 模型可以自然学会。为此作者提出两种强化召回监督的训练方法:上下文内句子复现(in-context sentence repetition)和上下文敏感的损失重加权(context-sensitive loss reweighting)。
在不改变架构、token 预算和优化步数的前提下,两种方法都提升了召回密集型基准的表现,将长距离 AR 差距缩小到接近 softmax 基线,代价是对通用语言建模性能有轻微影响。结论是线性注意力架构本身具备相当大的检索容量,只是归纳偏置和语言建模训练目标的限制让这种能力难以被自发激发。
Eliciting the Recall Capacity of Linear Attention
Linear attention models exhibit a disproportionate deficit relative to softmax attention in associative recall (AR) in language modeling. We investigate this gap through natural language evaluations, synthetic recall tasks, and targeted training interventions. Using a synthetic setting, we quantify the role of state-size in how many items can be recalled from memory and find a similar empirical scaling across the tested linear-attention architectures. Testing this relationship reveals that even a single layer at scale can learn to retrieve thousands of associations across long distances. Yet, standard language model training does not reliably teach a linear model to copy from context, whereas a comparable softmax model learns to do so. Considering this, we strengthen recall supervision during training through in-context sentence repetition and context-sensitive loss reweighting. Both methods improve recall-intensive benchmark performance and narrow the long-distance AR gap to the softmax baseline without changing the architecture, token budget, or number of optimization steps, at a slight cost to general language modeling. These targeted changes to training can thus elicit substantial but underutilized retrieval capacity in linear-attention models. These findings suggest that, although linear-attention architectures have substantial capacity for recall, their inductive biases and the demands of language model training make it difficult to develop this capability without dedicated incentives.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include linear attention, softmax attention, papers, training tips.
Source attribution: curated from arXiv cs.LG (@Johan Lindqvist, Antonio Orvieto).