Researchers at Google AI have introduced Transparent Attention, a simple yet effective modification that allows Neural Machine Translation (NMT) models to scale to much greater depths. By allowing the decoder to attend to a weighted combination of all encoder layers—rather than just the last one—they successfully trained 20-layer Transformers and LSTMs, achieving significant BLEU score improvements on standard benchmarks.
The Depth Bottleneck in NMT
In Computer Vision, "going deeper" (e.g., ResNets with 100+ layers) has been a standard recipe for success. However, in Natural Language Processing, specifically NMT, models have historically remained shallow. While a standard Transformer typically has 6 layers, attempting to train 12 or 20 layers often leads to "optimization pathologies" where the model fails to converge or performs worse than shallower counterparts.
The authors identify the culprit as hindered gradient flow. In a standard encoder-decoder setup, the error signal must travel from the decoder, through a bottleneck, and back through every single encoder layer. By the time the signal reaches the earliest parameters, it is often too weak or noisy to be useful—a classic vanishing gradient problem.
Transparent Attention: A Direct Highway for Gradients
Transparent Attention modifies the traditional NMT architecture by making the encoder "transparent" to the decoder. Instead of only looking at the output of the final encoder layer, the decoder attends to a weighted sum of all encoder layers, including the initial embedding layer.
The model learns a set of scalar weights ($w$) during training to determine the influence of each layer. These weights are normalized via a softmax function and stabilized with dropout to prevent over-reliance on a single layer too early in the training process. This creates a direct path for gradients to jump from the decoder to any layer in the encoder, significantly shortening the backpropagation path.
Key Insights and Results
Dynamic Layer Importance
By plotting the learned weights over time, the authors discovered that the model's reliance on specific layers is dynamic. Early in training, the model relies heavily on the embedding layer and early encoder layers. As training progresses, the "center of gravity" shifts toward the deeper layers, as shown in the figure above.
Performance Gains
Transparent Attention yielded consistent improvements of 0.7 to 1.1 BLEU points over baselines for both Transformer and RNN architectures. Crucially, while vanilla Transformers with 12, 16, or 20 layers failed to train, the Transparent Attention versions converged reliably.
As seen in the table above, the 16-layer Transparent Transformer achieved 28.04 BLEU on WMT'14 En→De, outperforming the much wider Transformer (Big) model (27.94 BLEU) despite having significantly fewer parameters (137M vs 375M). This suggests that increasing depth can be a more parameter-efficient way to increase model capacity than simply increasing layer width.
Conclusion
Transparent Attention provides a robust solution to the optimization challenges of deep NMT models. While deeper models are computationally more expensive due to sequential processing, the gains in parameter efficiency and translation quality are substantial. Future work may explore even greater depths (50-100 layers) and the specific challenges of scaling the decoder depth in a similar fashion.
Summary updated