Improving Neural Machine Translation by Achieving Knowledge Transfer with Sentence Alignment Learning

Xuewen Shi, Heyan Huang, Wenguan Wang, Ping Jian, Yi-Kun Tang

Introduction

Neural Machine Translation (NMT) models trained with standard likelihood objectives often suffer from "inadequate" translations, meaning they drop key source information or fail to fully convey the original meaning. This paper introduces an adversarial framework where a discriminator learns to score sentence alignments and transfers this semantic knowledge to the NMT generator. By using a gated self-attention discriminator and an N-pair ranking loss, the model significantly improves translation adequacy and achieves higher BLEU scores on Chinese-English and English-German tasks.

The Challenge of Translation Adequacy

Most state-of-the-art NMT models are optimized using Maximum Likelihood Estimation (MLE). MLE focuses on predicting the next word given the previous ones, which is effective for fluency but does not explicitly guarantee translation adequacy—the complete and accurate transfer of information from the source sentence to the target sentence.

Previous attempts to address this relied on "coverage" mechanisms based on the model's internal attention weights. However, these mechanisms treat all words equally. Because an NMT model might confidently align trivial function words (like "the" or "a") while completely missing crucial content words (like specific nouns or verbs), simple coverage metrics often fail to catch translation errors. The authors tackle this by creating a system that explicitly scores the semantic alignment between the source and target sentences, ensuring key lexical information isn't lost in translation.

Proposed Adversarial Framework

The authors propose an adversarial learning framework consisting of two sub-models: a Generator ($G$) and a Discriminator ($D$).

The Generator

The generator is a standard Transformer model that produces translations. To make the discrete text generation process differentiable for adversarial training, the authors use a Gumbel-Softmax sampler. They also interleave a "teacher-forcing" step (using standard MLE or a BLEU reward) to ensure the generated text remains grammatically fluent, as the alignment loss alone doesn't strictly enforce language rules.

The Gated Self-Attention Discriminator

The discriminator is a novel, lightweight sentence encoder using gated self-attention. It learns to estimate an alignment score between a source sentence and a list of translation candidates.

Visualizing the discriminator's self-attention reveals that it naturally learns to assign higher weights to key lexical evidence (like nouns and verbs) over function words. This semantic knowledge is successfully transferred to the generator, preventing the NMT model from dropping critical entities.

N-Pair Ranking Loss

Instead of the standard binary classification (real vs. fake) used in typical GANs, $D$ is trained with a multi-class N-pair loss. This metric-learning approach ranks a list of candidates, ensuring that translations that are correct but slightly phrased differently from the ground truth aren't overly penalized. This provides a more reliable and forgiving gradient signal to the generator.

Experimental Results

The proposed method was tested on Chinese-to-English (Zh-En) and English-to-German (En-De) datasets.

  • Chinese-to-English: The adversarial framework improved the average BLEU score by +0.76 points (from 41.19 to 41.95) over the baseline Transformer.
  • English-to-German: It achieved a +0.64 BLEU improvement (from 26.52 to 27.16).
  • Discriminator Accuracy: The standalone discriminator achieved over 96% recall@1 and nearly 100% recall@5 when picking the correct translation out of 100 candidates.
  • Re-ranking: When used to re-rank a wide beam search (beam size 24), the BLEU score jumped to 42.56 on NIST04, outperforming standard length-penalty heuristics and mitigating the issue where larger beam sizes degrade performance.

Conclusion

By explicitly learning sentence alignment through an adversarial framework, this work addresses the long-standing issue of translation adequacy in NMT. The combination of a gated self-attention discriminator and N-pair ranking loss provides a robust mechanism for semantic knowledge transfer, leading to measurable improvements in translation quality across multiple language pairs. Future work will explore capturing deeper semantic structures, such as syntactic dependencies.

Summary updated

BibTeX
@inproceedings{shi2019improving,
  author = {Xuewen Shi and Heyan Huang and Wenguan Wang and Ping Jian and Yi-Kun Tang},
  title = {{Improving Neural Machine Translation by Achieving Knowledge Transfer with Sentence Alignment Learning}},
  booktitle = {CoNLL},
  year = {2019},
  doi = {10.18653/v1/k19-1025},
}
Figure