← All entries
Paper2023#548

ResiDual: Transformer with Dual Residual Connections

Summary

PPLN keeps a Post-LN path (diverse hidden states) plus a Pre-LN dual residual (lower-bounded gradients). Theory: Post-LN grads decay ~O((1/2)^{(N-k)/2}); Pre-LN |Δh|~O(1/√k) collapse; ResiDual inherits the better of each. IWSLT-14 E6D6 BLEU 35.63 vs Post-LN 35.37 / Pre-LN 35.12; E12D12 36.09 vs Pre-LN 35.18 (Post-LN fails). WMT DE→EN E18D18 27.65 vs Pre-LN 26.57 / B2T 27.30. OPUS-100 E18D18 ALL 31.0 vs Pre-LN 30.3, matching a 100-layer DeepNet 31.1. Trains without LR warmup on IWSLT. Code https://github.com/microsoft/ResiDual.

Venue
arXiv / Microsoft Research / Microsoft Azure Translation / Renmin University of China
Purpose
Fuse Pre-LN and Post-LN residuals so deep Transformers avoid both gradient vanishing and representation collapse
Scale
IWSLT-14 EN→DE 140k (E6D6/E12D12); WMT DE→EN 1.4M (E6D6/E18D18); OPUS-100 ~55M pairs / 100 langs (E18D18). Fairseq Adam, inverse-sqrt, 4000 warmup unless ablated
Time period
2023-04-28 (arXiv 2304.14802 v1). HF has no paper page (API 404).
Added
Oct 1, 2026
Research status
done

From the source

Published
Apr 28, 2023
arXiv categories
cs.CL, cs.AI, cs.LG, cs.NE
Citations
48 (2 influential)
References
44
Published in
Artificial Intelligence

Fetched Oct 3, 2026 from arXiv, Semantic Scholar. These numbers change; the curated fields above do not come from here.

Abstract (from arXiv)

Transformer networks have become the preferred architecture for many tasks due to their state-of-the-art performance. However, the optimal way to implement residual connections in Transformer, which are essential for effective training, is still debated. Two widely used variants are the Post-Layer-Normalization (Post-LN) and Pre-Layer-Normalization (Pre-LN) Transformers, which apply layer normalization after each residual block's output or before each residual block's input, respectively. While both variants enjoy their advantages, they also suffer from severe limitations: Post-LN causes gradient vanishing issue that hinders training deep Transformers, and Pre-LN causes representation collapse issue that limits model capacity. In this paper, we propose ResiDual, a novel Transformer architecture with Pre-Post-LN (PPLN), which fuses the connections in Post-LN and Pre-LN together and inherits their advantages while avoids their limitations. We conduct both theoretical analyses and empirical experiments to verify the effectiveness of ResiDual. Theoretically, we prove that ResiDual has a lower bound on the gradient to avoid the vanishing issue due to the residual connection from Pre-LN. Moreover, ResiDual also has diverse model representations to avoid the collapse issue due to the residual connection from Post-LN. Empirically, ResiDual outperforms both Post-LN and Pre-LN on several machine translation benchmarks across different network depths and data sizes. Thanks to the good theoretical and empirical performance, ResiDual Transformer can serve as a foundation architecture for different AI models (e.g., large language models). Our code is available at https://github.com/microsoft/ResiDual.

Tags

residualpre-lnpost-lnpplnmachine-translationmicrosoftfairseq

Topics

Transformer architecture, residual connections, layer normalization

Research notes

  • Primary: arxiv abs (cs.CL; also cs.AI, cs.LG, cs.NE). License not stated on abs/HTML at check. Correspondence Xu Tan xuta@microsoft.com and Rui Yan ruiyan@ruc.edu.cn. Microsoft Research / Azure Translation / Renmin University. Code https://github.com/microsoft/ResiDual (98 stars at check; MIT; archived). HF has no paper page (API 404). Discord posted PDF. Uses public IWSLT/WMT/OPUS; no new corpus, so no datasets_local row. License field left blank per catalog convention.

Similar entries