Multi-Stream Attention Residuals

AK's Picks LLM PTSAD ML TAVR RN
注意力残差(AttnRes)支持在模型深度方向上进行内容依赖的特征检索,可视为沿深度轴执行的单流 Softmax 注意力机制。受序列轴上多头注意力机制成功经验的启发,我们提出了多流注意力残差(MSAR),它是 AttnRes 的扩展形式,将该机制推广至深度维度上的多头注意力,从而在几乎不增加额外开销的前提下,显著提升模型性能。MSAR 通过多尺度因果卷积,从序列上下文中提取各流的多样性,使得不同注意力头能够基于差异化的上下文视角检索历史隐状态表示,同时完整保留隐表示的结构完整性。所检索到的多个特征流,再经由轻量级自适应混合机制融合,生成单一流形式的层输入。MSAR 在维持单流数据源的基础上,按需动态扩展为多流计算,因而无需持久化保存多流状态,也无需引入多流间的通信开销。在全部 12 个下游任务基准上,无论模型规模为 180 亿参数还是 280 亿参数的 MoE 架构,MSAR 均持续优于以往各类残差变体,包括标准残差连接、流形约束的超连接(mHC)以及 AttnRes。在缩放律实验中,MSAR 相较于标准残差基线实现了 1.58 倍的等损失计算效率提升;而 AttnRes 和 mHC 对应的提升分别为 1.35 倍和 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.58\times$ over the standard residual baseline, compared with $1.35\times$ for AttnRes and $1.30\times$ for mHC. These results make MSAR a promising residual architecture for large-scale pre-training.
许愿