CCMatrix: Mining Billions of High-Quality Parallel Sentences on the Web

Holger Schwenk, Guillaume Wenzek, Sergey Edunov, Edouard Grave, Armand Joulin, Angela Fan

TL;DR

This paper introduces CCMatrix, a novel method for mining billions of high-quality parallel sentences from the web, significantly expanding the availability of multilingual training data. By leveraging massively multilingual sentence embeddings and a scalable, parallelized pipeline, they demonstrate state-of-the-art results in machine translation for numerous language pairs, including low-resource ones.

What Problem Does This Paper Address?

High-quality parallel sentences are crucial for training effective machine translation (MT) systems. Traditionally, these datasets are scarce, expensive to create, and often limited to formal language or specific domains (e.g., political texts from international organizations). While volunteer-contributed corpora like TED or OpenSubtitles exist, they lack scalability. Existing large-scale bitext mining methods often rely on document-level alignment, which limits the quantity of discoverable parallel sentences. This paper addresses the challenge of mining parallel data at an unprecedented scale, aiming to create a massive, diverse, and freely available resource to democratize MT research and development, especially for under-resourced languages.

Methods

The core of CCMatrix lies in its margin-based mining approach within a massively multilingual sentence embedding space. Here's a breakdown of their key techniques:

  • Massively Multilingual Sentence Embeddings: They utilize pre-trained sentence embeddings (specifically LASER, covering over 90 languages) that map sentences from different languages into a shared vector space. The key idea is that semantically similar sentences, including translations, should be close to each other in this space.
  • Margin Criterion: Instead of a simple cosine distance threshold, they employ a margin-based criterion (M(x, y)) to determine if two sentences are translations. This criterion considers the ratio of the cosine distance between sentence embeddings to the average cosine similarity of their nearest neighbors, aiming for more robust alignment.
  • Global Mining Approach: Unlike document-level methods, CCMatrix compares sentences globally across massive monolingual corpora. This allows for the discovery of parallel sentences that might not be found within the same document.
  • Scalable Parallelized Pipeline: To handle the computational challenge of billions of sentences, they developed a multi-step pipeline:
  • Text Extraction and Processing: This involves sentence splitting, deduplication, and language identification on massive Common Crawl snapshots.
  • FAISS Index Creation: For each language, they build highly optimized, compressed FAISS indices of sentence embeddings. This allows for efficient nearest neighbor search.
  • Parallel Mining: The actual mining of parallel sentence pairs is performed in parallel across language pairs, leveraging the FAISS indices.

Datasets

  • Training Data: The primary data source is Common Crawl, specifically 32 snapshots spanning from December 2017 to February 2020, totaling approximately 71 billion unique sentences across 90 languages.
  • Evaluation Benchmarks:
    • TED Corpus: Used for evaluating multilingual NMT systems on diverse language pairs, including those not aligned through English.
  • WMT'19 and WMT'20: Used to assess performance on competitive news translation tasks, particularly for high-resource language pairs.
  • WAT'20: Used to evaluate performance on low-resource, distant language pairs (specifically Russian-Japanese).

Key Insights and Ideas

  • Scalability of Margin-Based Mining: The paper demonstrates that margin-based mining, previously effective on smaller datasets, can be successfully scaled to billions of sentences by employing efficient indexing and parallel processing.
  • Quality over Quantity (with Scale): While mining billions of sentences, the margin-based approach, combined with careful threshold selection (around 1.06), yields high-quality parallel data, outperforming existing methods.
  • Democratizing Low-Resource MT: By mining a vast number of language pairs (1197 total), CCMatrix provides crucial parallel data for languages that previously lacked it, enabling research and development in previously inaccessible areas.
  • "Bridge Languages" Strategy: To manage the computational complexity of mining all possible pairs, they strategically mine all bitexts among a set of 27 "bridge languages," which helps connect various language groups without mining the full matrix.

Key Results

  • 10.8 Billion Parallel Sentences Mined: Out of 71 billion monolingual sentences, they extracted a massive 10.8 billion parallel sentences across 90 languages.
  • State-of-the-Art Performance:
    • On WMT'19, their mined data, when used to train single systems, outperformed existing single systems for English-German, English-Russian, and English-Chinese by significant margins (up to 4 BLEU points).
  • They achieved state-of-the-art results on the WAT'20 Russian-Japanese task, outperforming the best submission.
  • NMT models trained solely on CCMatrix data showed competitive results on the TED corpus, even for distant language pairs.
  • High-Quality Data Indication: Training on CCMatrix data alone often surpassed models trained on existing WMT bitexts, indicating the high quality of the mined data.

Limitations and Future Work

  • Noise in Web Data: While their filtering and mining methods are robust, web data inherently contains noise. The paper acknowledges that strict filtering might be necessary for specific applications.
  • Domain Mismatch: The mined data comes from diverse web sources, which may not perfectly align with the domains of specific test sets (e.g., news for WMT). However, their results show strong performance despite this.
  • Optimization for High-Resource Languages: For high-resource language pairs, they anticipate that further improvements could be achieved by using NMT models with more parameters and specialized architectures.
  • Future Work: The authors explicitly state that all mined bitext will be freely available, encouraging widespread research on multilingual NMT, especially for languages with limited training data. They also mention the potential for using this data to train massively multilingual NMT systems.

Summary updated

BibTeX
@inproceedings{schwenk2021ccmatrix,
  author = {Holger Schwenk and Guillaume Wenzek and Sergey Edunov and Edouard Grave and Armand Joulin and Angela Fan},
  title = {{CCMatrix: Mining Billions of High-Quality Parallel Sentences on the Web}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.507},
}
Figure