Skip to main content
QUICK REVIEW

[Paper Review] Rethinking Skip Connection with Layer Normalization in Transformers and ResNets

Fenglin Liu, Xuancheng Ren|arXiv (Cornell University)|May 15, 2021
Advanced Neural Network ApplicationsComputer Science25 references13 citations
TL;DR

This paper proposes Recursive Skip Connection with Layer Normalization (2rSkip+LN), a novel residual block design that recursively applies layer normalization to amplified skip connections, stabilizing training and improving optimization in deep networks. The method achieves consistent performance gains—up to 1.02 absolute error reduction on CIFAR-100 and over 1 BLEU point improvement on machine translation—across ResNets and Transformers, demonstrating superior generalization and robustness over standard skip connections.

ABSTRACT

Skip connection, is a widely-used technique to improve the performance and the convergence of deep neural networks, which is believed to relieve the difficulty in optimization due to non-linearity by propagating a linear component through the neural network layers. However, from another point of view, it can also be seen as a modulating mechanism between the input and the output, with the input scaled by a pre-defined value one. In this work, we investigate how the scale factors in the effectiveness of the skip connection and reveal that a trivial adjustment of the scale will lead to spurious gradient exploding or vanishing in line with the deepness of the models, which could be addressed by normalization, in particular, layer normalization, which induces consistent improvements over the plain skip connection. Inspired by the findings, we further propose to adaptively adjust the scale of the input by recursively applying skip connection with layer normalization, which promotes the performance substantially and generalizes well across diverse tasks including both machine translation and image classification datasets.

Motivation & Objective

  • To investigate the impact of scale factors in skip connections on gradient stability and optimization in deep networks.
  • To explore whether layer normalization can mitigate gradient explosion/vanishing issues caused by non-identity scaling in skip connections.
  • To design a novel skip connection mechanism that combines adaptive scaling and layer normalization for improved training stability and performance.
  • To evaluate the proposed architecture across diverse tasks, including image classification and machine translation, to assess generalization and scalability.
  • To determine whether fixed or learnable scaling factors yield optimal performance in residual blocks with layer normalization.

Proposed method

  • Proposes Expanded Skip Connection with Layer Normalization, where the skip input is scaled by λ > 1 and normalized via layer normalization to stabilize gradients.
  • Introduces Recursive Skip Connection with Layer Normalization (2rSkip+LN), which recursively applies layer normalization to a scaled skip connection, enabling stable gradient flow through deeper blocks.
  • The architecture is formulated as y = LN(λ·x + F(x, W)), where the skip term is recursively processed through layer normalization to maintain gradient stability.
  • Employs layer normalization instead of batch normalization to better handle variable-length sequences and improve generalization in both CNNs and Transformers.
  • Validates the method using ablation studies and comparisons on ResNet and Transformer architectures across CIFAR-100 and WMT translation datasets.
  • Uses a fixed λ = 2 in the recursive variant, with ablation showing that higher scaling improves performance when combined with normalization.

Experimental results

Research questions

  • RQ1Does scaling the skip connection with λ ≠ 1 lead to gradient instability in deep networks, and can layer normalization mitigate this?
  • RQ2How does the combination of layer normalization and scaled skip connections affect optimization and convergence in residual networks?
  • RQ3Can a recursive application of layer normalization to the scaled skip connection improve training stability and model performance?
  • RQ4Is the proposed 2rSkip+LN architecture generalizable across different architectures (ResNets, Transformers) and tasks (image classification, machine translation)?
  • RQ5What is the optimal scale factor λ for skip connections when combined with layer normalization, and does it vary with model depth or dataset complexity?

Key findings

  • The proposed 2rSkip+LN method achieves a 1.02 absolute error rate reduction on CIFAR-100 using ResNet-110, demonstrating significant gains on deeper models.
  • On machine translation, the method improves Transformer-Base by 1.2 BLEU on EN-VI, 0.7 on EN-DE, and 0.8 on EN-FR, outperforming larger models with fewer parameters.
  • The method consistently improves performance across all model depths on CIFAR-100, with larger gains observed in deeper networks, indicating better optimization of deep representations.
  • The improvement is consistent across both image classification (ResNet) and sequence modeling (Transformer), confirming the method’s generalization across architectures and tasks.
  • Layer normalization is more effective than batch normalization in stabilizing gradients when skip connections are scaled, especially in deeper models.
  • Ablation studies confirm that scaling the skip connection alone leads to optimization issues, while layer normalization alone is insufficient—only their recursive combination ensures stable and effective training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.