pith. sign in

arxiv: 2304.14802 · v1 · pith:UFT3YNF6new · submitted 2023-04-28 · 💻 cs.CL · cs.AI· cs.LG· cs.NE

ResiDual: Transformer with Dual Residual Connections

classification 💻 cs.CL cs.AIcs.LGcs.NE
keywords residualpost-lnpre-lntransformerissuearchitectureconnectionsadvantages
0
0 comments X
read the original abstract

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.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 7 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Transformers Provably Learn to Internalize Chain-of-Thought

    cs.LG 2026-05 unverdicted novelty 8.0

    L-layer transformers under Log-ICoT curriculum provably learn k-parity with poly(n) samples and log k stages, matching explicit CoT efficiency without inference overhead.

  2. Depth-Attention: Cross-Layer Value Mixing for Language Models

    cs.CL 2026-06 unverdicted novelty 7.0

    Depth-Attention mixes values from earlier layers into the current attention value by having the query attend to previous-layer keys at the same position, yielding lower perplexity and up to 2.3 points higher average a...

  3. Neural posterior estimation of the neutrino direction in IceCube using transformer-encoded normalizing flows on the sphere

    hep-ex 2026-04 unverdicted novelty 7.0

    A transformer-encoded spherical normalizing flow achieves state-of-the-art angular resolution for IceCube neutrino tracks and showers, improving median resolution by factors of 1.3-2.5 over B-spline likelihoods at 100...

  4. AOT-POT: Adaptive Operator Transformation for Large-Scale PDE Pre-training

    cs.LG 2026-05 unverdicted novelty 6.0

    AOT-POT adaptively reshapes complex PDE solution operators via input-dependent transformations and parallel stream mixing to enable effective large-scale pre-training, yielding SOTA results on 12 benchmarks with minim...

  5. SiameseNorm: Breaking the Barrier to Reconciling Pre/Post-Norm

    cs.LG 2026-02 unverdicted novelty 6.0

    SiameseNorm is a two-stream architecture that reconciles Pre-Norm and Post-Norm in Transformers by coupling streams via shared residual blocks, yielding performance gains with maintained stability on language, vision,...

  6. Analyzing Stream Collapse in Hyper-Connections: From Diagnosis to Mitigation

    cs.LG 2026-06 unverdicted novelty 5.0

    Hyper-Connections models show stream collapse to a dominant stream with near-identity residual mixing after seeding; symmetry-breaking initialization mitigates dominance and raises performance.

  7. Understanding the Prompt Sensitivity

    cs.CL 2026-04 unverdicted novelty 5.0

    LLMs disperse meaning-preserving prompts internally instead of clustering them, which produces an excessively high upper bound on output log-probability differences via Taylor expansion and Cauchy-Schwarz.