Abstract
Training high-quality Neural Machine Translation (NMT) models requires clean data, but web-crawled corpora are notoriously noisy. This paper introduces an unsupervised method to automatically select the best cleaning filters and threshold values for a specific dataset, replacing the tedious manual tuning usually required. By clustering a small sample of data and using feature importance analysis, the authors achieve better translation quality while making the filtering process up to 40% faster.
Introduction
In the world of Neural Machine Translation (NMT), the mantra is "garbage in, garbage out." While massive parallel corpora like ParaCrawl are available, they are often riddled with "noise"—sentence pairs that are poorly translated, in the wrong language, or just plain gibberish. Tools like OpusFilter provide various filters (e.g., checking if the sentence lengths match or if the characters belong to the right alphabet) to clean this data. However, choosing which filters to use and what the numerical thresholds should be is currently a "black art," requiring manual trial and error for every new language pair. This paper aims to automate that selection process using an unsupervised approach that adapts to the unique characteristics of any given corpus.
Methodology
The authors propose a three-step automated pipeline to replace manual configuration:
- Feature Extraction: A small, random sample (100k sentence pairs) is taken from the noisy corpus. Standard OpusFilter metrics (e.g., language identification confidence, alphabet ratios) generate scores for each pair.
- Clustering: The k-means algorithm groups these pairs into "clean" and "noisy" clusters. The center of the "noisy" cluster defines the boundary for bad data in that specific corpus, setting initial filtering thresholds.
- Feature Importance (The "Pruning" Step): To avoid wasting computational resources, the cluster labels are treated as "ground truth" to train a Random Forest classifier. This identifies which features actually distinguish between clean and noisy data. If a filter (like "Length Ratio") provides negligible information gain, it is discarded before processing the full corpus.
Experimental Setup
The researchers evaluated their method using ParaCrawl v9, a large, noisy web-crawled corpus for English-German (30M pairs) and English-Ukrainian (12.6M pairs). Flores-101 was used as a development set, and WMT22 General Test Sets were used for final evaluation of translation quality.
Results and Discussion
The "Autogen" (automatically generated) filtering method was compared against both a raw baseline and OpusFilter’s default settings.
Translation Quality
Models trained on "Autogen" data outperformed the defaults in almost all metrics (BLEU, chrF, and COMET) for both language pairs. This suggests that context-aware filtering, which recognizes that noise patterns differ between language pairs (e.g., English-Ukrainian noise vs. English-German noise), is superior to "one size fits all" defaults.
Efficiency and Speed
By identifying and removing ineffective filters early, the authors significantly reduced the total compute needed. The filtering process was 25.5% faster for English-German and 40.7% faster for English-Ukrainian compared to running the full suite of default filters. Generating the custom configuration file itself adds minimal overhead, taking only one to two minutes on a standard machine.
Conclusion
This unsupervised approach effectively automates the "black art" of parallel corpus filtering. By learning what "bad" data looks like from statistical outliers within the noisy data itself, the system provides a more efficient and higher-quality alternative to manual tuning. Future work will investigate the method's effectiveness on low-resource languages and different noise types, such as synthetic back-translated data.
Summary updated