对比四种线性注意力架构,发现新方法在长序列上更高效且可提升模型性能。
Linear Attention Architectures: Mechanisms, Trade-offs, and Cross-Layer Routing

- 统一用递归记忆框架分析四种线性注意力机制的差异
- 在3.5亿参数模型上,Kimi Delta Attention结合Muon优化达到最低验证损失
- 跨层值路由(CLVR)策略让模型表现小幅提升,适合追求精度的开发者
自注意力能全局获取上下文信息,但其序列长度的二次复杂度限制了长序列训练与推理。本文系统比较了softmax注意力与四种近期提出的递归线性注意力架构:DeltaNet、Gated DeltaNet、Kimi Delta Attention和Gated DeltaNet-2。我们以统一的递归记忆形式表达这些机制,明确揭示它们在表达能力、记忆衰减、擦写控制、训练吞吐率和实现复杂度上的差异。实验基于3.5亿参数模型在150亿标记符上训练,涵盖优化器与学习率对比、混合栈与纯栈比较、序列长度运行时测量、更大规模的DeltaNet(13亿与30亿参数)实验及少量下游任务评估。报告的速度结果为训练吞吐率与迭代时间;未提供推理速度实测。在3.5亿参数、150亿标记符的实验中,Kimi Delta Attention配合Muon达到最低最终验证损失;使用AdamW训练的纯Gated DeltaNet栈具有最高归一化训练吞吐率;混合栈通常降低损失但代价是吞吐率下降;在相同架构设置下,Muon始终比AdamW降低最终验证损失。我们引入并评估了针对DeltaNet式记忆的轻量级跨层路由机制。最自然的Δ规则写入误差传递方案未优于基准;而将路由信号送入对齐隐藏流并传递写入值则带来适度改进:跨层值路由(CLVR)在报告的匹配实验中降低了DeltaNet和Gated DeltaNet的最终验证损失。
原文摘要 · Abstract (English)
Self-attention lets each token retrieve information from the full context, but its quadratic cost in sequence length limits training and inference at long context. This paper presents a comparative study of softmax attention and four recent recurrent linear-attention architectures: DeltaNet, Gated DeltaNet, Kimi Delta Attention, and Gated DeltaNet-2. We express these mechanisms in a common recurrent-memory notation, making explicit how they differ in expressivity, memory decay, erase and write control, training throughput, and implementation complexity. Our experiments center on 350M-parameter models trained for 15B tokens, and include optimizer and learning-rate comparisons, hybrid-versus-pure stack comparisons, sequence-length runtime measurements, larger DeltaNet runs at 1.3B and 3B parameters, and a small set of downstream evaluations. The reported speed results measure training throughput and iteration time; we do not provide an empirical inference-speed benchmark. Within the reported 350M-parameter, 15B-token sweep, Kimi Delta Attention with Muon reaches the lowest final validation loss, a pure Gated DeltaNet stack trained with AdamW has the highest normalized training throughput, hybrid stacks generally improve loss at a throughput cost, and Muon consistently lowers final validation loss relative to AdamW in the matched architecture settings we evaluate. We introduce and evaluate lightweight cross-layer routing mechanisms for DeltaNet-style memories. The most natural DeltaNet-inspired formulation, forwarding a lower layer's delta-rule write error into the next layer's value target, does not improve over matched baselines. Routing into the aligned hidden stream and forwarding the write value instead yields a modest improvement in the matched runs we report: Cross-Layer Value Routing (CLVR) lowers final validation loss for both DeltaNet and Gated DeltaNet.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。