MSAR Cuts Transformer Training Compute by 37% With Smarter Residual Connections
A new residual connection design borrows the multi-head trick from attention and applies it along network depth, delivering 1.58x compute speedup over standard residuals at MoE scale.
Takeaways
- MSAR extends Attention Residuals to multi-head depth attention, improving residual connections for Transformers.
- Reports 1.58x iso-loss compute speedup vs vanilla residuals, beating AttnRes (1.35x) and mHC (1.30x).
- Outperforms all baselines on 12 downstream benchmarks at 18B and 28B MoE scales.
- Uses multi-scale causal convolutions to generate stream diversity from sequence context on demand.
- Keeps single-stream storage and communication, expanding to multi-head only during depth attention.
- Full paper and method details available on arXiv.
Residual connections in most PreNorm Transformers carry each block’s output forward through repeated addition. The MSAR paper replaces that accumulation with multi-head attention over earlier layer outputs. Across 18B and 28B Mixture-of-Experts experiments, the authors report a 1.58x iso-loss compute speedup over standard residuals.
That ratio corresponds to roughly 37% less training compute to reach the same modeled loss under the paper’s scaling-law fits. Wall-clock throughput, memory use, kernel efficiency, and end-to-end training cost require separate measurement.
Why addition blurs depth
A PreNorm Transformer block typically follows an update such as xl+1 = xl + Fl(LN(xl)). After many layers, xl contains an unweighted sum of earlier contributions. The number of terms grows linearly with depth, and each earlier output becomes a smaller part of the aggregate presented to later blocks.
Later layers can transform the accumulated state, but they cannot selectively retrieve an earlier layer output after standard addition has merged it into the stream. This limits depth-wise routing: every block receives the same aggregate history regardless of which earlier representations would be most useful.
Attention Residuals, or AttnRes, introduced a learned softmax distribution over preceding layer outputs. Each layer can assign more weight to useful depths, including the original token embedding. The authors describe this correspondence as time-depth duality. Sequence attention retrieves selected positions from token history; depth attention retrieves selected representations from layer history.
The failed multi-head attempt
AttnRes uses a single pseudo-query per layer, making its depth retrieval analogous to single-head attention. Earlier experiments divided that operation into multiple heads, but performance declined. Those results suggested that channel groups were learning similar depth mixtures and gaining little from separate heads.
MSAR gives each head a distinct contextual view of the token sequence before it attends over depth. The resulting diversity comes from sequence context, allowing heads to specialize without maintaining several full residual streams between layers.
One stream, expanded on demand
MSAR applies multi-scale causal depthwise convolutions along the sequence axis to create temporary head-specific views. “Depthwise” means that each channel is filtered independently. “Causal” means that the representation at token position t uses only position t and earlier tokens, preserving autoregressive training.
| Stage | Operation | Purpose |
|---|---|---|
| Context expansion | Multi-scale causal convolutions create head-specific sequence views. | Give each depth-attention head a different retrieval signal. |
| Depth retrieval | Each head computes softmax weights over earlier layer outputs. | Select useful representations from the model’s depth history. |
| Adaptive merge | The retrieved representations are combined into one layer input. | Return to a single hidden stream. |
| Layer handoff | One stream passes to the next attention or MLP block. | Limit persistent stream width and cross-device communication. |
The model performs this retrieval at pre-attention and pre-MLP sites. Its temporary head-specific streams exist only during the depth-attention operation, while the representation passed between blocks remains single-stream.
The single-stream layout reduces the persistent memory and communication costs associated with multi-stream methods such as manifold-constrained Hyper-Connections. MSAR still adds depthwise convolutions, softmax retrieval, adaptive mixing, and access to earlier layer outputs. Implementations therefore need to measure activation storage, distributed communication, decoding state, and kernel-launch overhead.
Read the 1.58x carefully
The paper evaluates 18B and 28B Mixture-of-Experts models and reports higher scores for MSAR across all 12 downstream benchmarks tested. Its scaling-law comparison includes standard residuals, manifold-constrained Hyper-Connections, AttnRes, and MSAR.
Iso-loss speedup is calculated as the compute required by standard residuals divided by the compute required by the compared architecture at the same target loss. A 1.58x ratio implies that MSAR uses about 1 / 1.58, or 63%, of the baseline compute under the fitted curves.
| Architecture | Speedup vs. standard residuals | Implied compute reduction |
|---|---|---|
| Standard residual | 1.00x | 0% |
| Hyper-Connections (mHC) | 1.30x | About 23% |
| AttnRes | 1.35x | About 26% |
| MSAR | 1.58x | About 37% |
Training-loss scaling fits produce these ratios. Actual elapsed time also depends on convolution kernels, operator fusion, hardware utilization, collective communication, and batch shape. The architectural changes remain concentrated in the residual path, leaving the Transformer’s self-attention, MLP, and optimizer structure intact.
Heads choose different histories
The paper visualizes depth-attention weights from a 10B Block MSAR model with four temporary streams across pre-attention and pre-MLP sites. The heads develop distinct preferences for earlier layers, and some continue to retrieve the token embedding deep into the network.
These patterns support the proposed mechanism: sequence-derived views lead heads to retrieve different historical representations. The persistent influence of token embeddings also matches earlier AttnRes observations, especially at pre-attention sites. Additional causal ablations would be needed to quantify how much each specialization contributes to the reported gains.
Adoption starts at pretraining
MSAR changes the model architecture from initialization, making new pretraining runs its clearest use case. The paper’s direct evidence covers large MoE models and scaling-law-length training, while several adjacent settings remain unvalidated.
| Use case | Current evidence | Reason |
|---|---|---|
| New large MoE pretraining | Directly supported | The reported 18B and 28B experiments cover this setting. |
| Deep, narrow model research | Relevant | AttnRes-family designs allow layers to retrieve selected depth history. |
| Existing checkpoint fine-tuning | Unvalidated | Changing the residual path requires checkpoint conversion and a retraining strategy. |
| Small or dense models | Unvalidated | The reported results do not establish the same scaling behavior in these regimes. |
| Latency-sensitive serving | Requires benchmarking | Causal convolutions and depth-history access introduce additional runtime state and operations. |
The cited preprint does not include an open-source implementation. A reimplementation must reproduce the convolution scales, depth-attention normalization, adaptive merge, pre-attention and pre-MLP insertion points, and distributed partitioning described in the method. Numerical stability and efficient access to earlier layer outputs will also affect practical results.
Questions before deployment
- Wall-clock efficiency: The reported iso-loss gain needs hardware-specific throughput and memory benchmarks.
- Inference cost: Decode latency, convolution state, and access to depth history need measurement under realistic serving loads.
- Model coverage: Dense Transformers, smaller models, and architectures outside the tested MoE range remain open cases.
- Scaling range: Longer runs and larger models would show whether the fitted advantage persists.
- Replication: Public code and independent experiments would clarify implementation sensitivity.
By generating head-specific residual views only during depth retrieval, MSAR combines selective access to earlier layers with a single inter-layer stream. The reported results make it a concrete candidate for new MoE pretraining projects, while adoption depends on reproducing the scaling gain under real kernels, distributed systems, and serving constraints.