arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.08587cs.LGcs.AI
收藏

Kaczmarz线性注意力

Kaczmarz Linear Attention

School of Mathematics and Statistics(数学与统计学学院);Xi’an Jiaotong University(西安交通大学);Gaoling School of Artificial Intelligence(白洋学校人工智能学院);Renmin University of China(中国人民大学)

Jiaxuan Zou, Ruifeng Ren, Yong Liu

AI总结:

本文提出Kaczmarz线性注意力(KLA),通过改进Gated DeltaNet的更新机制,提升长上下文语言模型的准确性和效率。

摘要:

长上下文语言模型在现代序列建模中仍居核心地位,但Transformer注意力的二次成本使扩展计算上不可行。线性递归模型通过将上下文压缩为固定大小的状态来解决这一瓶颈,使遗忘、写入和编辑信息的规则成为关键设计问题。为解决状态维护问题,Gated DeltaNet (GDN)结合了门控状态衰减与delta规则残差写入,使用可学习系数平衡遗忘和更新幅度。然而,此系数是经验性学习而非源自底层目标,可能导致更新幅度不理想。本文重新审视GDN背后的在线回归目标,并受Kaczmarz投影方法启发,推导出关键范数归一化的动态步长$β_t = η_t / (\|k_t\|_2^2 + ε)$用于残差更新。我们提出Kaczmarz线性注意力(KLA),一种对GDN的单标量修改,保留了状态形状、门控、线性递归和分块并行算法。在0.4B规模下,使用1B-token预算时,KLA在评估的线性时间基线中实现了最低的验证困惑度,8.09 vs 8.50 for GDN,并在65K tokens内保持稳定。在受控任务中,KLA在单针在海中检索中达到100%,在多查询联想回忆中比GDN提高8倍,且在32K上下文下解码吞吐量提高2.1倍。这些结果表明,关键范数归一化的Kaczmarz系数是delta规则序列模型的第一阶设计轴:它在不改变递归状态或硬件内核的情况下,提高了准确性、外推能力和解码效率。

英文摘要:

Long-context language modeling remains central to modern sequence modeling, but the quadratic cost of Transformer attention makes scaling computationally prohibitive. Linear recurrent models address this bottleneck by compressing the context into a fixed-size state, making the rule that forgets, writes, and edits information a central design problem. To address state maintenance, Gated DeltaNet (GDN) combines gated state decay with delta-rule residual writes, using a learnable coefficient to balance forgetting and update magnitude. However, this coefficient is learned empirically rather than derived from the underlying objective, which can lead to suboptimal update magnitudes. We revisit the online-regression objective underlying GDN and, inspired by the Kaczmarz projection method, derive the key-norm-normalized dynamic step size $β_t = η_t / (\|k_t\|_2^2 + ε)$ for residual updates. We propose Kaczmarz Linear Attention (KLA), a one-scalar modification of GDN that preserves the state shape, gates, linear recurrence, and chunkwise parallel algorithm. At the 0.4B scale with a 1B-token budget, KLA achieves the lowest validation perplexity among evaluated linear-time baselines, 8.09 versus 8.50 for GDN, and remains stable up to 65K tokens. On controlled tasks, KLA reaches 100% on single-needle-in-a-haystack retrieval, improves 8x multi-query associative recall by 7.03 points over GDN, and delivers 2.1x higher decode throughput at 32K context. These results suggest that the key-norm-normalized Kaczmarz coefficient is a first-order design axis for delta-rule sequence models: it improves accuracy, extrapolation, and decoding efficiency without changing the recurrent state or hardware kernel.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