
Analyzing the Use of Influence Functions for Instance-Specific Data
Filtering in Neural Machine Translation
Tsz Kin Lam∗
ICL, Heidelberg University
lam@cl.uni-heidelberg.de
Eva Hasler
Amazon AI Translate
ehasler@amazon.com
Felix Hieber
Amazon AI Translate
fhieber@amazon.com
Abstract
Customer feedback can be an important signal
for improving commercial machine translation
systems. One solution for fixing specific trans-
lation errors is to remove the related erroneous
training instances followed by re-training of
the machine translation system, which we refer
to as instance-specific data filtering. Influence
functions (IF) have been shown to be effec-
tive in finding such relevant training examples
for classification tasks such as image classifi-
cation, toxic speech detection and entailment
task. Given a probing instance, IF find influen-
tial training examples by measuring the simi-
larity of the probing instance with a set of train-
ing examples in gradient space. In this work,
we examine the use of influence functions for
Neural Machine Translation (NMT). We pro-
pose two effective extensions to a state of the
art influence function and demonstrate on the
sub-problem of copied training examples that
IF can be applied more generally than hand-
crafted regular expressions.
1 Introduction
Neural Machine Translation (NMT) is the de facto
standard for recent high-quality machine transla-
tion systems. NMT, however, requires abundant
amount of bi-text for supervised training. One com-
mon approach to increase the amount of bi-text
is via data augmentation (Sennrich et al.,2015;
Edunov et al.,2018;He et al.,2019,inter alia).
Another approach is the use of web-crawled data
(Bañón et al.,2020) but since crawled data is
known to be notoriously noisy (Khayrallah and
Koehn,2018;Caswell et al.,2020), a plethora of
data filtering techniques (Junczys-Dowmunt,2018;
Wang et al.,2018;Ramírez-Sánchez et al.,2020,in-
ter alia) have been proposed for retaining a cleaner
portion of the bi-text for training.
While standard data filtering techniques aim to
improve the quality of the overall training data
∗Work done during an internship at Amazon.
without targeting the translation quality of specific
instances, instance-specific data filtering focuses
on the improvement of translation quality toward
a specific set of input sentences via removal of
the related training data. In commercial MT, this
selected set of sentences can be the problematic
translations reported by customers. One simple
approach of instance-specific data filtering in NMT
is manual filtering. In manual filtering, human
annotators identify translation errors on sentences
reported by customer and designs filtering scheme,
e.g., regular expressions to search related training
examples for removal from the training set.
In this work, we attempt to apply a more au-
tomatable technique called influence functions (IF)
which is shown to be effective on image classifi-
cation (Koh and Liang,2017), and certain NLP
tasks such as sentiment analysis, entailment and
toxic speech detection (Han et al.,2020;Guo et al.,
2020). Given a probing example, influence func-
tions (IF) search for the influential training exam-
ples by measuring the similarity of the probing
example with a set of training examples in gradi-
ent space. Schioppa et al. (2021) use a low-rank
approximation of the Hessian to speed up the com-
putation of IF and apply the idea of self-influence to
NMT. However, self-influence measures if a train-
ing instance is an outlier rather than its similar-
ity with another instance. Akyürek et al. (2022)
question the back-tracing ability of IF on the fact-
tracing task. They compare IF with heuristics used
in Information Retrieval and attribute the worse
performance of IF to a problem called saturation.
Compared to fact-tracing, the target sides of ma-
chine translation can be more diverse which com-
plicates the application of IF.
We apply an effective type of IF called TracIn
(Pruthi et al.,2020) to NMT for instance-specific
data filtering and analyze its behaviour by con-
structing synthetic training examples containing
simulated translation errors. In particular, we find
arXiv:2210.13281v1 [cs.CL] 24 Oct 2022