On Exposure Bias, Hallucination and Domain Shift in Neural Machine Translation (2020)

Abstract: The standard training algorithm in neural machine translation (NMT) suffers from exposure bias, and alternative algorithms have been proposed to mitigate this. However, the practical impact of exposure bias is under debate. In this paper, we link exposure bias to another well-known problem in NMT, namely the tendency to generate hallucinations under domain shift. In experiments on three datasets with multiple test domains, we show that exposure bias is partially to blame for hallucinations, and that training with Minimum Risk Training, which avoids exposure bias, can mitigate this. Our analysis explains why exposure bias is more problematic under domain shift, and also links exposure bias to the beam search problem, i.e. performance deterioration with increasing beam size. Our results provide a new justification for methods that reduce exposure bias: even if they do not increase performance on in-domain test sets, they can increase model robustness to domain shift.

## introduction neural machine translation (nmt) has advanced the state of the art in mt @xcite @xcite , but is susceptible to domain shift. @xcite consider out-of-domain translation one of the key challenges in nmt. such translations may be fluent, but completely unrelated to the input (hallucinations), and their misleading nature makes them particularly problematic. we hypothesise that exposure bias @xcite , a discrepancy between training and inference, makes this problem worse. specifically, training with teacher forcing only exposes the model to gold history, while previous predictions during inference may be erroneous. thus, the model trained with teacher forcing may over-rely on previously predicted words, which would exacerbate error propagation. previous work has sought to reduce exposure bias in training @xcite @xcite @xcite . however, the relevance of error propagation is under debate: @xcite argue that its role is overstated in literature, and that linguistic features explain some of the accuracy drop at higher time steps. previous work has established a link between domain shift and hallucination in nmt @xcite . in this paper, we will aim to also establish an empirical link between hallucination and exposure bias. such a link will deepen our understanding of the hallucination problem, but also has practical relevance, e.g. to help predicting in which settings the use of sequence-level objectives is likely to be helpful. we further empirically confirm the link between exposure bias and the 'beam search problem', i.e. the fact that translation quality does not increase consistently with beam size @xcite @xcite . we base our experiments on @xmath0, and two datasets used to investigate domain robustness by @xcite : a selection of corpora from opus @xcite for @xmath1, and a low-resource @xmath2. we experiment with minimum risk training (mrt) @xcite , a training objective which inherently avoids exposure bias. our experiments show that mrt indeed improves quality more in out-of-domain settings, and reduces the amount of hallucination. our analysis of translation uncertainty also shows how the mle baseline over-estimates the probability of random translations at all but the initial time steps, and how mrt mitigates this problem. finally, we show that the beam search problem is reduced by mrt. ## minimum risk training the de-facto standard training objective in nmt is to minimize the negative log-likelihood l(θ) of the training data d foot_0 : minimum risk training (mrt) is a sequencelevel objective that avoids this problem. specifically, the objective function of mrt is the expected loss (risk) with respect to the posterior distribution: in which the loss ∆ (ỹ, y) indicates the discrepancy between the gold translation y and the model prediction ỹ. due to the intractable search space, the posterior distribution y(x) is approximated by a subspace s(x) by sampling a certain number of candidate translations, and normalizing: ## analysis bleu results indicate that mrt can improve domain robustness. in this section, we report on additional experiments to establish more direct links between exposure bias and domain robustness, hallucination, and the beam search problem. experiments are performed on @xmath3. ## conclusions our results and analysis show a connection between the exposure bias due to mle training with teacher forcing and several well-known problems in neural machine translation, namely poor performance under domain shift, hallucinated translations, and deteriorating performance with increasing beam size. we find that minimum risk training, which does not suffer from exposure bias, can be useful even when it does not increase performance on an in-domain test set: it increases performance under domain shift, reduces the number of hallucinations substantially, and makes beam search with large beams more stable. our findings are pertinent to the academic debate how big of a problem exposure bias is in practice -we find that this can vary substantially depending on the dataset -, and they provide a new justification for sequence-level training objectives that reduce or eliminate exposure bias. furthermore, we believe that a better understanding of the links between exposure bias and well-known translation problems will help practitioners decide when sequence-level training objectives are especially promising, for example in settings where the test domain is unknown, or where hallucinations are a common problem. 0 2 4 6 8 10 12 14 16 18 time step 0.2 0.4 0.6 0.8 per-token-probability reference 0 2 4 6 8 10 12 14 16 18 time step distractor mle mrt 100 updates mrt 500 updates mrt 3000 updates 0 2 4 6 8 10 12 14 16 18 time step direct comparision mle (reference) mle (distractor) mrt 3000 updates (reference) mrt 3000 updates (distractor) figure 3: per-token probability of in-domain reference translations and distractors. rightmost plot shows direct comparison for mle baseline and final mrt model. @xmath4.