Learning Source Phrase Representations for Neural Machine Translation

Hongfei Xu, Josef van Genabith, Deyi Xiong, Qiuhui Liu, Jingyi Zhang

Abstract

Neural Machine Translation (NMT) models like the Transformer often struggle with long-range dependencies despite their theoretical ability to attend to any token in a sequence. This paper introduces a framework to integrate "phrase-level" intelligence into the Transformer architecture. By dynamically generating phrase representations from word tokens and allowing the model to attend to these higher-level abstractions, the authors significantly improve the model's ability to handle long-distance dependencies. Notably, a "Base" model equipped with phrase representations (+PR) can match the performance of much larger "Big" models with far greater efficiency, particularly on long sentences.

Introduction

While the Transformer's multi-head attention mechanism has revolutionized NMT, empirical studies show it remains somewhat "short-sighted" when capturing long-range dependencies. In contrast, older Statistical Machine Translation (SMT) systems utilized phrases as primary building blocks to handle context and reordering more naturally. However, bringing phrases into NMT is difficult because a static phrase vocabulary would be astronomically large. This work aims to bridge the gap by dynamically learning phrase representations without the baggage of a massive phrase table.

Proposed Method: Transformer with Phrase Representation (+PR)

The authors propose a framework that enhances the standard Transformer with three main components:

  1. Phrase Segmentation: Sentences are grouped into phrases using either a simple N-gram approach or a more sophisticated syntax parser to identify linguistically motivated sub-trees.
  2. Attentive Phrase Representation Generation: Instead of simple averaging, a small neural network summarizes each phrase by calculating importance scores for its constituent tokens, ensuring informative words dominate the representation.
  3. Architectural Integration:
  4. Encoder: Each layer includes an "Attentive Combining" module where tokens attend to the generated phrase sequence.
  5. Decoder: A "Transparent Attention" mechanism allows the decoder to attend to both original source tokens and source phrase representations, ensuring it receives the most relevant level of abstraction.
Architecture of the proposed Encoder and Decoder layers incorporating phrase representations.

Experimental Evaluation

The models were evaluated on two standard benchmarks: WMT 14 English-German (En-De) and the much larger WMT 14 English-French (En-Fr) dataset (~36M sentence pairs). These tests demonstrate the scalability and quality of the proposed approach.

Key Results and Insights

The +PR framework yielded substantial improvements in both translation quality and efficiency:

  • Performance Gains: The approach achieved a +1.29 BLEU improvement on En-De and +1.37 BLEU on En-Fr over the strong Transformer Base baseline.
  • Efficiency (Base is the new Big): A Transformer Base+PR model performs at the same level as a Transformer Big model. This is significant because the +PR Base model has fewer parameters and requires only about 1/3 of the training steps compared to the Big model.
  • Long-Sentence Specialist: The model's greatest gains occur on sentences longer than 45 tokens, where it outperforms the baseline by +1.72 BLEU—nearly double the improvement seen on short sentences.
BLEU score improvement across different sentence lengths, highlighting gains on long sequences.
  • Subject-Verb Agreement: Using the Lingeval97 dataset, the authors showed that their model is significantly more accurate at maintaining grammatical agreement between subjects and verbs when they are separated by many words.

Limitations and Future Work

While effective, the +PR model introduces some computational overhead; training is roughly 1.7x slower and decoding is 1.5x slower than the standard Base model. Additionally, while linguistically motivated phrases from a parser yielded the best results, parsing is computationally expensive. Future research may focus on finding a more efficient middle ground between simple N-gram segmentation and full syntactic parsing.

Summary updated

BibTeX
@inproceedings{xu2020learning,
  author = {Hongfei Xu and Josef van Genabith and Deyi Xiong and Qiuhui Liu and Jingyi Zhang},
  title = {{Learning Source Phrase Representations for Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.37},
}
Figure