An Unsupervised System for Parallel Corpus Filtering

Viktor Hangya, Alexander M. FraserWMT (shared Task) 2018 · DOI

TL;DR

This paper presents an unsupervised system for cleaning noisy parallel corpora, crucial for training high-quality machine translation (MT) systems, especially for low-resource languages. By leveraging bilingual word embeddings trained without any parallel data, the system effectively filters out bad sentence pairs, achieving competitive results in the WMT 2018 shared task.

What Problem Does This Paper Address?

Training effective machine translation systems requires vast amounts of parallel text – sentences that are translations of each other. While web crawling can yield large quantities of such data, it's often noisy, containing misalignments, incorrect translations, or even non-parallel sentences. Cleaning this data is a significant challenge, particularly for low-resource languages where parallel data is scarce. Existing methods often rely on some form of bilingual supervision or pre-existing parallel data, limiting their applicability. This paper tackles the problem of filtering noisy parallel corpora in a fully unsupervised manner, meaning it doesn't require any initial parallel data to train the filtering system itself.

Methods

The LMU Munich system employs a three-step approach:

  1. Pre-Filtering: This initial step uses simple heuristics to quickly discard obviously bad sentence pairs. These include:
  2. Pairs with low Hunalign scores (a pre-existing alignment score).
  3. Sentences shorter than 3 tokens.
  4. Pairs with a large length difference (over 15 tokens).
  5. Pairs with a high ratio of numbers and URLs to total tokens.
  6. Pairs identified as having incorrect language labels using an external system. These pairs are assigned a score of zero and ignored in subsequent steps.

  7. Scoring: This is the core of the system, where sentence pairs are scored based on word similarities.

  8. Bilingual Word Embeddings (BWEs): The system leverages recent advancements in training BWEs without parallel data. Monolingual word embeddings for source and target languages are trained separately and then mapped into a shared space. This allows for measuring semantic similarity between words in different languages.
  9. Sentence Pair Similarity: For a given source-target sentence pair, words from the source sentence are greedily matched to the most similar words in the target sentence (using cosine similarity from the BWE dictionary). Stopwords, digits, and punctuation are removed beforehand. The average of these word-pair similarities forms the sentence pair score.
  10. Orthographic Similarity: To further improve similarity scores, especially for rare words, orthographic similarity (based on normalized Levenshtein distance) is incorporated. However, to mitigate issues with orthographically similar but semantically unrelated words (like lists of named entities), these scores are down-weighted. The final similarity score uses the higher value from the BWE-based and orthographic dictionaries.
  11. Post-Ranking: This step refines the scores to reduce redundancy and promote fluency. These steps are applied to source sentences for efficiency.
  12. Monolingual Document Similarity: Sentences with very similar structure and meaning (often template-generated) are identified. Sentence embeddings are created by averaging word embeddings. Pairs with a similarity score below a certain threshold (indicating redundancy) have their original score reduced.
  13. Language Model: A KenLM language model is used to assess the fluency of the source sentence. Sentences with very low or very high probabilities are penalized or boosted, respectively, by adjusting their score.

Datasets

  • Training/Scoring Data: The primary dataset is a German-English corpus of approximately 1 billion tokens, crawled as part of the ParaCrawl project. This data was pre-processed and aligned using tools like BiTextor, Buck and Koehn's alignment, and Hunalign.
  • Monolingual Data for Embeddings/Language Model: Monolingual German and English NewsCrawl sentences from 2011-2014 were used to train word embeddings and the language model.
  • Evaluation Data: The official evaluation used six datasets from the WMT 2018 Parallel Corpus Filtering shared task. These included newstest 2017, newstest 2018, iwslt2017, Acquis, EMEA, Global Voices, and KDE.

Key Insights and Ideas

  • Unsupervised Filtering is Viable: The most significant insight is that effective parallel corpus filtering can be achieved without any parallel data for training the filtering system itself. This is a major step towards cleaning data for low-resource languages.
  • Bilingual Word Embeddings are Powerful: The reliance on BWEs trained in an unsupervised manner proved to be a strong signal for sentence pair quality, outperforming simpler alignment scores.
  • Orthographic Cues Help: Incorporating orthographic similarity, despite its potential pitfalls, provided a valuable boost to the similarity metric, especially for less common words.
  • Pre-filtering is Crucial: The simple rule-based pre-filtering step significantly reduces noise and speeds up subsequent processing, demonstrating its importance for handling large, messy datasets.
  • Post-ranking Benefits Low-Resource Scenarios: The post-ranking steps (monolingual similarity and language modeling) were found to be more impactful for smaller training data sizes (10M tokens), suggesting they are particularly important for resource-constrained scenarios.

Key Results

  • The LMU Munich system achieved good performance in the WMT 2018 Parallel Corpus Filtering shared task, scoring only 2.17 BLEU points behind the best systems on average.
  • The system's unsupervised nature allowed it to be competitive without requiring any parallel training data, a significant advantage for low-resource languages.
  • An ablation study showed that using only the language model on top of pre-filtering and scoring yielded 20.67 BLEU, while using only document similarity yielded 21.66 BLEU (SMT 10M setup). Combining both post-ranking techniques achieved the best performance.
  • The pre-filtering step alone on newstest 2017 with SMT 10M resulted in a BLEU score of 15.53, compared to 6.88 with just the released hunalign scores, highlighting the data's noisiness and the effectiveness of the heuristics.

Limitations and Future Work

  • Hyperparameter Tuning: The authors note that the down-weighting in post-ranking steps might have been too aggressive, leading to a slight performance drop on larger datasets (100M tokens). Better fine-tuning of hyperparameters could potentially improve results.
  • NMT vs. SMT: The authors mention that their development was primarily focused on SMT, and their results are less competitive with NMT systems. Future work could explore how their filtering system integrates with NMT training more effectively.
  • Computational Efficiency: While the word-level similarity metric is designed for efficiency, the paper doesn't extensively detail the computational cost on massive datasets. Further optimization for extremely large corpora might be considered.

Summary updated

BibTeX
@inproceedings{hangya2018unsupervised,
  author = {Viktor Hangya and Alexander M. Fraser},
  title = {{An Unsupervised System for Parallel Corpus Filtering}},
  booktitle = {WMT (shared Task)},
  year = {2018},
  doi = {10.18653/v1/w18-6477},
}
Figure