Exploiting Sentential Context for Neural Machine Translation

Xing Wang, Zhaopeng Tu, Longyue Wang, Shuming Shi

Abstract

Standard Neural Machine Translation (NMT) architectures, such as the Transformer, rely heavily on word-level attention mechanisms to capture dependencies. However, these models often lack a holistic, "global" understanding of the source sentence's meaning. This paper introduces a method to improve NMT by providing the decoder with a "sentential context"—a summarized representation of the entire source sentence. By aggregating information across all layers of the encoder (Deep Sentential Context) rather than just the final one, the proposed model captures richer linguistic nuances, allowing a smaller model to achieve performance comparable to much larger architectures.

Introduction

In standard NMT, the decoder generates a translation word-by-word, attending to specific parts of the source sentence. While effective, this approach differs from human translation, where a translator first grasps the overall intent, tone, and structure of a sentence before translating individual components. Attention mechanisms help models focus on relevant words, but they do not explicitly provide a summarized "gist" to guide the decoding process. This research aims to fill this gap by explicitly modeling and integrating "sentential context."

Proposed Methods

The researchers proposed two main strategies for extracting and integrating this global context into the NMT pipeline:

  1. Shallow Sentential Context: This approach extracts a single vector from only the top layer of the encoder. The authors evaluated three summarization techniques: mean pooling, max pooling, and a dedicated attention mechanism.
  2. Deep Sentential Context: Recognizing that network layers capture hierarchical information—lower layers handling surface-level syntax and higher layers handling deep semantics—the authors proposed aggregating representations from all internal encoder layers.
Comparison of Vanilla (a), Shallow (b), and Deep (c) Sentential Context architectures. The Deep approach aggregates information from all encoder layers to form a global context vector.

Layer Fusion Functions

To combine multiple layers into a single context vector for the "Deep" strategy, two functions were explored:

  • RNN-based: Treating the layers as a sequence and using a Recurrent Neural Network to summarize them.
  • Transparent Attention Model (TAM): A dynamic approach using an attention mechanism to determine which encoder layers are most relevant for the current word being translated in the decoder.
Two proposed functions for layer fusion: (a) RNN-based and (b) Transparent Attention Model (TAM), which uses the decoder state to weight encoder layers.

This global context vector is fused into the decoder's feed-forward network at every time step, ensuring the model maintains a consistent understanding of the overall sentence meaning throughout the translation process.

Experimental Setup and Results

The models were evaluated on two benchmarks: WMT14 English⇒German (4.5M pairs) and WMT14 English⇒French (35.5M pairs). Additionally, 10 linguistic probing tasks were used to evaluate the model's grasp of surface, syntactic, and semantic knowledge.

Key Findings

  • Layer Fusion Superiority: The "Deep" strategy consistently outperformed the "Shallow" one, confirming that drawing from diverse linguistic features across network depths is more effective than summarizing a single layer.
  • Efficiency Gains: A "Base" Transformer model (approx. 114M parameters) equipped with deep sentential context matched the performance of a "Big" Transformer model (approx. 264M parameters). This suggests that architectural intelligence can be more effective than brute-force parameter scaling.
  • BLEU Improvements: On the English⇒German task, the deep context model improved the baseline Transformer-Base by over 1.0 BLEU point. These improvements were consistent across language pairs and model sizes.
  • Semantic Enrichment: Probing tasks revealed that deep sentential context specifically boosted the model's understanding of semantics and syntax compared to standard baselines.

Conclusion

Exploiting sentential context provides a significant performance boost to NMT models by ensuring the decoder never "loses sight" of the source sentence's global meaning. While adding these components introduces a marginal computational overhead (10-20% decrease in speed), the resulting parameter efficiency and translation quality make it a compelling architectural enhancement. Future work may explore incorporating broader context, such as domain-specific or topic-level information, to further refine the translation process.

Summary updated

BibTeX
@inproceedings{wang2019exploiting,
  author = {Xing Wang and Zhaopeng Tu and Longyue Wang and Shuming Shi},
  title = {{Exploiting Sentential Context for Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1624},
}
Figure