Recovering document annotations for sentence-level bitext

Rachel Wicks, Matt Post, Philipp Koehn

Abstract

Modern neural machine translation (MT) models are technically capable of processing long-range dependencies, yet they are predominantly trained within a "sentence-level paradigm." This is largely due to data pipelines that discard document-level metadata to maximize the volume of parallel sentence pairs. We introduce PARADOCS, a framework for reconstructing document structure from existing bitext, and SLIDE, a document-level filtering technique. Our approach demonstrates that restoring contextual "connective tissue" significantly improves translation consistency in phenomena such as gender and formality, proving that document-level data quality is often more critical than sheer sentence-level quantity.

Introduction: The Limitations of Sentence-Level MT

The current state-of-the-art in machine translation relies on massive datasets like ParaCrawl, which are often treated as "bags of sentences." While global mining techniques are effective at finding parallel segments across the web, they typically strip away the original document structure. This loss of context leads to systematic failures: models may inconsistently translate pronouns or fluctuate between formal and informal registers because they cannot "see" the surrounding text. The primary bottleneck for context-aware MT is not the model architecture, but the lack of large-scale, high-quality document-level training data.

Methodology: Reconstructing the Big Picture

To bridge this gap, we propose a two-stage process of recovery and refinement.

Document Reconstruction

We mapped existing parallel segments from ParaCrawl, News Commentary, and Europarl back to their original monolingual source documents using exact string matching. This process allows for the restoration of paragraph indices, sentence order, and character offsets, effectively turning a collection of isolated sentences back into a coherent document.

Reconstruction of document context showing paragraph, sentence, and character indices for parallel English-German text.

SLIDE Filtering

To ensure the quality of the reconstructed data, we introduced SLIDE (Sliding Window Document Evaluation). Unlike traditional bitext filtering that evaluates sentence pairs in isolation, SLIDE applies a sliding window across the document and scores chunks using a Quality Estimation (QE) model, specifically CometKiwi. This method effectively filters out documents that may contain high-quality individual sentences but lack contextual coherence—often a hallmark of documents generated by sentence-level machine translation rather than human authors.

The PARADOCS Dataset

The resulting dataset, PARADOCS, covers six language pairs (English paired with German, French, Spanish, Italian, Polish, and Portuguese). By breaking documents into "sub-documents" based on alignment gaps or boilerplate detection, we maintained high data integrity. We released several filtered subsets—LOOSE75%, MEDIUM50%, and STRICT25%—to allow for research into the trade-offs between data volume and contextual consistency.

Key Results and Insights

Our evaluation utilized standard metrics like BLEU alongside CTXPRO, a toolkit designed to measure performance on context-dependent linguistic phenomena.

  • Contextual Accuracy: On the CTXPRO English-German benchmark, our context-aware model achieved a score of 60.4 for gendered pronouns, a substantial improvement over the 45.5 score of the sentence-level baseline.
  • The "Translationese" Effect: Document-level filtering serves as an effective proxy for identifying human-translated content. By prioritizing document coherence, SLIDE naturally favors data with natural flow over disjointed machine-translated segments.
  • Quality Over Quantity: Models trained on the STRICT25% subset frequently outperformed those trained on the full DOCS set. This suggests that for context-aware tasks, the internal consistency of the document is a more powerful signal than the total number of sentence pairs.

Conclusion and Future Work

PARADOCS demonstrates that document context can be recovered from existing sentence-level resources to significantly enhance MT performance. While challenges remain—particularly in scaling these methods to low-resource languages where monolingual dumps are scarce—this work provides a path forward for the community to move beyond the sentence-level paradigm. By releasing the PARADOCS dataset and models, we aim to facilitate the development of translation systems that truly understand the "big picture."

Summary updated

BibTeX
@inproceedings{wicks2024recovering,
  author = {Rachel Wicks and Matt Post and Philipp Koehn},
  title = {{Recovering document annotations for sentence-level bitext}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.589},
}
Figure