Neural Machine Translation with Key-Value Memory-Augmented Attention

Fandong Meng, Zhaopeng Tu, Yong Cheng, Haiyang Wu, Junjie Zhai, Yuekui Yang, Di Wang

Introduction

Attention-based Neural Machine Translation (NMT) has significantly advanced the field of automated translation. However, standard attention mechanisms often suffer from a lack of long-term tracking, leading to two persistent issues: over-translation (repeating words) and under-translation (skipping words). These errors occur because the model lacks an inherent mechanism to remember which parts of the source sentence have already been processed and which remain.

While previous research explored memory-augmented architectures like Neural Turing Machines, these often utilized a single memory to store both source content and translation history. This "overloading" of memory can hinder effective learning. This paper proposes KVMEMATT, a novel NMT model that employs a dual-memory architecture to decouple source representation from translation status.

The KVMEMATT Architecture

The core innovation of KVMEMATT is the separation of memory into two distinct functional components: a fixed Value-Memory and a dynamic Key-Memory.

  • Fixed Value-Memory: This component stores static representations (annotations) of the source sentence generated by the encoder. These values remain unchanged throughout the decoding process, providing a stable reference for content.
  • Dynamical Key-Memory: This component tracks the "status" of each source word. It is updated at every decoding step to record whether a word has been "covered" or translated, effectively acting as a coverage tracker.
The KVMEMATT architecture featuring dual Key-Value memory and iterative refinement.

Beyond the dual-memory structure, the model utilizes Iterative Interaction. Instead of a single attention pass, the decoder can perform multiple rounds of memory access per word. It queries the Key-Memory to find the appropriate focus, reads from the Value-Memory to retrieve content, and then updates the Key-Memory using Forget and Add gates. Furthermore, the authors introduced an EOS-attention Objective, a training loss that encourages the model to focus on the final source word when predicting the End-of-Sentence (EOS) token, ensuring the entire sentence is accounted for before termination.

Experimental Evaluation

The researchers evaluated KVMEMATT on two major benchmarks:

  1. Chinese ⇒ English: Trained on 1.25M sentence pairs (LDC corpora).
  2. German ⇔ English: Using the WMT17 dataset (5.6M sentence pairs).

In addition to standard BLEU scores, the team assessed alignment quality using a manually aligned Chinese-English dataset (900 pairs) to calculate the Alignment Error Rate (AER). They also performed subjective evaluations to categorize translation errors specifically related to over- and under-translation.

Results and Discussion

KVMEMATT demonstrated significant improvements across all metrics. On Chinese-English tasks, the single-round version (R1) outperformed the standard RNNSEARCH baseline by 1.92 BLEU points, with further gains observed when using two rounds (R2) of refinement.

Subjective analysis confirmed the model's efficacy in addressing memory issues: under-translation errors fell from 13.1% to 9.7%, and over-translation dropped from 2.7% to 1.3%. Crucially, the model achieved significantly lower AER scores, indicating that its internal attention maps align more closely with human translation logic.

Attention alignment map demonstrating precise word-level correspondence.

While the model adds a small number of parameters (approximately 2% to 8%), the iterative nature of the memory access does introduce a computational overhead, slowing training speed by 18% to 40% depending on the number of rounds. The authors also noted diminishing returns beyond two rounds of refinement.

Conclusion

By decoupling "content" from "status" through a dual-memory architecture, KVMEMATT effectively mitigates common NMT failures like word dropping and repetition. The iterative refinement process allows the model to sharpen its focus, leading to more adequate and better-aligned translations. Future work may involve integrating this key-value memory approach into the Transformer architecture to further enhance self-attention mechanisms.

Summary updated

BibTeX
@inproceedings{meng2018neural,
  author = {Fandong Meng and Zhaopeng Tu and Yong Cheng and Haiyang Wu and Junjie Zhai and Yuekui Yang and Di Wang},
  title = {{Neural Machine Translation with Key-Value Memory-Augmented Attention}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/357},
}
Figure