Data Filtering using Cross-Lingual Word Embeddings

Christian Herold, Jan Rosendahl, Joris Vanvinckenroye, Hermann NeyNAACL 2021

Introduction

High-quality Neural Machine Translation (NMT) systems rely on massive parallel datasets, often harvested from the web. However, web-crawled data is inherently noisy. While standard Language Identification (Language ID) tools can filter out sentences in the wrong language, they are blind to semantic mismatches—cases where two sentences are linguistically correct but are not translations of each other.

The Challenge of Misaligned Data

Traditional filtering methods often require a pre-existing "clean" corpus to train a filter model, creating a "chicken-and-egg" problem for low-resource languages. Furthermore, simple heuristics fail to address the core issue of semantic alignment.

The Language ID Blind Spot

As illustrated in Figure 1, Language ID tools have a 0% success rate in removing misaligned sentence pairs. This gap in data quality can significantly degrade NMT performance, as the model learns incorrect associations between languages.

Unsupervised Filtering with Cross-Lingual Embeddings

To address these limitations, this research introduces an unsupervised approach using Cross-Lingual Word Embeddings (CLWE). By mapping words from different languages into a shared vector space, semantic similarity can be calculated mathematically without requiring a starting dictionary or a clean parallel corpus.

Several scoring methods were evaluated:

  1. Accumulated Explanation Score: For each source word, the system checks if a corresponding translation exists among the nearest neighbors in the target sentence.
  2. Maximum Matching: Sentence pairs are modeled as bipartite graphs where edges represent word similarity. A maximum matching algorithm finds the optimal alignment, and the total weight serves as a quality score.
  3. BPE-Level Filtering: Applying these measures to sub-word units (Byte Pair Encoding) rather than full words, which proves particularly effective for morphologically rich languages like Turkish.

The Importance of Score Transformation

A key innovation in this work is the handling of "suspiciously good" scores. The authors observed that the highest-scoring pairs often consist of repetitive patterns, such as long lists of numbers or dates, which are not useful for general translation. By transforming the scores to match the distribution of a small, trusted development set, the filter can prioritize natural language over these outliers, leading to better translation quality.

Experimental Results

The proposed methods were tested across multiple language pairs, including German→English (De→En), English→Turkish (En→Tr), and English→Czech (En→Cs).

In the De→En task, the "Accumulated Explanation Scores" method improved the BLEU score from a 34.6 baseline to 35.6, outperforming more computationally expensive language model-based filters.

English-Turkish Filtering Results

The most dramatic improvements were observed in the English→Turkish task, as shown in Figure 5. Using Maximum Matching at the BPE level, the system achieved a jump from 16.1 to 18.2 BLEU on TED data. On news data (newstest2018), the improvement was even more significant, rising from 19.3 to 24.4 BLEU. These results highlight the power of sub-word level semantic filtering for complex language pairs.

Conclusion

Unsupervised filtering using cross-lingual embeddings offers a robust solution for cleaning noisy web-crawled data. By detecting semantic mismatches that Language ID misses and avoiding the need for large clean datasets, these methods provide a scalable path for improving NMT across diverse language pairs. Future research will explore integrating these filtering techniques directly into the NMT training process.

Summary updated

BibTeX
@inproceedings{herold2021data,
  author = {Christian Herold and Jan Rosendahl and Joris Vanvinckenroye and Hermann Ney},
  title = {{Data Filtering using Cross-Lingual Word Embeddings}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.15},
}
Figure