SDG:分块边界处的状态依赖门控,用于线性注意力机制
SDG: State-Dependent Gating at Chunk Boundaries for Linear Attention
AI总结:
该研究提出状态依赖门控(SDG),为线性注意力模型在分块边界计算逐元素门控,开发融合内核并经 100B token 训练的模型实证验证,可提升多类任务性能。
摘要:
近期的门控线性注意力模型采用与状态无关的门控,该门控由 token 表示计算得到,且不直接读取循环记忆。这种设计支持高效的分块计算:序列被划分为连续 token 的分块,每个分块内可并行计算。然而,即便层存储了不同信息,同一 token 表示仍会产生相同的门控。我们提出状态依赖门控(SDG),它通过分块内的记忆变化计算逐元素门控,并在分块边界处应用,这为遗忘提供了状态反馈,同时保留了每个分块内的并行计算。我们为 Gated DeltaNet、Kimi Delta Attention、Gated DeltaNet-2 和 Mamba-3 开发了融合内核。我们的理论分析在信号-噪声模型下量化了状态依赖逐元素门控的潜在重建收益,还表明当门控固定时,边界衰减是逐元素的岭近端步。对在 100B token 上训练的 13 亿参数线性注意力模型及混合模型的实证评估显示,其在语言建模、常识推理、合成与真实世界检索、长上下文理解等任务上均有提升。这些结果表明,SDG 是增强现有线性注意力模型的有效方法。
英文摘要:
Recent gated linear attention models use state-independent gates, computed from token representations without directly reading the recurrent memory. This design supports efficient chunkwise computation: sequences are divided into chunks of consecutive tokens, with parallel computation within each chunk. However, the same token representation produces the same gate, even when the layer stores different information. We introduce State-Dependent Gating (SDG), which computes element-wise gates from the change in memory over a chunk and applies them at the chunk boundary. This provides state feedback for forgetting while preserving parallel computation within each chunk. We develop fused kernels for Gated DeltaNet, Kimi Delta Attention, Gated DeltaNet-2, and Mamba-3. Our theoretical analysis quantifies the potential reconstruction benefits of state-dependent, element-wise gating under a signal--noise model. We also show that boundary decay is an element-wise ridge proximal step when the gate is held fixed. Empirical evaluation of 1.3B linear attention and hybrid models trained on 100B tokens shows improvements across language modeling, commonsense reasoning, synthetic and real-world retrieval, and long-context understanding. These results demonstrate that SDG is an effective approach to enhancing existing linear attention models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。