Learning to Multi-Task Learn for Better Neural Machine Translation

Poorya Zaremoodi, Gholamreza HaffariarXiv 2020 · OpenReview

TL;DR

This paper tackles the challenge of training high-quality Neural Machine Translation (NMT) models in low-resource scenarios by using Multi-Task Learning (MTL). They introduce a novel framework that learns the optimal schedule for using auxiliary tasks during training, rather than relying on hand-engineered heuristics, leading to improved translation quality.

What Problem Does This Paper Address?

Training NMT models requires vast amounts of parallel sentence data. However, many languages lack such extensive datasets, creating a "low-resource" scenario. Multi-Task Learning (MTL) offers a solution by leveraging related auxiliary tasks (like syntactic parsing) to inject linguistic knowledge and improve the main translation task's generalization. The core challenge, however, lies in when and how much to use these auxiliary tasks during training. This "training schedule" is crucial, especially in "biased-MTL" where the goal is to boost the main task, even if it means slightly degrading auxiliary task performance. Existing methods rely on hand-crafted heuristics for scheduling, which are often suboptimal and require manual tuning for different scenarios. This paper aims to automate this process by learning an effective training schedule.

Methods

The authors propose a novel framework for learning the training schedule by formulating it as a Markov Decision Process (MDP). In this MDP:

  • State: Represents the history of the training process (e.g., loss values, model parameters).
  • Action: The importance weights assigned to each auxiliary task.
  • Reward: Measures the improvement in the main translation task's generalization on a held-out validation set.

To solve this MDP, they first develop an "oracle policy". This oracle policy is computationally expensive but provides an approximation of the optimal schedule by performing a one-step lookahead to find task weights that minimize the main task's validation loss.

To make this practical, they then use the oracle policy as a teacher to train a "scheduler network" using imitation learning, specifically the DAAGER algorithm. This scheduler network learns to mimic the oracle's decisions, providing an efficient way to dynamically adjust task importance weights during training. The scheduler network takes the training history as input and outputs the task importance weights.

Datasets

The experiments were conducted on low-resource language pairs:

  • English to Vietnamese (En→Vi)
  • English to Turkish (En→Tr)
  • English to Spanish (En→Es)

The paper also mentions using linguistic corpora for auxiliary tasks:

  • Penn Treebank for syntactic parsing.
  • Abstract Meaning Representation (AMR) corpus Release 2.0 for semantic parsing.
  • CONLL shared task data for Named-Entity Recognition (NER).

Key Insights and Ideas

  • Learning to Schedule is Key: The paper argues that the training schedule is as important as the architecture itself for effective MTL, especially in low-resource settings.
  • MDP Formulation for Scheduling: Framing the scheduling problem as an MDP provides a principled way to optimize the dynamic allocation of resources (auxiliary task attention) over time.
  • Oracle as a Teacher: Using a computationally expensive oracle policy to generate "expert" demonstrations is a smart way to bootstrap imitation learning for a complex scheduling task.
  • Efficiency through Imitation Learning: While the oracle is too slow for direct use, training a scheduler network via imitation learning makes the adaptive scheduling approach practical.
  • Dynamic Task Importance: The learned schedule dynamically adjusts the influence of auxiliary tasks based on their current contribution to the main task's generalization, going beyond static or simple heuristic-based approaches.

Key Results

  • The proposed automatically learned training schedules outperform hand-engineered heuristics across three low-resource language pairs.
  • The method achieves up to +1.1 BLEU score improvements on low-resource NMT tasks.
  • A combined approach using a heuristic schedule with the learned scheduler network was not as effective as the pure learned scheduler, suggesting the learned approach can capture complex dynamics on its own.

Limitations and Future Work

  • Computational Cost of Oracle: The oracle policy itself is computationally demanding, limiting its direct use and necessitating the imitation learning approach.
  • Scalability: While the learned scheduler is efficient, the initial training of the scheduler relies on the oracle, which might still be a bottleneck for extremely large-scale scenarios.
  • Generalizability: The paper suggests that the presented approach is general and can be applied to any MTL problem beyond NMT, which is left as future work.
  • Feature Engineering for State: The paper mentions using moving averages of task losses as features for the scheduler's state. Further exploration into more informative state representations could potentially yield even better results.

Summary updated

Abstract

Scarcity of parallel sentence pairs is a major challenge for training high quality neural machine translation (NMT) models in bilingually low-resource scenarios, as NMT is data-hungry. Multi-task learning is an elegant approach to inject linguistic-related inductive biases into NMT, using auxiliary syntactic and semantic tasks, to improve generalisation. The challenge, however, is to devise effective training schedules, prescribing when to make use of the auxiliary tasks during the training process to fill the knowledge gaps of the main translation task, a setting referred to as biased-MTL. Current approaches for the training schedule are based on hand-engineering heuristics, whose effectiveness vary in different MTL settings. We propose a novel framework for learning the training schedule, ie learning to multi-task learn, for the MTL setting of interest. We formulate the training schedule as a Markov decision process which paves the way to employ policy learning methods to learn the scheduling policy. We effectively and efficiently learn the training schedule policy within the imitation learning framework using an oracle policy algorithm that dynamically sets the importance weights of auxiliary tasks based on their contributions to the generalisability of the main NMT task. Experiments on low-resource NMT settings show the resulting automatically learned training schedulers are competitive with the best heuristics, and lead to up to +1.1 BLEU score improvements.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
IWSLT 2015 · En→Vi test · IWSLT 2015; tst2013MTL with Heuristic Schedule + Biased (Constant)BLEU25.22split: tst2013 · model=LSTM · schedule=Biased (Constant) · language-pair=En→Vi · training-regime=low-resource
Source quote
L244: \ \ \ + Biased (Constant) │ 23.42 │ 25.22 │ 10.06 │ 9.53 │ 15.14 │ 14.11 │ 31.8 │ 31.3
WMT 2016 · En→Tr test · WMT 2016; NT2018MTL with Heuristic Schedule + Biased (Constant)BLEU9.53split: nt2018 · model=LSTM · schedule=Biased (Constant) · language-pair=En→Tr · training-regime=low-resource
Source quote
L244: \ \ \ + Biased (Constant) │ 23.42 │ 25.22 │ 10.06 │ 9.53 │ 15.14 │ 14.11 │ 31.8 │ 31.3
Europarl · En→Es test · Europarl; NT2013; first 150K training exampMTL with Heuristic Schedule + Biased (Constant)BLEU14.11split: nt2013 · model=LSTM · subset=first 150K training examples · schedule=Biased (Constant) · language-pair=En→Es · training-regime=low-resource
Source quote
L244: \ \ \ + Biased (Constant) │ 23.42 │ 25.22 │ 10.06 │ 9.53 │ 15.14 │ 14.11 │ 31.8 │ 31.3
BibTeX
@misc{zaremoodi2020learning,
  author = {Poorya Zaremoodi and Gholamreza Haffari},
  title = {{Learning to Multi-Task Learn for Better Neural Machine Translation}},
  year = {2020},
  eprint = {2001.03294},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.03294},
}
Figure