Standard Neural Machine Translation (NMT) systems typically operate on isolated "translation units," usually single sentences. While efficient, this approach discards vital discourse-level information. Without knowing what was said in the previous sentence, a model must essentially guess the correct referent for ambiguous pronouns or the appropriate tone for elliptical expressions. In their paper, Jörg Tiedemann and Yves Scherrer investigate whether standard attention-based NMT architectures can autonomously learn to discover cross-sentential dependencies if provided with a bit more "history."
Methodology
The researchers modified the data fed into a standard attention-based encoder-decoder model (the Helsinki NMT system) rather than rewriting the underlying code. They tested two primary strategies for German-to-English translation using the OpenSubtitles2016 corpus:
- Model 2+1 (Extended Source): The model receives the previous source sentence plus the current source sentence. Context tokens are often marked with a special prefix or separated by a break token.
- Model 2+2 (Extended Translation Units): The model is trained to translate "blocks" of two sentences at a time, producing two target sentences separated by a break token.
The core hypothesis is that the model's attention mechanism will naturally "reach back" into the previous sentence to find the correct referent when translating ambiguous terms in the current sentence.
Key Insights and Results
The Attention Mechanism as a Discourse Resolver
The most striking finding is that the model actually utilizes the provided context without explicit instruction. Visualizing attention heatmaps reveals that when the model generates a specific word, it often places significant weight on relevant words in the preceding sentence.
On average, approximately 7.1% of the model's attention was directed at the contextual history. While this percentage is small, it often represents the critical information needed for a coherent translation.
Quantitative and Qualitative Improvements
While traditional metrics like BLEU scores showed modest gains (rising from 27.1 to 27.5 in the 2+1 model), BLEU is notoriously limited in measuring discourse-level coherence. Manual evaluations provided a clearer picture of the model's success:
- Pronoun Accuracy: In translating the ambiguous German pronoun sie/Sie, the 2+2 model significantly outperformed the baseline, improving plural pronoun accuracy from 69.8% to 79.1%.
- Contextual Consistency: The 2+2 model demonstrated superior ability in maintaining consistency across sentence boundaries, as seen in the alignment of pronouns across multi-sentence blocks.
Conclusion
Tiedemann and Scherrer demonstrate that NMT models are remarkably robust to extended context. Even without specialized modules for anaphora resolution, the standard attention mechanism can learn to resolve cross-sentential dependencies. While this study focused on a context window of a single previous sentence, it paves the way for more discourse-aware NMT systems that treat language as a continuous flow rather than a series of isolated fragments.
Summary updated