Skip to main content
QUICK REVIEW

[Paper Review] Improving Deep Transformer with Depth-Scaled Initialization and Merged Attention

Biao Zhang, Ivan Titov|arXiv (Cornell University)|Aug 29, 2019
Natural Language Processing TechniquesComputer Science35 references5 citations
TL;DR

This paper proposes depth-scaled initialization (DS-Init) and a merged attention sublayer (MAtt) to improve training stability and efficiency in deep Transformer models. DS-Init reduces gradient vanishing by scaling initial parameter variance with layer depth, while MAtt combines average-based self-attention and encoder-decoder attention for parallel computation. The method achieves +1.1 BLEU on average across five translation tasks with 12-layer models, matching baseline decoding speed despite deeper architecture.

ABSTRACT

The general trend in NLP is towards increasing model capacity and performance via deeper neural networks. However, simply stacking more layers of the popular Transformer architecture for machine translation results in poor convergence and high computational overhead. Our empirical analysis suggests that convergence is poor due to gradient vanishing caused by the interaction between residual connections and layer normalization. We propose depth-scaled initialization (DS-Init), which decreases parameter variance at the initialization stage, and reduces output variance of residual connections so as to ease gradient back-propagation through normalization layers. To address computational cost, we propose a merged attention sublayer (MAtt) which combines a simplified averagebased self-attention sublayer and the encoderdecoder attention sublayer on the decoder side. Results on WMT and IWSLT translation tasks with five translation directions show that deep Transformers with DS-Init and MAtt can substantially outperform their base counterpart in terms of BLEU (+1.1 BLEU on average for 12-layer models), while matching the decoding speed of the baseline model thanks to the efficiency improvements of MAtt.

Motivation & Objective

  • To address poor convergence in deep Transformer models due to gradient vanishing during training.
  • To reduce computational overhead in deep Transformers without sacrificing model performance.
  • To improve training stability and efficiency through architectural and initialization modifications.
  • To enable deeper Transformer architectures to outperform standard 6-layer models in translation tasks.
  • To maintain decoding speed while increasing model depth and performance.

Proposed method

  • Depth-scaled initialization (DS-Init) scales the variance of layer parameters at initialization by a factor of $1/\sqrt{l}$, where $l$ is the layer depth, to reduce output variance of residual connections.
  • The merged attention sublayer (MAtt) combines a simplified average-based self-attention mechanism with the standard encoder-decoder attention into a single sublayer for parallel computation.
  • The simplified average-based attention reduces the number of linear transformations, lowering parameter count and computational cost.
  • The method preserves the residual connection and layer normalization structure but stabilizes gradient flow through variance control at initialization.
  • Experiments use Adam optimizer with standard training schedules, and the model is evaluated on WMT and IWSLT translation benchmarks.
  • Training is conducted with increased dropout rates (dp_a=0.3, dp_r=0.5) on low-resource tasks like IWSLT14 De-En.

Experimental results

Research questions

  • RQ1Why do deep Transformers fail to converge despite increasing model depth?
  • RQ2How does the interaction between residual connections and layer normalization contribute to gradient vanishing?
  • RQ3Can gradient vanishing be mitigated through initialization alone without architectural changes?
  • RQ4Can computational cost be reduced in deep Transformers without sacrificing performance or speed?
  • RQ5Does merging attention sublayers improve training efficiency and model quality in sequence-to-sequence tasks?

Key findings

  • Deep Transformers with DS-Init and MAtt achieve an average BLEU improvement of +1.1 across five translation tasks using 12-layer models.
  • The model outperforms the base 6-layer Transformer on all evaluated WMT and IWSLT tasks, with gains exceeding 1.0 BLEU on most directions.
  • On WMT18 Zh-En, the model achieves a +1.58 BLEU improvement over the transparent model (Bapna et al., 2018), a strong baseline for deep encoders.
  • The model matches the decoding speed of the baseline despite a 50%+ increase in training time, due to the efficiency of MAtt.
  • On the IWSLT14 De-En task, the model achieves a 0.6-point improvement in chrF score, indicating better subword-level alignment.
  • Gradient norm analysis shows that DS-Init stabilizes training dynamics, reducing vanishing gradients in both encoder and decoder layers, especially in early training steps.

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.