多流注意力残差
研究论文 · 2026/10/13
注意力残差(AttnRes)沿网络深度轴实现基于内容的检索,可视为单流深度方向的softmax注意力。受序列轴上多头注意力成功的启发,我们提出多流注意力残差(MSAR),将这一机制推广到多头深度注意力,以极小的额外开销带来显著性能提升。MSAR通过多尺度因果卷积从序列上下文中获取流多样性,使不同头能够通过不同的上下文视角检索历史表示,同时保持隐藏表示的完整性。检索到的流通过轻量级自适应混合组合,生成单流层输入。通过保留单流源并按需扩展,MSAR支持多流计算,无需持久的多流存储或通信。在18B和28B MoE规模的全部12个下游基准上,MSAR持续优于先前的残差变体,包括标准残差连接、流形约束超连接(mHC)和AttnRes。缩放律实验显示,相比标准残差基线,MSAR实现了1.58倍的等损失计算加速,而AttnRes为1.35倍,mHC为1.30倍。这些结果使MSAR成为大规模预训练中一个有前景的残差架构。
该工作提出了一种可显著提升大规模预训练效率的残差架构,在多个基准和缩放律实验中均优于现有方法,且额外开销极小,具有较高的实用价值。
Attention Residuals (AttnRes) enables content-dependent retrieval over network depth, which can be viewed as single-stream softmax attention along the depth axis. Inspired by the success of multi-head attention along the sequence axis, we introduce Multi-Stream Attention Residuals (MSAR), an extension of AttnRes that generalizes this mechanism to multi-head depth attention, yielding substantial performance gains with minimal additional overhead. MSAR draws stream diversity from sequence context through multi-scale causal convolutions, allowing different heads to retrieve historical representations through distinct contextual views while preserving the integrity of the hidden representation. The retrieved streams are combined through lightweight adaptive mixing to generate the single-stream layer input. By retaining single-stream sources and expanding them on demand, MSAR supports multi-stream computation without requiring persistent multi-stream storage or communication. Across all 12 downstream benchmarks at the 18B and 28B MoE scales, MSAR consistently outperforms prior residual variants, including standard residual connections, manifold-constrained Hyper-Connections (mHC), and AttnRes. Scaling-law experiments yield an iso-loss compute speedup of 1.58times over the standard residual baseline, compared with 1.35times for AttnRes and 1.30times for mHC. These results make MSAR a promising residual architecture for large-scale pre-training.