Source-linked AI summary

Fine-Tuning by Curriculum Learning for Non-Autoregressive Neural Machine Translation

Junliang Guo, Xu Tan, Linli Xu, Tao Qin, Enhong Chen, Tie-Yan Liu

arXiv:1911.08717v2cs.LGstat.ML

TL;DR

NAT reduces inference latency through parallel generation but sacrifices target-side context and translation quality, while direct fine-tuning from AT generally does not produce a good NAT model. The method uses curriculum learning to progressively transfer an AT model to NAT through AT training, curriculum learning, and NAT training stages. Across evaluated tasks, the method outperforms all NAT baselines, including by 1.87 BLEU on IWSLT14 De-En and 1.14 BLEU on WMT14 En-De over the best NAT baseline.

  • Problem

    NAT reduces inference latency through parallel generation but sacrifices target-side context and translation quality, while direct fine-tuning from AT generally does not produce a good NAT model.

    Source: §1 · p. 1
  • Method

    The method uses curriculum learning to progressively transfer an AT model to NAT through AT training, curriculum learning, and NAT training stages.

    Source: §1 · p. 2, §3.2 · p. 3
  • Results

    Across evaluated tasks, the method outperforms all NAT baselines, including by 1.87 BLEU on IWSLT14 De-En and 1.14 BLEU on WMT14 En-De over the best NAT baseline.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The experiments on four benchmark datasets demonstrate the effectiveness of curriculum-based fine-tuning for non-autoregressive translation.

    Source: §5 · p. 7

Abstract

from arXiv · show

Non-autoregressive translation (NAT) models remove the dependence on previous target tokens and generate all target tokens in parallel, resulting in significant inference speedup but at the cost of inferior translation accuracy compared to autoregressive translation (AT) models. Considering that AT models have higher accuracy and are easier to train than NAT models, and both of them share the same model configurations, a natural idea to improve the accuracy of NAT models is to transfer a well-trained AT model to an NAT model through fine-tuning. However, since AT and NAT models differ greatly in training strategy, straightforward fine-tuning does not work well. In this work, we introduce curriculum learning into fine-tuning for NAT. Specifically, we design a curriculum in the fine-tuning process to progressively switch the training from autoregressive generation to non-autoregressive generation. Experiments on four benchmark translation datasets show that the proposed method achieves good improvement (more than $1$ BLEU score) over previous NAT baselines in terms of translation accuracy, and greatly speed up (more than $10$ times) the inference process over AT baselines.

1 Introduction

NAT generates target tokens in parallel, reducing inference latency but sacrificing target-side context and translation quality. The paper proposes progressively transferring a well-trained AT model to NAT and reports gains over NAT baselines.

1 Introduction

  • AT generation conditions each target token on previous target tokens and the source, making sequential generation an inference-speed bottleneck.The paper contrasts this with NAT’s parallel generation of target tokens.Source: §1 · p. 1
  • NAT uses target-independent decoder inputs and parallel generation, which boosts inference speed but sacrifices target-sentence context and translation quality.The paper identifies improving NAT accuracy as a critical research problem.Source: §1 · p. 1
  • Because AT is more accurate and shares an encoder-decoder framework with NAT, fine-tuning a well-trained AT model is a natural transfer approach, but direct fine-tuning generally performs poorly.NAT’s decoder has less and weaker target-side information than AT’s.Source: §1 · p. 1
  • Curriculum learning progressively transfers training from AT to NAT to handle their differences in training strategy.The proposed curricula modify decoder inputs and attention masks.Source: §1 · p. 2
  • The decoder-input curriculum gradually substitutes copied-source tokens for target tokens, while the attention-mask curriculum switches from the AT mask to the NAT mask after a preset step.The substitution amount increases with training step.Source: §1 · p. 2
  • 1.87 BLEU on IWSLT14 De-En and 1.14 BLEU on WMT14 En-De over the best NAT baseline; the method outperforms all NAT baselines on the evaluated tasks.The experiments cover four translation datasets.Source: §1 · p. 2

2 Related Work

Prior NAT work explored decoder inputs and auxiliary losses, while this paper focuses on O(1)-generation NAT and a training paradigm that transfers from AT to NAT. Its curriculum changes training mechanisms progressively, including decoder-input substitution and attention-mask handling.

2.1 Non-Autoregressive Neural Machine Translation

  • The paper focuses on O(1)-generation NAT and proposes fine-tuning by curriculum learning to transfer from AT training to NAT training.The broader NAT literature also explores decoder-input designs and auxiliary losses for missing or duplicated words.Source: §2.1 · pp. 2–3

2.2 Transfer Learning

  • Transfer learning from AT to NAT is suboptimal with direct fine-tuning, so the paper proposes a curriculum for a smoother transfer.The paper frames AT as the pre-training task and NAT as the fine-tuning task, whose training strategies differ.Source: §2.2 · p. 3

2.3 Curriculum Learning

  • The curriculum changes training mechanisms rather than ordering data samples or tasks, aiming to make transfer from AT to NAT smoother.The paper describes this as a soft landing from AT models to NAT models.Source: §2.3 · p. 3

3.1 Problem Definition

  • The objective is to learn an NAT model using knowledge from the AT source task to facilitate learning in the NAT target task.For AT, the decoder input is the left-shifted target sentence; for NAT, it is obtained by copying the source sentence using a hard-copy method.Source: §3.1 · p. 3

3.2 Methodology

  • Training proceeds through AT training, curriculum learning, and then NAT training until convergence.The curriculum stage is the main focus of the method.Source: §3.2 · p. 3

Curriculum for the decoder input

  • Decoder-input transfer progressively substitutes selected AT-input tokens with same-position NAT-input tokens at a monotonically increasing rate.The paper compares ladder-like, linear, and logarithmic pacing functions; ladder-like pacing holds the substitution rate fixed within each sub-stage before increasing it.Source: Curriculum for the decoder input · pp. 3–4

