Learning Confidence for Transformer-based Neural Machine Translation

Yu Lu, Jiali Zeng, Jiajun Zhang, Shuangzhi Wu, Mu Li
3/22/2022
cs.CLcs.AI
transformer-attention

Official code: yulu-dada/Learned-conf-NMT (16 stars, Python, last commit 2022-03-11).

Abstract

Confidence estimation aims to quantify the confidence of the model prediction, providing an expectation of success. A well-calibrated confidence estimate enables accurate failure prediction and proper risk measurement when given noisy samples and out-of-distribution data in real-world settings.

Show full abstract

However, this task remains a severe challenge for neural machine translation (NMT), where probabilities from softmax distribution fail to describe when the model is probably mistaken. To address this problem, we propose an unsupervised confidence estimate learning jointly with the training of the NMT model. We explain confidence as how many hints the NMT model needs to make a correct prediction, and more hints indicate low confidence. Specifically, the NMT model is given the option to ask for hints to improve translation accuracy at the cost of some slight penalty. Then, we approximate their level of confidence by counting the number of hints the model uses. We demonstrate that our learned confidence estimate achieves high accuracy on extensive sentence/word-level quality estimation tasks. Analytical results verify that our confidence estimate can correctly assess underlying risk in two real-world scenarios: (1) discovering noisy samples and (2) detecting out-of-domain data. We further propose a novel confidence-based instance-specific label smoothing approach based on our learned confidence estimate, which outperforms standard label smoothing.

View on arXivView PDF

Code Implementations(1)

160PythonMar 11, 20224 years ago

Similar Papers

Cite this paper

@article{lu2022learning,
  title  = {Learning Confidence for Transformer-based Neural Machine Translation},
  author = {Yu Lu and Jiali Zeng and Jiajun Zhang and Shuangzhi Wu and Mu Li},
  year   = {2022},
  eprint = {2203.11413},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.11413}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.11413.svg)](https://codeofpaper.com/paper/2203.11413)

Discussion