Elamur Research⌕
☰
home / papers / 2023 / Understanding and Detecting Hallucinations in Neural Machine Translation via Model Introspection

Understanding and Detecting Hallucinations in Neural Machine Translation via Model Introspection

Paper · 2023 · Weijia Xu, Sweta Agrawal, Eleftheria Briakou et al.

Summary

Neural machine translation systems sometimes produce "detached hallucinations," which are outputs largely unrelated to the source sentence. These errors are rare in natural text, so it has been hard to study when they occur, and most existing detectors treat the model as a black box. The authors look inside a Transformer NMT model using Layerwise Relevance Propagation (LRP), which measures how much each source and target token contributes to every prediction. They built an English→Chinese counterfactual dataset by perturbing source sentences and pairing hallucinated outputs with normal translations of the unperturbed inputs. On this data they tested three hypotheses about hallucination symptoms. Two source-side patterns proved to be the clearest signals: contributions concentrated on a few source tokens, and a contribution distribution that barely changes across decoding steps. The relative weight of source versus target context mattered less. Features built from these patterns feed a lightweight classifier. On manually annotated English-Chinese and German-English hallucinations, it beats model-free baselines, quality-estimation-based detectors, and black-box detectors built on large pre-trained models, and it holds up better under domain shift.

Key points

  • Perturbations used:
    • character deletion (misspelling) with probability 0.1;
    • random title-casing with probability 0.1;
    • inserting one token at the start of the sentence, drawn from frequent, rare, or mid-frequency tokens, or punctuation.
  • Data construction: 50k seed sentence pairs were sampled from the training corpora. Hallucinations were flagged with BLEU-based heuristics:
    • the original translation must be close to the reference (BLEU > 0.3);
    • the perturbed-input output must be far from the original translation (BLEU < 0.03);
    • the perturbed-input output must not simply copy the source (BLEU < 0.5).
  • Resulting dataset: 623 contrastive pairs for misspelling, 270 for title-casing, and 1307 for insertion.
  • Hypotheses tested: Low Source Contribution (Voita et al.), Local Source Contribution (Lee et al.), and a newly formalized Static Source Contribution hypothesis. The two source-based patterns were stronger indicators than low source contribution.
  • Resources and limitations: The best detector, LRP + LASER, also looked promising in a small stress test where hallucinations were rare. The study covers only detached hallucinations and WMT-trained models. Code and data are available at github.com/weijia-xu/hallucinations-in-nmt.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works

🧭 Topics 1Research subjects and languages the work is about.Machine translation · 1,087 works

Cite

Cite as Weijia Xu, Sweta Agrawal, Eleftheria Briakou, Marianna J. Martindale and Marine Carpuat. 2023. Understanding and Detecting Hallucinations in Neural Machine Translation via Model Introspection. Transactions of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1162/tacl_a_00563

@article{xu2023understanding,
  title = {{Understanding and Detecting Hallucinations in Neural Machine Translation via Model Introspection}},
  author = {Weijia Xu, Sweta Agrawal, Eleftheria Briakou, Marianna J. Martindale and Marine Carpuat},
  journal = {Transactions of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.1162/tacl\_a\_00563},
  url = {https://doi.org/10.1162/tacl_a_00563}
}

References

1 references, 1 of them with a card of ours. ↗ leads to the work.

  1. Farhad Akhbardeh, Arkady Arkhangorodsky, Magdalena Biesialska, Ondřej Bojar, Rajen Chatterjee, Vishrav Chaudhary, Marta R. Costa-jussa, Cristina España-Bonet, Angela Fan, Christian Federmann, Markus Freitag, Yvette Graham, Roman Grundkiewicz, Barry Haddow, Leonie Harter, Kenneth Heafield, Christop… — Findings of the 2021 Conference on Machine Translation (WMT21)

Updated

This page in Markdown → https://md.research.elamur.ai/free/en/papers/xu-2023-understanding-detecting-hallucinations-neural-machine/