Introduction
Traditional machine translation (MT) evaluation metrics, such as BLEU or the more recent COMET, typically operate on a sentence-by-sentence basis. They compare a single "hypothesis" sentence against a "reference" sentence in isolation. However, human evaluators at the annual Workshop on Machine Translation (WMT) have utilized document-level context since 2019 to resolve semantic ambiguities and pronoun references (e.g., "it" or "they"). To bridge this gap, we introduce Cont-COMET, a context-aware metric designed to incorporate surrounding textual information into the evaluation process.
The Cont-COMET Framework
Cont-COMET builds upon the COMET framework, utilizing a pretrained XLM-RoBERTa-large cross-lingual encoder. The model addresses the limitations of previous context-aware attempts through two primary innovations: context-aware training and a dynamic context selection method.
Context-Aware Training
Unlike models that merely append context during inference, Cont-COMET involves retraining the regression head specifically for contextual inputs. The current sentence is concatenated with its neighbors ($S_{prev}$ and $S_{next}$), and a masking strategy is employed to ensure the model prioritizes the target segment while remaining informed by the auxiliary context.
Context Selection Method
To manage the 512-token limit of Transformer encoders and filter out irrelevant "noise" from long documents, we developed a selection algorithm. This method ranks surrounding sentences based on their cosine similarity to the target sentence. To prioritize local coherence, a decay factor ($\alpha$) is applied, favoring sentences that are physically closer to the target segment in the original text.
Experimental Results
Cont-COMET was trained on a curated dataset from WMT 2020 Direct Assessment (DA) scores across 18 language pairs and evaluated against the "gold standard" Multidimensional Quality Metrics (MQM) from WMT 2021 and 2022.
As shown in the results table above, Cont-COMET consistently outperforms the standard COMET-21 baseline. Notable improvements include:
- Segment-level Correlation: On the WMT21 TED task, Cont-COMET achieved a Kendall’s Tau of 0.265, compared to 0.254 for the baseline.
- System-level Correlation: On WMT22, it reached a Pearson correlation of 0.943, significantly higher than the baseline's 0.910.
- Optimal Context Window: Ablation studies revealed a "sweet spot" for context at approximately six surrounding sentences (three preceding and three subsequent). This configuration provides sufficient information without introducing excessive noise or degrading encoder performance.
Key Insights and Discussion
Our research highlights that training is mandatory for context integration; simply adding context at inference time to a standard model can actually decrease segment-level accuracy. Furthermore, bidirectional context (including subsequent sentences) is as vital as historical context for resolving translation ambiguities.
Despite these gains, challenges remain. The scarcity of human-annotated document-level MT data limits training depth, and the 512-token limit of current encoders remains a bottleneck. Future work will explore architectures like "Longformer" to ingest entire documents and seek methods to reduce the increased computational cost associated with processing contextual tokens.
Conclusion
Cont-COMET demonstrates that incorporating document context through specialized training and selection algorithms significantly aligns automatic MT evaluation with human judgment. By moving beyond isolated strings, we move closer to a more nuanced and accurate understanding of translation quality.
Summary updated