Curriculum for the attention mask

  • The method includes an attention-mask curriculum, and its algorithm specifies a mask-switching rate alongside the AT and NAT masks.The supplied description states that the AT mask is an upper-triangular matrix; it does not give a complete description of the NAT mask here.Source: Curriculum for the attention mask · p. 4

10 end

The method finishes by training in a purely non-autoregressive manner until convergence. Its discussion explains the token-level substitution and attention-mask choices, and identifies traditional fine-tuning without the curriculum as a baseline.

10 end

  • The final stage trains the model purely non-autoregressively until convergence.The procedure without the curriculum steps is the traditional fine-tuning baseline used in experiments.Source: §10 · p. 4

3.3 Discussion

  • Token-level substitution provides intermediate transfer states, and preliminary experiments report it outperforming sentence-level substitution under the same setting.Sentence-level substitution alternates between AT and NAT strategies rather than explicitly using intermediate states.Source: §3.3 · p. 4
  • The attention mask switches directly from AT to NAT because token-level mask substitution could expose an AT token's next-token label and encourage copying.The switch occurs once the substitution rate exceeds a predefined threshold.Source: §10 · p. 4, §3.3 · p. 5

4.1 Experimental Setup

The experiments use IWSLT14 and WMT14 translation tasks with Transformer-based models, sequence-level knowledge distillation, and a three-stage training process. Inference uses noisy parallel decoding and reports BLEU and latency comparisons.

Datasets

  • IWSLT14 De-En uses 153k/7k/7k training/dev/test sentence pairs, while WMT14 En-De/De-En uses 4.5M training pairs and newstest2013/2014 for validation/test.Sentences are Moses-tokenized and BPE-segmented into a shared 32k vocabulary.Source: Datasets · p. 5

Model Configurations

  • WMT14 uses a base Transformer with 512-dimensional states, six layers, and eight heads; IWSLT14 uses 256-dimensional states, five layers, and four heads.The model also uses multi-head positional attention.Source: Model Configurations · p. 5

Training and Inference

  • Training uses sequence-level knowledge distillation from an AT teacher, then runs AT, curriculum-learning, and NAT stages with logarithmic pacing for the main results.The three stage durations are listed in Table 2 and selected using validation performance; αM is 0.6 for all tasks.Source: Training and Inference · p. 5, Table 2 · p. 5
  • Noisy Parallel Decoding varies target length using β and B, while Table 3 reports BLEU, inference latency, and speedup against autoregressive models.B = 0 uses greedy search; B = 4 produces nine candidates scored by the AT teacher, and latency is measured per sentence on WMT14 En-De with batch size 1 on a single P100 GPU.Source: Training and Inference · p. 5, Table 3 · p. 6

4.2 Results

FCL-NAT improves translation accuracy over the evaluated NAT baselines and Direct Transfer while retaining substantial inference speedup over autoregressive models.

  • The comparison includes NAT-FT, NAT-IR, ENAT, NAT-Reg, and Direct Transfer, with baseline settings selected for reported best results and a fair transfer comparison.Direct Transfer omits curriculum learning and trains non-autoregressively for extra ICL steps.Source: §4.2 · p. 6
  • FCL-NAT improves over all NAT baselines across tasks, exceeds Direct Transfer in translation accuracy, and achieves a 16.0 times inference speedup.The method adds no auxiliary loss functions or new parameters; its speedup is comparable with NAT-Reg and ENAT.Source: §4.2 · p. 6

4.3 Analyses

The analyses compare curriculum transfer with Direct Transfer, pacing functions, and substitution granularity, and report a reduction in repetitive tokens without explicit regularization.

Comparison with Direct Transfer

  • FCL-NAT initially trails Direct Transfer but finishes ahead during NAT training, and different curriculum pacing functions outperform Direct Transfer on IWSLT14 De-En.The authors attribute the later gain to a higher improvement rate in the NAT stage and a better starting point for NAT training.Source: Figure 3 · p. 6, Comparison with Direct Transfer · pp. 6–7

Study on Sentence-Level Substitution

  • Token-level and sentence-level substitution both outperform Direct Transfer, but token-level substitution beats sentence-level substitution by a large margin.The authors identify intermediate states during transfer as important to the token-level advantage.Source: Figure 4 · p. 7, Study on Sentence-Level Substitution · p. 7

Comparison of Different Pacing Functions

  • Logarithmic pacing outperforms linear and ladder-like pacing, while ladder-like and linear curves yield similar accuracy.The authors relate logarithmic pacing's advantage to more training steps at larger substitution rates, balancing AT information with non-autoregressive training.Source: Figure 3 · p. 6, Comparison of Different Pacing Functions · p. 7

Study on Repetitive Tokens

  • FCL-NAT reduces repetitive tokens more effectively without an explicit regularization function targeting repetition.The comparison measures average consecutive repetitive tokens per sentence on the IWSLT14 De-En validation set.Source: Study on Repetitive Tokens · p. 7, Table 4 · p. 7

5 Conclusion

The paper proposes curriculum-based fine-tuning to transfer knowledge from AT models to NAT models and reports its effectiveness on four benchmark datasets. It identifies extensions to other tasks and theoretical analysis as future directions.

  • The method progressively transfers AT knowledge to NAT by treating AT as the easier source task and NAT as the harder target task.It gradually substitutes both decoder input and attention mask with their NAT counterparts.Source: §5 · p. 7
  • Future work will explore text-to-speech and image-to-image translation where a smooth transformation exists, as well as theoretical explanations of the model.Source: §5 · p. 7
Loading 1911.08717v2…