[Paper Review] Deep Transformers with Latent Depth
This paper proposes a probabilistic framework for training deep Transformers by learning layer selection through posterior distributions, enabling stable training of networks up to 100 layers. It extends to multilingual translation, improving performance across diverse language pairs by dynamically selecting layers per language pair.
The Transformer model has achieved state-of-the-art performance in many sequence modeling tasks. However, how to leverage model capacity with large or variable depths is still an open challenge. We present a probabilistic framework to automatically learn which layer(s) to use by learning the posterior distributions of layer selection. As an extension of this framework, we propose a novel method to train one shared Transformer network for multilingual machine translation with different layer selection posteriors for each language pair. The proposed method alleviates the vanishing gradient issue and enables stable training of deep Transformers (e.g. 100 layers). We evaluate on WMT English-German machine translation and masked language modeling tasks, where our method outperforms existing approaches for training deeper Transformers. Experiments on multilingual machine translation demonstrate that this approach can effectively leverage increased model capacity and bring universal improvement for both many-to-one and one-to-many translation with diverse language pairs.
Motivation & Objective
- To address the challenge of training very deep Transformers (e.g., 100 layers) due to vanishing gradients and unstable optimization.
- To develop a method that automatically learns which layers to use per input, based on learned posterior distributions over layer selection.
- To enable a single shared Transformer to support multiple language pairs in multilingual translation with distinct layer selection strategies per pair.
- To improve model capacity utilization in sequence modeling tasks without increasing inference cost or compromising training stability.
Proposed method
- Introduces a probabilistic framework where the model learns a posterior distribution over layer depths during training.
- Uses differentiable sampling from the layer selection posterior to enable end-to-end backpropagation through the depth choice mechanism.
- Applies the same architecture to multilingual translation, with separate layer selection posteriors for each language pair.
- Employs a shared Transformer backbone while allowing each language pair to attend to different effective depths via learned routing.
- Leverages stochastic depth-style training with learnable routing probabilities to stabilize gradients in deep networks.
- Trains the model using standard objectives (e.g., cross-entropy for translation) while jointly optimizing layer selection and model parameters.
Experimental results
Research questions
- RQ1Can a probabilistic layer selection mechanism stabilize training in very deep Transformers (e.g., 100 layers)?
- RQ2Does learning language-specific layer selection posteriors improve performance in multilingual machine translation?
- RQ3How does the proposed method compare to standard deep Transformers in terms of training stability and convergence?
- RQ4Can the same shared model architecture achieve superior performance across diverse language pairs by adapting depth per language pair?
- RQ5To what extent does the method improve performance on masked language modeling and translation tasks?
Key findings
- The method enables stable training of Transformers with up to 100 layers, overcoming vanishing gradient issues common in deep architectures.
- On WMT English-German translation, the proposed method outperforms existing approaches for training deeper Transformers.
- In multilingual machine translation, the approach brings consistent improvements across both many-to-one and one-to-many translation setups.
- The model achieves better performance by learning distinct layer selection strategies per language pair, effectively leveraging increased capacity.
- The method demonstrates universal improvement across diverse language pairs without increasing inference complexity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.