TL;DR
Iterative Non-Autoregressive Transformers (iNATs) offer high translation quality, but multi-step decoding erodes their speed advantage over standard autoregressive models. This paper introduces Distill Multiple Steps (DiMS), a distillation framework that trains a single-step student to mimic the multi-step predictions and hidden representations of a teacher model. By maintaining the teacher as an exponential moving average (EMA) of the student, DiMS achieves multi-step translation quality in a single forward pass without extra inference latency.
What Problem Does This Paper Address?
Standard autoregressive machine translation generates tokens sequentially, creating inference bottlenecks. Non-Autoregressive Transformers (NATs) generate sequences in parallel to dramatically cut latency, but single-step NATs historically suffer from a significant drop in translation quality.
To bridge this gap, iterative NATs (iNATs), such as Conditional Masked Language Models (CMLMs), iteratively predict and refine masked tokens over several passes ($S$ steps). While multi-step decoding produces much higher translation quality, each additional iteration shrinks the latency gap between iNATs and fast autoregressive models with shallow decoders. The challenge is clear: Can we retain the quality gains of multi-step iterative decoding while executing only a single decoding step at inference time?
Methods
The authors propose DiMS (Distill Multiple Steps):
- Multi-Step to Single-Step Distillation: Given a pre-trained iterative teacher model and an initialized student:
- Instead of expensive full sequence generation during training, the teacher processes a partially masked reference sentence across $n$ iterative steps (revealing tokens linearly) to produce soft prediction targets.
- The student takes the same initial partially masked sentence and predicts the teacher’s final outputs in just one step.
- Dual Distillation Loss: The training objective minimizes:
- Output Distribution Loss: A KL-divergence loss over the masked tokens matching the student's output distribution to the teacher’s soft labels.
- Hidden State Loss: The Euclidean distance between the final layer hidden states of the student and teacher, transferring internal representations not fully captured by soft labels.
- Continuous Teacher Updates via EMA: To prevent teacher labels from becoming stale—without having to run multiple expensive rounds of retraining from scratch—the teacher’s weights are continuously updated as an Exponential Moving Average (EMA) of the student’s weights ($\theta_t \leftarrow (1-\mu)\theta_s + \mu\theta_t$).
- Unsupervised DiMS (U-DiMS): To remove the dependency on parallel corpora, the authors introduce a variant where the teacher synthesizes translation targets from monolingual inputs, enabling semi-supervised/unsupervised distillation.
Partially Masked Sentence y~
|
+--------+--------+
| |
Teacher (n steps) Student (1 step)
| |
Soft Labels / Hidden State
\ /
--> Loss (KL + MSE) --> Updates Student
|
Teacher <--- EMA update
Datasets
The authors evaluate DiMS on standard machine translation benchmarks across both raw and sequence-level knowledge-distilled datasets:
- WMT’14 En-De (English–German) and WMT’14 De-En
- WMT’16 En-Ro (English–Romanian) and WMT’16 Ro-En
No new benchmark datasets were introduced.
Key Insights and Ideas
- EMA as a substitute for multi-round distillation: Repeating standard iterative distillation (training a student, promoting it to teacher, and retraining) requires multiple rounds of convergence. A slow EMA ($\mu > 0.9$) transfers knowledge continuously and smoothly, matching multi-round performance in roughly a single round's training time.
- Hidden states convey what soft labels miss: Adding an $L_2$ hidden state loss between the student's and teacher's top representations boosts single-step performance by more than 2.0 BLEU points over distribution matching alone.
- Dramatic gains on raw data: Distillation usually helps most on already-distilled data. Surprisingly, DiMS delivers its biggest jumps on raw data—improving single-step CMLM by over 12 BLEU points—suggesting that multi-step teacher guidance helps regularize the multi-modal output space that normally impairs standard NATs.
- Long sequences benefit the most: Analyzing performance across sentence lengths reveals that single-step performance gains are largest for longer sentences, where multi-step contextual refinement originally provided the biggest advantage.
Key Results
- Matching 8-step quality in 1 step: On WMT’14 De-En, a single-step
CMLMC + DiMSmodel achieves 29.3 BLEU on raw data (vs. 16.4 for baseline CMLMC) and 30.8 BLEU on distilled data, effectively matching the translation quality of an 8-step baseline teacher. - New state-of-the-art among single-step NATs: With Noisy Parallel Decoding (NPD, $m=7$),
CMLMC + DiMSreaches 31.6 BLEU on WMT’14 De-En and 34.5 BLEU on WMT’16 Ro-En, outperforming established single-step baselines like GLAT, Flowseq, and Imputer. - Generalization to alignment-based models: Applying DiMS to
Imputer(a Connectionist Temporal Classification / CTC-based NAT) improved single-step performance from 25.87 to 26.43 on WMT’14 En-De and 28.96 to 29.75 on De-En. - Unsupervised effectiveness: U-DiMS trained strictly on teacher-generated synthetic targets matched supervised DiMS within ~0.3 BLEU on WMT'14 De-En.
Limitations and Future Work
- Degenerate solutions without careful EMA tuning: If the EMA momentum is set too low ($\mu \le 0.9$), the self-referential training loop destabilizes and collapses into a trivial minimum where outputs map to constant vectors.
- Dependency on a strong iterative teacher: The quality of the student is bound by the quality and convergence of the pre-trained iterative teacher model.
- Future directions:
- Extending DiMS to other non-autoregressive sequence generation domains, such as Automatic Speech Recognition (ASR).
- Leveraging U-DiMS with massive monolingual web datasets to further scale distilled single-step models.
Summary updated