Introduction
Transformer models have revolutionized Neural Machine Translation (NMT), setting new benchmarks for translation quality. However, this success comes at a significant computational cost. These models are notoriously over-parameterized, leading to slow inference speeds that hinder real-world deployment. While it is well-known that many attention heads can be removed from a fully trained model, doing so before or during training typically results in a substantial performance degradation.
This research explores the application of the "Lottery Ticket Hypothesis" to entire functional blocks—specifically attention heads—rather than individual weights. The goal is to identify a "winning ticket": a sparse sub-network that, when trained from an appropriate starting point, can match the performance of the full, dense model while offering significant speedups.
Methodology: Iterative Pruning and Late Resetting
The authors propose a novel approach combining attention confidence heuristics with iterative pruning and late resetting. Unlike magnitude pruning, which targets individual weights and often requires specialized software for speedups, this method performs structural pruning by removing entire attention heads. This allows for immediate performance gains on standard CPUs and GPUs.
The process follows a six-step cycle as illustrated in Figure 1:
- Initialization: The model begins with standard random weights.
- Initial Training: The model is trained for $X$ updates to establish a stable base.
- Iterative Training: The model continues training for $Y$ updates.
- Pruning: Attention heads are evaluated based on "confidence"—a metric measuring how focused a head's attention is. Heads that consistently spread attention thinly across many words are deemed unconfident and removed.
- Late Resetting: Instead of resetting to random values, the remaining weights are reset to a checkpoint from early in the training process (e.g., after 10k updates). This "late reset" provides a stable foundation for the pruned model to converge.
- Convergence: Steps 3-5 are repeated until the desired sparsity is reached, after which the model is trained to final convergence.
Key Insights
The experimental results yielded several critical insights into the architecture of Transformers:
- Heads as Functional Lottery Tickets: The Lottery Ticket Hypothesis holds true at the level of attention heads. Finding these "winning" heads early allows the model to adapt its remaining parameters more effectively than post-hoc pruning.
- The Over-Engineered Decoder: The Transformer's decoder is remarkably redundant. The researchers found they could prune nearly all self-attention heads in the decoder layers (except for the first layer) with minimal impact on translation quality.
- Layer-Specific Sensitivity: In the encoder, the first and last layers are vital for maintaining quality. Conversely, middle layers are much more resilient to aggressive pruning.
Experimental Results
The approach was validated on two primary datasets: a low-resource Turkish-to-English (WMT18) task and a high-resource, optimized English-to-German task.
In the Turkish-to-English scenario, the method achieved massive sparsity. As shown in the table below, the model maintained competitive BLEU scores even as sparsity increased beyond 70%.
Specifically, at 72% sparsity (Pruned i13), the model suffered a negligible loss of only 0.1 BLEU compared to the baseline, while delivering a 1.5x speedup during inference. Even at 83% sparsity, the quality remained remarkably high, with only a 0.7 BLEU drop from the baseline.
Furthermore, the researchers demonstrated that their "late resetting" technique is superior to training a small architecture from scratch. Models initialized randomly with the same pruned architecture performed significantly worse, confirming that the early training phase captures essential structural information that cannot be easily replicated by random initialization.
Conclusion and Future Work
By treating attention heads as lottery tickets, this work provides a path toward more efficient NMT models without sacrificing translation quality. The resulting structural sparsity translates directly into real-world speedups on standard hardware, making high-quality translation more accessible for deployment.
While the inference benefits are clear, the current training process is more computationally intensive due to the iterative cycles. Future research may focus on more sophisticated pruning heuristics or extending this block-wise approach to other Transformer components, such as Feed-Forward Networks (FFN), to further reduce the parameter footprint.
Summary updated