Abstract
Deep Transformer architectures often face a trade-off between the high performance of Post-Layer Normalization (Post-LN) and the training stability of Pre-Layer Normalization (Pre-LN). This paper introduces the Bottom-to-Top (B2T) connection, a simple architectural modification that provides the gradient stability of Pre-LN while retaining the superior representational power of Post-LN. This innovation enables the successful training of models with over 100 layers, achieving state-of-the-art results across translation, summarization, and speech recognition tasks.
Introduction: The LN Placement Dilemma
In Transformer models, the placement of Layer Normalization (LN) significantly impacts training dynamics. The original Post-LN design places LN after the residual addition. While effective for shallow models, it causes gradients to vanish during backpropagation in deeper architectures (typically 10+ layers), often leading to training failure.
To address this, Pre-LN was introduced, placing LN before the sub-layers. This ensures stable training even for very deep models. However, Pre-LN comes with a "performance tax": because the input can easily bypass transformations via the residual connection, higher layers tend to perform identity-like operations, resulting in lower final accuracy compared to a successfully trained Post-LN model.
The Bottom-to-Top (B2T) Connection
The authors propose the Bottom-to-Top (B2T) connection to bridge this gap. B2T adds an extra residual path that skips internal layer normalizations within a block while maintaining the final normalization.
Mathematically, the B2T connection ties the layer input directly to the output of the Feed-Forward Network (FFN). This creates a "highway" for gradients that bypasses the internal LN layers, preventing the vanishing gradient problem. Crucially, the final LN is preserved at the end of the layer to maintain the "Post-LN" style of transformation, which is key to its superior representational power.
Gradient Stability and Representational Power
Empirical analysis confirms that LN steps in Post-LN are the specific points where gradient norms drop exponentially. By providing a bypass, B2T maintains healthy gradient norms throughout the network, similar to or better than Pre-LN.
Furthermore, while Pre-LN models often fall into an "identity trap"—where shallow and deep layers produce very similar outputs—B2T forces the model to perform more significant transformations at each layer. This "un-isolates" the residual connection, providing a clean path for gradients while ensuring each layer contributes meaningfully to the model's intelligence.
Experimental Results
The B2T connection consistently outperformed both Pre-LN and vanilla Post-LN across multiple domains:
- Deep Machine Translation: In an 18-layer setup where vanilla Post-LN failed to train, B2T achieved 27.30 BLEU, significantly beating Pre-LN’s 26.57.
- Extreme Scaling: The authors successfully trained a 100-layer encoder-decoder model. B2T reached 28.00 BLEU, while Pre-LN trailed at 27.29.
- Abstractive Summarization: B2T achieved the highest ROUGE-1 score (39.61) in deep configurations, outperforming other specialized stability methods like Admin and DeepNet.
- Efficiency: Unlike some alternative stability methods, B2T requires no additional initialization steps or significant computational overhead, making it highly practical for large-scale deployment.
Conclusion
The B2T connection offers a robust solution to the fundamental architectural dilemma in deep Transformers. By combining the stability of Pre-LN with the performance of Post-LN, it paves the way for deeper, more powerful models without the need for complex training tricks. Future research will focus on further improving the energy efficiency of these massive models while maintaining their performance gains.
Summary updated