arXiv(opens in a new tab)cs.CLOct 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2610.13630

Multi-Stream Attention Residuals

Xiaohan Qin, Xiangdong Zhang, Tuo Dai, Sunan Zou, Huaijin Wu, Yebin Yang, Zhuo Xia, Lin Yao, Yuliang Liu, Junchi Yan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Xiaohan Qin1,2,3^{1,2,3}, Xiangdong Zhang1,3^{1,3}, Tuo Dai3^{3}, Sunan Zou3,4^{3,4}, Huaijin Wu1,3^{1,3}, Yebin Yang1,3^{1,3}, Zhuo Xia1,3^{1,3}, Lin Yao3^{3}, Yuliang Liu5^{5}, Junchi Yan1,†^{1,\dagger}

1^{1}School of AI, Shanghai Jiao Tong University 2^{2}Shanghai Innovation Institute

3^{3}Dots Studio, Xiaohongshu Inc. 4^{4}School of CS, Peking University

5^{5}Independent Researcher

Project page: https://github.com/jianke0604/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×1.58\times over the standard residual baseline, compared with 1.35×1.35\times for AttnRes and 1.30×1.30\times for mHC. These results make MSAR a promising residual architecture for large-scale pre-training.

1. Introduction

Scaling depth has been a primary lever for improving Transformer-based large language models (LLMs) [22, 34, 41]. In modern PreNorm architectures [40], however, adding layers does not always yield the expected gains [13, 24]. The residual stream [14] aggregates preceding computations through a single hidden-state trajectory with fixed additive updates; as the stack grows deeper, features formed in early layers can be progressively diluted and become difficult for later layers to retrieve. This depth-wise information dilution limits the effective use of additional layers, making depth scaling less efficient than its representational capacity would suggest [6, 32, 35]. Motivated by this, recent work has begun to challenge the standard residual connection design itself. Representatively, Hyper-Connections (HC), together with its manifold-constrained variant mHC, expands the single residual stream into multiple parallel streams with learned stream mixing [39, 50], while Attention Residuals (AttnRes) replaces fixed residual accumulation with learned depth-wise softmax retrieval over earlier representations [35]. From

†^{\dagger}Corresponding author. Contact: {galaxy-1,yanjunchi}@sjtu.edu.cn

Figure

(a) Training loss.

Figure

(b) Average downstream score.

Figure

(c) Per-benchmark performance.

Figure 1 | MSAR improves optimization and downstream performance at 18B scale. MSAR achieves lower training loss and higher average downstream score than baseline residual variants.

the time-depth duality perspective of AttnRes [35, 45], these methods can be viewed as attention-like mechanisms along the depth axis: HC-family methods maintain a mixed multi-stream state, resembling recurrent, linear-attention-style depth memory, whereas AttnRes instantiates single-head depth-wise softmax attention.

Inspired by the success of multi-head attention along the sequence axis [36], a natural question emerges: can we realize multi-head depth attention, bringing greater expressiveness to residual retrieval over depth? However, previous attempts indicate that achieving this goal is non-trivial. AttnRes already tried channel-splitting the hidden state to form multi-head depth aggregation, which instead degraded performance [35]: in depth-wise attention the retrieved value is essentially the hidden state itself and should be treated as a coherent whole, so slicing it into low-dimensional fragments breaks this integrity. Another intuitive route is to derive several candidate streams from a single layer output using the Hpost\mathcal{H}^{post}-style write-back of (m)HC, and then treat them as depth-attention heads. This keeps each candidate full-dimensional, but the candidates are effectively scalar reweightings of the same vector; normalization largely removes these magnitude differences, yielding nearly identical keys and limiting the diversity of source representations across heads. Taken together, these observations point to a central design challenge: how to construct diverse depth-attention heads from a single layer output without compromising its integrity.

We therefore propose Multi-Stream Attention Residuals (MSAR), a low-cost extension of AttnRes that couples contextual stream expansion with depth-wise retrieval to address this challenge. Starting from a single residual source, MSAR draws diversity from the sequence axis: it applies a small set of multi-scale causal depthwise convolutions to the layer output, producing m full-dimensional streams whose receptive fields encode different local-context scales. These streams serve as distinct source views for depth attention, so each stream can perform its own softmax retrieval over depth instead of sharing one depth distribution. The m retrieved states are then fused by a lightweight Hpre\mathcal{H}^{pre}-style mixer into the input of the target layer. In this way, MSAR turns residual retrieval into a multi-head depth-attention primitive: different heads can select different depth histories through distinct sequence-context views while preserving the integrity of the hidden representation.

At the system level, MSAR is fully compatible with AttnRes block mode, cache-based pipeline communication, and the two-phase computation strategy. In our 28B MoE setting, MSAR increases training FLOPs by only 0.5% and activated parameters by 0.3%. Notably, during the forward pass, all streams are deterministically generated from the main residual state through causal depthwise convolutions, allowing MSAR to keep only the main stream in memory and expand it on demand when computing depth attention. The convolution-expanded source streams are intermediate values used only by depth attention and are immediately consumed by the following attention computation; in practice, this allows stream expansion and consumption to be handled by a fused kernel, avoiding write-back of these m intermediate streams. The same principle applies in block mode: each block accumulates layer outputs into a single-stream summary, and the m streams are recomputed from these summaries when they are consumed by depth attention. With this design, for N stored sources, MSAR reduces pipeline communication and prefill activation storage from O(mNd)O(mNd) to O(Nd)O(Nd), matching the storage cost of AttnRes. Compared with AttnRes, the remaining overhead mainly comes from the memory access needed to write the retrieved multi-stream outputs and aggregate these streams.

Empirically, MSAR consistently improves both training loss and downstream performance in large-scale pre-training. As summarized in Figure 1, in our 18B MoE setting, MSAR achieves the lowest final training loss, reaching 1.750 compared with Vanilla (1.799), mHC (1.776), and AttnRes (1.769). This training-loss gain consistently translates into higher average downstream scores throughout training across representative benchmarks covering knowledge, reasoning, math, and code. Scaling-law experiments further confirm that MSAR reaches the same loss with substantially less compute: relative to the Vanilla baseline, MSAR achieves an iso-loss compute speedup of 1.58×, compared with 1.35× for AttnRes and 1.30× for mHC. These results suggest that enriching depth-wise residual retrieval with multi-stream sequence-context views is an effective route for improving depth scaling. Our contributions can be summarized as follows:

1). Multi-Stream Attention Residuals. We introduce MSAR, which generalizes AttnRes from single-stream residual retrieval to multi-head depth attention. MSAR uses low-cost multi-scale causal depthwise convolutions to construct multiple streams, performs per-stream depth attention, and aggregates the retrieved streams with lightweight scalar mixing. This yields stream diversity without breaking the full-dimensional coherence of the hidden representation.

2). Efficient design. MSAR stores only single-stream summaries and expands multi-stream representations on demand, reducing pipeline communication and prefill activation storage from O(mNd)O(mNd) to O(Nd)O(Nd) and matching the storage cost of AttnRes. It remains fully compatible with AttnRes's cross-stage caching and two-phase inference strategy, with only minimal training FLOPs and parameter overhead.

3). Large-scale validation. We validate MSAR in large-scale pre-training, where it delivers significant and consistent downstream gains in both 18B and 28B MoE settings. Scaling-law experiments and ablation studies further verify the effectiveness of the design, showing that the gains come from the proposed inductive bias rather than from a model-size-specific artifact.

References (46)