[Paper Review] Gradient-guided Loss Masking for Neural Machine Translation
This paper proposes Gradient-guided Loss Masking (GLMask), a dynamic data filtering method for neural machine translation that uses gradient alignment between training examples and a small set of clean data to identify and mask out harmful training samples. By masking examples with negative gradient alignment—indicating conflicting updates—GLMask improves translation performance across multiple language pairs and generalizes to out-of-domain test sets.
To mitigate the negative effect of low quality training data on the performance of neural machine translation models, most existing strategies focus on filtering out harmful data before training starts. In this paper, we explore strategies that dynamically optimize data usage during the training process using the model's gradients on a small set of clean data. At each training step, our algorithm calculates the gradient alignment between the training data and the clean data to mask out data with negative alignment. Our method has a natural intuition: good training data should update the model parameters in a similar direction as the clean data. Experiments on three WMT language pairs show that our method brings significant improvement over strong baselines, and the improvements are generalizable across test data from different domains.
Motivation & Objective
- To address the negative impact of low-quality training data on neural machine translation (NMT) performance.
- To develop a dynamic data selection strategy during training, rather than relying on pre-training filtering.
- To improve model generalization by leveraging gradient information from a small clean data set to guide training on large-scale noisy data.
- To achieve better performance on both in-domain and out-of-domain test sets without domain-specific fine-tuning.
Proposed method
- GLMask computes the dot product between the gradient of each training example and the gradient of a small clean data set to measure gradient alignment.
- Examples with negative gradient alignment are masked out, meaning their loss is not backpropagated during training.
- The method operates during training, using real-time gradient signals to dynamically adjust data usage.
- Masking is applied at both sentence and word levels, with word-level masking showing superior performance.
- The clean data set is used only to compute reference gradients and does not influence training directly beyond the alignment signal.
- The approach is inspired by meta-learning but uses a simple, efficient gradient alignment mechanism instead of complex re-weighting.
Experimental results
Research questions
- RQ1Can gradient alignment between training data and a small clean data set be used to identify and filter out harmful training examples in NMT?
- RQ2Does dynamic, gradient-based data masking during training lead to better performance than static filtering or fine-tuning?
- RQ3Can the improvements from GLMask generalize to out-of-domain test sets not seen during training?
- RQ4How does GLMask compare to strong baselines like fine-tuning on clean data in terms of in-domain and out-of-domain performance?
- RQ5What types of training examples and words are most likely to be masked by GLMask, and do they align with known noise patterns?
Key findings
- GLMask improves BLEU scores by 0.65 on en-de, 1.97 on en-zh, and 1.36 on en-fr over the vanilla NMT model on WMT test sets.
- On the IWSLT out-of-domain test set, GLMask improves over the vanilla model by 0.43 BLEU on en-de, 0.46 on en-zh, and 0.24 on en-fr, demonstrating strong generalization.
- GLMask outperforms the strong fine-tuning baseline on all three language pairs, with gains of 0.68 BLEU on en-de, 0.97 on en-zh, and 0.33 on en-fr.
- The method effectively masks out copied sentence pairs—common sources of noise—especially in noisier language pairs like en-zh and en-fr.
- Words with higher masking rates tend to be less semantically rich, such as punctuation or non-alphabetical tokens, indicating GLMask favors meaningful, content-rich words.
- GLMask at the word level consistently outperforms sentence-level masking, suggesting finer-grained control improves data selection.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.