Muir:具有敏感度分配门控与匹配滤波读出的线性注意力

·

研究论文 · 2026/11/06

线性注意力将上下文压缩为固定大小的键值状态,实现线性时间训练和常数内存推理。门控delta规则模型在写入新值前会衰减状态并擦除对传入键的预测;GDN-2进一步引入通道级衰减和解耦的全秩擦除/写入门。然而,我们发现状态更新对擦除的敏感度远低于写入:键激活和单位归一化将键能量集中在稀疏通道子集上,而值写入则缩放所有通道,因此擦除门可以用更低秩参数化。此外,慢衰减状态行累积的范数远大于快行,主导无权重读出,迫使写入时更强擦除以抑制干扰。基于此分析,我们提出Muir,将所有门融合为敏感度分配的低秩投影,用匹配滤波读出 gate 重新加权状态行,并将节省的参数重新投入更宽的前馈网络。由于标准分块算法在饱和宽矩阵单元所需的大块尺寸下数值不稳定,我们设计了并行更新以实现稳定高效训练。在166M-1.34B参数上,Muir相比GDN-2降低困惑度1.8-2.0%,相比Transformer降低2.5-3.6%,常识准确率提升最多1.9点,并改进了相比GDN-2的抽取式召回。在1.34B规模上,Muir在多跳和多针召回上均优于两个基线,从4K训练长度外推到10M令牌流无困惑度漂移,并在静态读出下保持近100%的passkey检索至1M令牌。Muir在匹配GDN-2吞吐量的同时实现这些增益,达到其100B令牌验证损失快1.2倍,在32K下训练比Transformer快2.7倍。

Muir通过分析状态更新敏感度,提出低秩擦除门和匹配滤波读出,显著提升线性注意力模型的性能与效率,在长上下文外推和检索任务上表现突出,且训练吞吐量高,具有实际应用价值。

Linear attention compresses context into a fixed-size key-value state for linear-time training and constant-memory inference. Gated delta-rule models decay this state and erase its prediction for an incoming key before writing a new value; Gated DeltaNet-2 (GDN-2) generalizes this with channel-wise decay and decoupled, full-rank erase and write gates. However, we show that state updates are far less sensitive to erasure than to writes: key activation and unit normalization concentrate key energy onto a sparse subset of channels, whereas value writes scale all channels, so the erase gate can be parameterized at lower rank. Furthermore, slow-decaying state rows accumulate much larger norms than fast rows, dominating unweighted readout and forcing stronger write-time erasure to suppress interference. Guided by this analysis, we introduce Muir, which fuses all gates into a sensitivity-allocated low-rank projection, re-weights state rows with a matched-filter readout gate, and reinvests the saved parameters in a wider feed-forward network. Because standard chunkwise algorithms become numerically unstable at the large chunk sizes needed to saturate wide matrix units, we design a parallel update for stable, efficient training. Across 166M-1.34B parameters, Muir lowers perplexity by 1.8-2.0% over GDN-2 and 2.5-3.6% over Transformer, raises commonsense accuracy by up to 1.9 points, and improves extractive recall over GDN-2. At 1.34B, Muir outperforms both baselines on multi-hop and multi-needle recall, extrapolates 2,560x from its 4K training length to 10M-token streams without perplexity drift, and maintains near-100% passkey retrieval to 1M tokens with static readout. Muir achieves these gains while matching GDN-2 throughput, reaching its 100B-token validation loss 1.2x faster, and training 2.7x faster than Transformer at 32K.

阅读原文

参与讨论