Abstract
We investigate the use of extended context in attention-based neural machine translation. We base our experiments on translated movie subtitles and discuss the effect of increasing the segments beyond single translation units. We study the use of extended source language context as well as bilingual context extensions. The models learn to distinguish between information from different segments and are surprisingly robust with respect to translation quality. In this pilot study, we observe interesting cross-sentential attention patterns that improve textual coherence in translation at least in some selected cases.
Introduction
Standard Neural Machine Translation (NMT) models typically operate under "sentence-level myopia," translating each sentence in isolation. While effective for basic semantic transfer, this approach often fails to capture discourse-level phenomena such as pronominal anaphora, stylistic consistency, and conversational flow. This study explores the integration of extended context—specifically the preceding sentence—to help NMT models resolve these ambiguities and improve overall translation coherence.
Methodology
The researchers utilized a standard attention-based encoder-decoder architecture (Bahdanau-style) but modified the data packaging to include surrounding sentences. Two primary configurations were tested using the OpenSubtitles2016 German-to-English corpus:
- Model 2+1 (Extended Source): The input consists of the previous source sentence concatenated with the current source sentence, while the target remains a single sentence.
- Model 2+2 (Extended Translation Units): Both the source and target are expanded to include the previous and current segments, separated by a special marker (such as a
BREAKtoken or||).
Crucially, the underlying neural architecture remained unchanged; the models relied on the inherent attention mechanism to determine which parts of the contextual history were relevant to the current translation task.
Key Insights: The Role of Attention
One of the study's most significant findings is the natural robustness of NMT models to extended context. The models quickly learn to distinguish between segments, ignoring the previous sentence when it is irrelevant and focusing on it when necessary.
Analysis of attention heatmaps revealed that approximately 7.1% of the model's attention naturally gravitates toward the contextual history. This "context-seeking" behavior is highly dependent on the linguistic properties of the words being translated. Response particles (e.g., "yes," "oh") and ambiguous pronouns (e.g., "he," "she," "it") trigger significantly higher external attention, sometimes exceeding 26%.
Results and Discourse Resolution
While quantitative improvements in BLEU scores were modest (e.g., 27.5 for the 2+1 model vs. 27.1 for the baseline), the qualitative improvements in coherence were substantial. The extended context models demonstrated a clear ability to perform implicit disambiguation without explicit rules.
As illustrated in Figure 6, the model can leverage plural markers in the preceding German sentence (such as the verb sind) to correctly translate the ambiguous pronoun sie as "them" instead of "her." In manual evaluations of such pronouns, the 2+2 model improved the accuracy of translating plural "they/them" from 69.8% to 79.1%.
Conclusion
This pilot study demonstrates that providing NMT models with even a small window of extended context can significantly improve discourse-level translation quality. The attention mechanism serves as a powerful tool for resolving cross-sentential dependencies, leading to more idiomatic and contextually appropriate results. Future research will investigate larger context windows and more sophisticated methods for encoding long-range discourse history.
Summary updated