The Curious Case of Hallucinations in Neural Machine Translation
Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/2021.naacl-main.92.pdf
Summary
Neural machine translation systems sometimes produce output that reads fluently but has almost nothing to do with the source sentence. This paper asks why such hallucinations occur. The authors split them into two kinds. The first kind appears when the input is slightly perturbed. The second kind is natural, arising from unmodified input, and comes in two forms: detached outputs and oscillatory outputs with repeating n-grams.
For the perturbation case, they adapt Feldman and Zhang's Memorization Value Estimator to sequence-to-sequence models, replacing accuracy with chrF or BLEU. Using Transformer models trained on IWSLT-2014 De-En, they show that the most memorized training samples hallucinate far more often when perturbed than random samples do. This links the effect to Feldman's long-tail theory.
For natural hallucinations, they inject specific corpus-level noise patterns into the training data and reproduce both hallucination types. They also show that backtranslation and sequence-level knowledge distillation amplify hallucinations. These findings point to data filtering and robust training as remedies.
Key points
- Memorization values come from 10 fairseq Transformer models, each with 6 layers and 42M parameters. Each model is trained on a random subset of about 101K pairs drawn from the 160K-pair IWSLT-2014 De-En corpus, using joint BPE with a 10K vocabulary.
- Perturbation hallucinations are detected with a modified version of the Lee et al. (2018) algorithm. It inserts one of 30 frequent tokens, sampled from the top 100, at the first position of the word-tokenized input.
- In the reported setting, the 100 most memorized samples gave 51 unique (431 total) perturbation hallucinations, compared with 1 (1) for a random set of the same size.
- The amplification experiments generated backtranslations of 1M English sentences from WMT 17 De-En by sampling, using models trained on noised corpora (RR, UU, UR, RU). Knowledge-distillation data was built over the IWSLT 2014 training set.
- Datasets and code are released at github.com/vyraun/hallucinations.
Cited by
- Findings of the WMT 2023 Shared Task on Quality Estimation
- Benchmarking Large Language Models in Retrieval-Augmented Generation
- Hallucinations in Large Multilingual Translation Models
- xCOMET: Transparent Machine Translation Evaluation through Fine-grained Error Detection
- Survey of Low-Resource Machine Translation
- Survey of Hallucination in Natural Language Generation
- Context Volume Drives Performance: Tackling Domain Shift in Extremely Low-Resource Translation via RAG
- Trustworthy LLMs: a Survey and Guideline for Evaluating Large Language Models' Alignment
- Hallucination is Inevitable: An Innate Limitation of Large Language Models
- How Language Model Hallucinations Can Snowball
Cite
@inproceedings{raunak2021curious,
title = {{The Curious Case of Hallucinations in Neural Machine Translation}},
author = {Raunak, Vikas and Menezes, Arul and Junczys-Dowmunt, Marcin},
booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
year = {2021},
doi = {10.18653/v1/2021.naacl-main.92},
url = {https://doi.org/10.18653/v1/2021.naacl-main.92}
}References
- Mikel Artetxe and Holger Schwenk. 2019. Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and Beyond. Transactions of the Association for Computational Linguistics, 7:597–610. find our card
- Satanjeev Banerjee and Alon Lavie. 2005. METEOR: An automatic metric for MT evaluation with improved correlation with human judgments. In Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, pages 65–72, Ann Arbor, Michigan. Ass… find our card
- Alexandre Berard, Ioan Calapodescu, and Claude Roux. 2019. Naver labs Europe’s systems for the WMT19 machine translation robustness task. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 526–532, Florence, Italy. Association for Computationa… find
- Yong Cheng, Lu Jiang, and Wolfgang Macherey. 2019. Robust neural machine translation with doubly adversarial inputs. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4324–4333, Florence, Italy. Association for Computational Linguistics. find
- Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 489–500, Brussels, Belgium. Association for Computational Linguistics. find
- Vitaly Feldman. 2020. Does learning require memorization? a short tale about a long tail. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2020, page 954–959, New York, NY, USA. Association for Computing Machinery. find
- Vitaly Feldman and Chiyuan Zhang. 2020. What neural networks memorize and why: Discovering the long tail via influence estimation. Advances in Neural Information Processing Systems, 33. find
- Marcin Junczys-Dowmunt. 2018. Dual conditional cross-entropy filtering of noisy parallel corpora. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 888–895, Belgium, Brussels. Association for Computational Linguistics. find
- Daniel Kang and Tatsunori Hashimoto. 2020. Improved natural language generation via loss truncation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 718–731, Online. Association for Computational Linguistics. find
- Yoon Kim and Alexander M. Rush. 2016. Sequence-level knowledge distillation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1317–1327, Austin, Texas. Association for Computational Linguistics. find our card
- Philipp Koehn and Rebecca Knowles. 2017. Six challenges for neural machine translation. In Proceedings of the First Workshop on Neural Machine Translation, pages 28–39, Vancouver. Association for Computational Linguistics. find
- Katherine Lee, Orhan Firat, Ashish Agarwal, Clara Fannjiang, and David Sussillo. 2018. Hallucinations in neural machine translation. In NIPS 2018 Interpretability and Robustness for Audio, Speech and Language Workshop. find
- Tian Li, Ahmad Beirami, Maziar Sanjabi, and Virginia Smith. 2021. Tilted empirical risk minimization. In International Conference on Learning Representations. find
- Marianna Martindale, Marine Carpuat, Kevin Duh, and Paul McNamee. 2019. Identifying fluently inadequate output in neural and statistical machine translation. In Proceedings of Machine Translation Summit XVII Volume 1: Research Track, pages 233–243, Dublin, Ireland. European Association for Machine T… find
- Mathias Müller, Annette Rios, and Rico Sennrich. 2020. Domain robustness in neural machine translation. In Proceedings of the 14th Conference of the Association for Machine Translation in the Americas (Volume 1: Research Track), pages 151–164, Virtual. Association for Machine Translation in the Amer… find
- Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstr… find our card
- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311–318, Philadelphia, Pennsylvania, USA. Association for Computational… find our card
- Maja Popović. 2015. chrF: character n-gram F-score for automatic MT evaluation. In Proceedings of the Tenth Workshop on Statistical Machine Translation, pages 392–395, Lisbon, Portugal. Association for Computational Linguistics. find our card
- Vikas Raunak, Siddharth Dalmia, Vivek Gupta, and Florian Metze. 2020. On long-tailed phenomena in neural machine translation. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3088–3095, Online. Association for Computational Linguistics. find
- Holger Schwenk. 2018. Filtering and mining parallel data in a joint multilingual space. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 228–234, Melbourne, Australia. Association for Computational Linguistics. find