Learning Light-Weight Translation Models from Deep Transformer

Bei Li, Ziyang Wang, Hui Liu, Quan Du, Tong Xiao, Chunliang Zhang, Jingbo Zhu

Deep learning in Neural Machine Translation (NMT) has followed a "deeper is better" trend, with state-of-the-art models now reaching dozens of layers. While these deep Transformers achieve high accuracy, they are computationally expensive, memory-intensive, and difficult to deploy on edge devices. Researchers from Northeastern University and NiuTrans Research (AAAI-21) address this "deployment gap" by proposing methods to compress massive Transformers into slim, efficient student models without sacrificing translation quality.

Methodology

The authors introduce two primary techniques to bridge the gap between a deep teacher (e.g., 48 layers) and a shallow student (e.g., 6 layers): Group-Permutation based Knowledge Distillation (GPKD) and a Skipping Sub-Layer method.

Group-Permutation based Knowledge Distillation (GPKD)

Standard Knowledge Distillation (KD) often struggles with extremely deep models due to the memory overhead of matching intermediate activations. GPKD simplifies this by modifying the teacher's training phase. The $N$ layers of the teacher are divided into $M$ groups. During training, the order of layers within each group is randomly shuffled for every mini-batch.

The GPKD pipeline: Teacher training with group reordering, data generation, and student initialization via sampling.

This permutation forces every individual layer in a group to learn representations compatible with the group's overall output. To create the student, the authors simply extract one representative layer from each group. Because of the permutation training, any single layer serves as a high-quality initialization for the student model, significantly improving the starting point for subsequent distillation.

Skipping Sub-Layer Method

To further strengthen the teacher and prevent "co-adaptation"—where layers rely too heavily on specific preceding layers—the authors introduce a vertical dropout mechanism. During training, sub-layers (such as Self-Attention or Feed-Forward networks) are randomly skipped.

Comparison between a standard Pre-Norm Transformer block and the proposed skipping sub-layer mechanism.

The skipping rate follows a linear decay, where lower layers (closer to the input) are skipped less frequently than higher layers to preserve critical low-level features. This is implemented as a two-stage process: the model is first trained to convergence normally, then refined using the skipping method to regularize the deep architecture.

Architecture: DESDAR

Recognizing that the decoder is the primary bottleneck during inference due to its auto-regressive nature, the authors propose the DESDAR (Deep Encoder, Shallow Decoder) architecture. By maintaining a deep encoder for high-quality representation and a very shallow decoder (e.g., 1 layer), they maximize inference speed while leveraging the distilled knowledge from the deep teacher.

Experimental Results

The proposed methods were evaluated on major benchmarks including WMT’16 English-German and NIST’12 Chinese-English. Key findings include:

  • High Compression Ratios: On WMT16 En-De, a 6-layer student trained via GPKD achieved a BLEU score of 29.33, nearly matching the 24-layer teacher (29.39) and significantly outperforming a standard 6-layer baseline (27.60).
  • Teacher Performance: The Skipping Sub-Layer method allowed a 48-layer teacher to reach 30.63 BLEU on En-De, setting a highly competitive benchmark.
  • Inference Speedup: The DESDAR 48-1 model achieved a 2.18x speedup over standard baselines while maintaining superior translation quality.

Conclusion

The research demonstrates that permutation-based training acts as a powerful regularizer, ensuring knowledge is distributed evenly across the model stack. By combining GPKD with strategic sub-layer skipping, it is possible to achieve 8x model compression with virtually no loss in translation quality, providing a viable path for deploying state-of-the-art NMT models on resource-constrained hardware.

Summary updated

BibTeX
@inproceedings{li2021learning,
  author = {Bei Li and Ziyang Wang and Hui Liu and Quan Du and Tong Xiao and Chunliang Zhang and Jingbo Zhu},
  title = {{Learning Light-Weight Translation Models from Deep Transformer}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i15.17561},
}
Figure