Towards one-shot learning for rare-word translation with external experts

Ngoc-Quan Pham, Jan Niehues, Alex Waibel

TL;DR

This paper tackles the challenge of neural machine translation (NMT) struggling with rare words by introducing an "Expert annotation" framework. By leveraging external knowledge sources (like phrase tables) to annotate rare words in training data and using a copy mechanism guided by reinforcement learning, they significantly improve translation accuracy for these challenging words, especially in out-of-domain scenarios.

What Problem Does This Paper Address?

Neural Machine Translation (NMT) models have revolutionized translation quality, but they falter when encountering rare words. Unlike traditional statistical machine translation (SMT) systems that rely on large, sparse phrase tables, NMT models tend to prioritize fluency over accuracy. This can lead to rare words being ignored, mistranslated, or causing under/over-translation. This is particularly problematic in specialized domains (e.g., medical, technical) where specific terminology is crucial. While domain-specific parallel corpora can help, they are often scarce and require extensive retraining. The paper aims to bridge this gap by enabling NMT models to effectively learn from limited, external lexical resources, even without extensive in-domain training data.

Methods

The core of the proposed solution is the "Expert annotation" framework. Here's a breakdown of the key techniques:

  • Expert Annotation: External knowledge sources, acting as "Experts," are used to annotate rare words in the source side of the parallel training data. These annotations are special tokens that provide suggested translations for the rare words.
  • Pointer Network (Copy Mechanism): Inspired by CopyNet, the authors integrate a pointer network. This mechanism allows the NMT model to explicitly "copy" the annotated translations from the source to the target output. This is crucial because simply adding annotations might not be enough if the model doesn't learn to use them.
  • Reinforcement Learning (RL): To encourage the model to consistently copy the expert annotations, reinforcement learning is employed. The model is rewarded when it successfully copies the annotation into the output, even if the annotation isn't perfectly aligned with the reference translation. This helps overcome the challenge of sparse gradients in RL.
  • Byte-Pair Encoding (BPE): BPE is used to pre-process the data. This helps in representing rare words by splitting them into sub-word units, making it easier for the model to handle them and reducing the occurrence of unknown tokens.
  • Embedding Sharing: Jointly training source and target embeddings and tying their projection matrices helps the model treat annotated words similarly in both languages.
  • Self-Critical Sequence Training: To mitigate the high variance of RL gradients, the authors adopt a self-critical approach, using a greedy search baseline to guide the learning process.

Datasets

The experiments were conducted on the following datasets:

  • Europarl (version 7): Used for training NMT models for English-Spanish and German-English tasks.
  • IWSLT (International Workshop on Spoken Language Translation): Used for training, validation (dev2010), and in-domain testing (tst2010) for both language pairs.
  • Business Dataset: An out-of-domain dataset for English-Spanish.
  • UFAL Medical Corpus v1.0: Used to train an "Oracle" system and the expert for the German-English out-of-domain task (medical domain).
  • HIML dataset: The test set for the German-English out-of-domain medical task.

Key Insights and Ideas

  • External knowledge as a powerful supplement: The paper demonstrates that even limited lexical resources (like phrase tables) can significantly boost NMT performance on rare words, especially when in-domain parallel data is scarce.
  • Copying is key for rare words: The explicit copy mechanism is vital. It allows the model to directly leverage the expert's knowledge, rather than trying to infer it through standard NMT training, which is often insufficient for rare items.
  • Reinforcement learning for targeted behavior: RL proves effective in guiding the model to adopt specific behaviors (like copying annotations), even when the learning signal is indirect or noisy.
  • Out-of-domain robustness: The framework shows promise in improving translation for unseen domains, highlighting the generalizability of using lexical resources for annotation.

Key Results

  • Improved rare-word accuracy: The proposed framework achieved up to 97% accuracy on rare words in some experiments.
  • Significant BLEU improvements: In out-of-domain scenarios, the annotated models improved BLEU scores by over 1.0 point compared to baselines. For example, a 1.7 BLEU point increase was observed on the HIML dataset for German-English.
  • Consistent copying: The SUG (Suggestion) metric showed a dramatic increase, indicating that the model consistently copied annotations. The SAC (Suggestion Accuracy) metric also showed improvements, particularly on rare words.
  • Effect of annotation quality: The paper suggests that even imperfect annotations can be beneficial, and the framework is designed to handle this.

Limitations and Future Work

  • Annotation quality dependence: While the framework handles imperfect annotations, the quality of the "Expert" still impacts performance. The paper notes that a high SUG score is most reliable with a high-quality expert.
  • Potential for over-copying: There's a risk of the model over-relying on annotations, potentially sacrificing fluency or copying incorrect suggestions. The authors suggest that balancing RL and cross-entropy loss can help control this.
  • Bias towards copying: The current framework might be biased towards copying, potentially hindering the model's ability to learn rare words from scratch. Future work could explore training the annotator alongside the main model to better balance translation quality and annotation copying.
  • Alignment of rare words: The paper acknowledges that finding references aligned to rare words in source sentences for comprehensive evaluation is challenging and suggests this as future work.
  • Attention map insights: The analysis of attention maps revealed that specific bounding tokens for annotations received little weight, suggesting that annotations might be useful without explicit bounding tags.

Summary updated

BibTeX
@inproceedings{pham2018towards,
  author = {Ngoc-Quan Pham and Jan Niehues and Alex Waibel},
  title = {{Towards one-shot learning for rare-word translation with external experts}},
  booktitle = {NMT @ ACL},
  year = {2018},
  doi = {10.18653/v1/w18-2712},
}
Figure