[论文解读] Routing Absorption in Sparse Attention: Why Random Gates Are Hard to Beat
端到端训练每个查询的稀疏注意门控在很大程度上无效,因为 Q/K/V 会共同适应以吸收门控信号;事后蒸馏或解耦训练可以在接近密集的性能下实现,而随机路由往往能达到与学习路由相同的效果。
Can a transformer learn which attention entries matter during training? In principle, yes: attention distributions are highly concentrated, and a small gate network can identify the important entries post-hoc with near-perfect accuracy. In practice, barely. When sparse attention is trained end-to-end, the model's Q/K/V projections co-adapt to whatever mask is imposed, absorbing the routing signal until learned gates perform little better than frozen random gates. We call this routing absorption and present four independent lines of evidence for it in a controlled 31M-parameter transformer: (1) differentiable soft gating converges to nearly the same perplexity whether the gate is learned or random (48.73 +/- 0.60 vs. 49.83 +/- 0.04 over 3 seeds); (2) hard top-k gating receives exactly zero gradient through the mask; (3) a gate distilled onto co-adapted Q/K/V achieves high F1 against oracle masks but catastrophic perplexity when deployed (601.6 vs. 48.6 on mask-agnostic Q/K/V); and (4) stochastic mask randomization during training fails to prevent co-adaptation (78.2 ppl deployed dense vs. 37.3 baseline). We connect routing absorption to the same phenomenon in Mixture-of-Experts, where random routing matches learned routing because experts co-adapt to any router, but show that attention exhibits a structurally more severe form: shared Q/K/V parameters enable cross-layer compensation pathways absent in MoE, where experts are self-contained modules. The implication is that end-to-end sparse attention methods employing per-query token-level gating face absorption pressure proportional to the parameter asymmetry between the gate and the model, and that post-hoc approaches, which decouple representation learning from sparsification, sidestep this entirely.
研究动机与目标
- 证明端到端训练每个查询的稀疏注意门控在路由收益方面几乎无效,原因是被 Q/K/V 吸收
- 在不同训练模式下量化门学习与随机或 oracle 掩码的比较
- 展示将路由与表征学习解耦能够实现有效的稀疏注意
- 将注意力中的吸收与专家混合(MoE)中的类似现象联系起来,并讨论对稀疏注意方法的实际影响
提出的方法
- 在 WikiText-103 上训练一个6层、256维、4头的 Transformer(约3100万参数),对稀疏度 k=64 使用可微分的软门控
- 在多种随机种子下,将端到端学习的门控与冻结的随机门控进行比较
- 进行硬 top-k 门控以验证掩码的梯度流
- 对密集和共适配的 Q/K/V 检查点进行门控蒸馏以测试部署行为
- 评估随机掩码训练以测试防止共适配
- 进行放大测试(Qwen3-1.7B)以及有限的单层/少层吸收实验以评估对扩展的鲁棒性

实验结果
研究问题
- RQ1端到端训练的逐查询门控机制是否相较于随机或 oracle 掩码提高了路由性能?
- RQ2门控 through 的梯度信号是否足以克服 Q/K/V 与门控之间的共适配?
- RQ3解耦(事后)路由学习是否能恢复接近密集的性能,为什么会成功?
- RQ4规模放大是否会强化吸收及共适配的强度?
- RQ5对于依赖于学习路由的现有稀疏注意和MoE方法有哪些现实意义?
主要发现
- 端到端的软门控带来的困惑度几乎与冻结的随机门控相同(48.73±0.60 对比 49.83±0.04;密集为 37.32),表明大部分路由收益被 Q/K/V 的共适配吸收
- 硬 top-k 门控在掩码上没有梯度流,当梯度不存在时性能几乎与学习门控相同
- 蒸馏到共适配的 Q/K/V 的门控在部署性能上崩溃(601.6)相对密集(48.6),尽管对 oracle 掩码的 F1 很高,显示出对掩码的强烈共适配
- 在训练中进行随机化的随机掩码并不能防止吸收,且会降低表征质量(部署密集为 78.2 ppl 对比 基线 37.3)
- 事后蒸馏(解耦路由)在远少于门控训练步数的情况下即可实现接近密集的性能(例如,k=64 使用 KL 蒸馏的 1,000 步或 128–256 的步数)"不同于长时间的端到端训练"
- 吸收随规模增强:在 Qwen3-1.7B 时,oracle 困惑度在 k=64 下比密集仅低 0.4%,但端到端路由在共适配下仍然脆弱;参数不对称(门控与模型)驱动该效应

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。