Parallel Corpus Filtering via Pre-trained Language Models

Boliang Zhang, Ajay Nagesh, Kevin Knight

Introduction

Modern Neural Machine Translation (NMT) systems are highly sensitive to the quality of training data. While web-crawled parallel text is abundant, it is often "noisy," containing mistranslations, boilerplate content, or incorrect language pairs. This noise significantly degrades NMT performance, especially for non-English language pairs where high-quality clean data is scarce. Researchers from DiDi Labs have addressed this by developing a high-performance filtering pipeline leveraging multilingual BERT (mBERT) for translation quality detection and GPT for domain relevance.

Methodology

The proposed filtering pipeline consists of three distinct stages designed to progressively refine the dataset:

  1. Language Detection Filter: Utilizing the fastText library, the system quickly discards sentence pairs where either the source or target text does not match the intended language.
  2. Acceptability Filter (Parallelism Check): This core component uses mBERT to map different languages into a shared vector space. The model is fine-tuned as a binary classifier to distinguish between genuine translations and synthetic noise (created by swapping words or truncating sentences). A Convolutional Neural Network (CNN) layer is added atop BERT to better capture inter-sentence relationships.
  3. Domain Filter: To ensure the text is natural and meaningful rather than "junk" (e.g., UI strings or lists), the system employs GPT models to calculate a "perplexity ratio." This helps identify human-like language versus random web noise.

Experimental Results

The method was evaluated on the WMT 2018 Parallel Corpus Filtering benchmark and a newly constructed Japanese-Chinese (JA-ZH) corpus.

WMT 2018 Benchmark

On the German-English task, the pipeline achieved state-of-the-art (SOTA) results. Specifically, on the 10M word subset, the method reached a BLEU score of 29.09, surpassing previous top-ranked supervised methods.

Table 1: Performance comparison on the WMT 2018 German-English filtering task. The proposed method (+ domain-GPT) achieves the highest BLEU scores on both 10M and 100M subsets.

Filter Quality and Thresholding

Analysis of the filter's confidence threshold reveals a robust trade-off between precision and recall. At a high confidence threshold of 0.9, the filter achieves a precision of 97.7%, ensuring that nearly all retained pairs are high-quality translations.

Figure 1: Precision and Recall of the filtering model across different probability thresholds.

Japanese-Chinese Corpus

The authors also released a filtered JA-ZH dataset containing 20.9 million parallel segments. Their "Acceptability + GPT" filter significantly outperformed LASER-based systems, improving the JA-ZH BLEU score from 23.46 to 25.53 for Japanese-to-Chinese translation.

Conclusion

By leveraging the cross-lingual priors of mBERT and the generative capabilities of GPT, this approach provides a powerful solution for cleaning noisy parallel corpora. While computationally more intensive than traditional methods, the significant gains in translation quality—particularly for non-English pairs—demonstrate the value of using large pre-trained language models for data curation. Future work will focus on expanding language coverage beyond the 104 languages currently supported by mBERT and optimizing computational efficiency.

Summary updated

BibTeX
@inproceedings{zhang2020parallel,
  author = {Boliang Zhang and Ajay Nagesh and Kevin Knight},
  title = {{Parallel Corpus Filtering via Pre-trained Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.756},
}
Figure