Introduction
Standard Neural Machine Translation (NMT) systems typically operate on a sentence-by-sentence basis, ignoring the broader document context. This isolation leads to significant errors in document-level translation, particularly regarding anaphora resolution. For instance, translating the English pronoun "it" into a gendered language like German requires identifying its antecedent in a previous sentence to select the correct gender (e.g., masculine er for Mantel / coat).
While context-aware models have been developed, they often fail to utilize surrounding text effectively. Trained primarily with standard cross-entropy loss, these models are not explicitly penalized for ignoring contextual cues, often defaulting to local patterns that result in incorrect pronoun resolution.
Methodology: CorefCL
To address these limitations, we propose CorefCL (Coreference-based Contrastive Learning), a model-agnostic training framework designed to enhance a model's sensitivity to cross-sentential dependencies.
Coreference-based Data Augmentation
The first component of CorefCL involves generating contrastive examples that highlight coreference links. Using an automated tool (NeuralCoref), the system identifies coreference chains—sequences of words referring to the same entity—across sentences. It then creates "negative" examples by corrupting these links through two methods:
- Omission: Removing the key reference from the contextual sentence.
- Replacement: Substituting the reference with a random, unrelated word.
Contrastive Learning Objective
During training, the model is tasked with distinguishing between the original, correct context and these corrupted versions. We employ a max-margin loss function, which forces the model to assign a significantly higher probability to the correct translation when paired with the authentic context versus the "broken" one. This margin ensures the network becomes actively sensitive to cross-sentential dependencies, moving context-awareness from a passive feature to a functional requirement.
Experimental Setup
The efficacy of CorefCL was evaluated across several document-level translation tasks:
- English-German: Benchmarked on WMT news, IWSLT TED talks, and OpenSubtitles’18.
- English-Korean: Tested on a new 1.6M sentence web-crawled bilingual subtitle corpus.
- Targeted Evaluation: The ContraPro test suite was used to specifically measure pronoun resolution accuracy in English-to-German translation.
Results and Analysis
CorefCL consistently improved translation quality across all tested architectures, including simple concatenation and complex multi-encoder setups.
Key findings include:
- BLEU Score Gains: The framework provided a consistent boost, with improvements of up to 2.8 points on the English-Korean task.
- Pronoun Resolution: On the ContraPro suite, CorefCL improved resolution accuracy by up to 5.5% over baseline context-aware models.
- Regularization: CorefCL acts as a powerful regularizer, helping models focus on linguistically relevant contextual parts even within noisy datasets.
Conclusion and Future Work
CorefCL demonstrates that explicit contrastive signals are vital for teaching NMT models to respect document-level consistency. While currently focused on source-side context corruption, future research will explore maintaining coreference consistency on the target side. Additionally, applying CorefCL to large-scale pre-trained models like BART or T5 represents a promising avenue for further refining document-level translation capabilities.
Summary updated