Document-Level Neural Machine Translation With Document Embeddings

Linxing Zhu, Shu Jiang, Hai Zhao, Zuchao Li, Jiashuang Huang, Weiping Ding, Bao-Liang LuIEEE Access 2020

Introduction

Standard Neural Machine Translation (NMT) models typically operate on a sentence-by-sentence basis, treating each segment as an independent unit. However, human language is inherently contextual. When models translate sentences in a vacuum, they often struggle with consistency (using different terms for the same entity), disambiguation (choosing the wrong word sense), and coherence (losing the narrative flow or grammatical tense established previously).

This paper introduces a method to improve NMT by incorporating document-level context. By integrating "global" (entire document) and "local" (surrounding sentences) embeddings directly into a Transformer model, the researchers achieved significant gains in translation quality across multiple language pairs.

Proposed Methodology

The authors build upon the standard Transformer architecture by introducing a two-tiered embedding approach designed to capture both the broad theme and the immediate context of a text.

Global and Local Embeddings

  • Global Document Embeddings: These represent the overarching theme and content of the entire document, aiding in topical consistency.
  • Local Document Embeddings: These represent the specific context of the sentences immediately surrounding the target sentence, helping with immediate grammatical cues like tense and discourse markers.
Overview of the Document Embedding Generation and its integration into the Transformer architecture.

To generate these embeddings, the researchers evaluated three strategies: Word Embedding Average (a simple mean of word vectors), Document RNN (using a Recurrent Neural Network to summarize sentence states), and Weighted Sum of Self-attention (leveraging internal attention mechanisms to weight relevant sentences).

The "Enhanced" Training Strategy

Rather than training from scratch, the authors utilized an "Enhanced" strategy. They first trained a baseline Transformer to obtain stable word embeddings. These embeddings were then fixed to preserve semantic relationships while training a secondary model that concatenates the global and local document embeddings to the source sentence embeddings. This allows the model to attend to broader context without losing the precision of the original sentence-level mapping.

Experimental Setup

The models were evaluated using the IWSLT 2017 datasets, which consist of TED Talk transcripts. These transcripts provide clear document boundaries and a consistent narrative flow, making them ideal for testing document-level coherence. The study covered three primary language pairs: Chinese-to-English (Zh-En), English-to-French (En-Fr), and English-to-German (En-De), with approximately 0.2 million sentence pairs per training set.

Key Results and Discussion

The proposed "Enhanced+global+local" model consistently outperformed the baseline Transformer and several state-of-the-art document-level models, including Hierarchical Attention Networks (HAN) and Guided Document Context (HM-GDC).

Comparison of BLEU scores between the proposed model and state-of-the-art document-level NMT models across different benchmarks.

As shown in the results, the model achieved substantial improvements in BLEU scores:

  • Zh-En: +1.11 points over baseline.
  • En-Fr: +1.54 points over baseline.
  • En-De: +1.27 points over baseline.

Beyond metrics, the model demonstrated "discourse awareness." For instance, it successfully inferred past tense in English for Chinese source sentences (which lack explicit tense) by identifying temporal markers like "the 1980s" in preceding sentences. It also improved the use of transition words (e.g., "and", "but") to ensure a more fluent narrative flow.

Conclusion

By combining global thematic information with local contextual cues, this research demonstrates that document-level embeddings can significantly enhance the performance of Transformer-based NMT. While simple strategies like Word Embedding Averaging proved surprisingly effective for global context, the integration of both tiers provided the most robust results. Future work may address the computational costs of processing entire documents and explore more sophisticated ensemble methods for document representation.

Summary updated

BibTeX
@inproceedings{zhu2020document,
  author = {Linxing Zhu and Shu Jiang and Hai Zhao and Zuchao Li and Jiashuang Huang and Weiping Ding and Bao-Liang Lu},
  title = {{Document-Level Neural Machine Translation With Document Embeddings}},
  booktitle = {IEEE Access},
  year = {2020},
  doi = {10.1109/access.2025.3568089},
}
Figure