Digging Errors in NMT : Evaluating and Understanding Model Errors from Partial Hypothesis Space (2022)

Abstract: Solid evaluation of neural machine translation (NMT) is key to its understanding and improvement. Current evaluation of an NMT system is usually built upon a heuristic decoding algorithm (e.g., beam search) and an evaluation metric assessing similarity between the translation and golden reference. However, this system-level evaluation framework is limited by evaluating only one best hypothesis and search errors brought by heuristic decoding algorithms. To better understand NMT models, we propose a novel evaluation protocol, which defines model errors with model’s ranking capability over hypothesis space. To tackle the problem of exponentially large space, we propose two approximation methods, top region evaluation along with an exact top-k decoding algorithm, which finds top-ranked hypotheses in the whole hypothesis space, and Monte Carlo sampling evaluation, which simulates hypothesis space from a broader perspective. To quantify errors, we define our NMT model errors by measuring distance between the hypothesis array ranked by the model and the ideally ranked hypothesis array. After confirming the strong correlation with human judgment, we apply our evaluation to various NMT benchmarks and model architectures. We show that the state-of-the-art Transformer models face serious ranking issues and only perform at the random chance level in the top region. We further analyze model errors on architectures with different depths and widths, as well as different data-augmentation techniques, showing how these factors affect model errors. Finally, we connect model errors with the search algorithms and provide interesting findings of beam search inductive bias and correlation with Minimum Bayes Risk (MBR) decoding.

## introduction sequence-to-sequence models @xcite have shown promising results in neural machine translation (nmt), where methods typically frame a conditional probability distribution from a source sentence to a target sentence. one key to the booming of neural machine translation is the sound evaluation, which shows the trajectory to a better model design and architecture. the commonly used evaluation protocol of an nmt system comprises two main components: a search algorithm and an evaluation metric. the algorithm is responsible for decoding a translated sentence, and the metric computes the discrepancy between the generated translation and the reference. the above evaluation protocol is preferred as it is consistent with what we serve in production nmt. it has an underlying assumption that the gap between an nmt model and the ideal model can be depicted by the gap between decoded translations and references. however, this assumption does not always hold. recent literature @xcite points out that search errors brought by heuristic decoding methods would hide huge flaws of nmt models (model errors). the empty string is commonly scored with the highest probability among the model's probabilities over all hypotheses. thus, disentanglement between search algorithms and nmt models is necessary for evaluating nmt systems. previous approaches disentangle search errors and model errors. however, they only take the mode foot_0 of the hypothesis space, i.e., all hypothesis accompanied with their probabilities, to evaluate model errors, which is not comprehensive. we ask two research questions: to answer these questions, we introduce a new paradigm to evaluate model errors in hypothesis space. the decoding and evaluation of model errors need to fit the requirements of the new paradigm. for the decoding algorithm, it should be both exact (not affected by search errors) and able to access more representative part of hypothesis space. for the evaluation, it is essential to identify how good or bad these parts are quantitatively. particularly, to deal with prohibitively large search space, we introduce two approximations: the top region evaluation, alongside with an exact top-k decoding algorithm that not only avoids search errors but can access the top-ranked region of the whole hypothesis space, and the monte carlo sampling based evaluation. in addition, we provide formal definitions of evaluation in hypothesis space. we use hypothesis ranking (hr) as a proxy for measuring the distance between the model's hypothesis space and ideal hypothesis space. after confirming the strong correlation between our evaluation and human judgment, extensive experiments are conducted over three machine translation benchmarks with small, medium, and large sizes. we apply our proposed evaluation as a useful tool to analyze models and search algorithms. we identify that the state-of-the-art transformer models have weak hypothesis ranking abilities only about the random chance level in the top region. we further analyze model errors on models with different depths and widths, as well as applied with different data-augmentation techniques, showing how these affect model errors. in addition, we connect our model errors with search algorithms. specifically, with our top-region evaluation, we provide quantitative results on beam search's lucky biases. with sampling-based evaluation, we show it correlates well with the promising minimum risk decoding. 3 our contributions can be summarized as follows. ## definitions we first introduce definitions of system level, hypothesis mode and hypothesis space evaluations. ## our proposed evaluation two key designs of the evaluation over hypothesis space are the choice of distance functions and tackling the intractably large space. in this section, we first discuss our distance functions. then, we propose two methods to simulate the hypothesis space, with the topmost and sampled hypotheses respectively. ## experiments and findings in this section, we use our proposed evaluation protocol to evaluate two crucial factor of nmt systems -model architecture and search algorithm. ## conclusion this paper presents a novel evaluation protocol for model errors in the perspective of rankings over the hypothesis space. specifically, our evaluation encompasses two approximated evaluations, top region and monte carlo sampling, and two metrics, krg and kqrg, measuring the hypothesis ranking ability of hypothesis space. our evaluations correlate well with human judgments and provide interesting findings over nmt techniques and search algorithms. we believe these findings shed light on future development in the nmt field. for future directions, we think the evaluation of nmt models should disentangle with search algorithms, and assess models more comprehensively from the perspective of hypothesis space. furthermore, the effectiveness of different nmt techniques should also be re-evaluated from such a perspective. we expect multi-angle evaluations over the nmt models. errors we revealed, like the ranking errors, need to be fixed and may have connections with the well-known beam search curse problem, which is also a promising direction worth exploring.