English

MMD-Flagger: Leveraging Maximum Mean Discrepancy to Detect Hallucinations

Computation and Language 2025-10-30 v3 Machine Learning

Abstract

Large language models (LLMs) have become pervasive in our everyday life. Yet, a fundamental obstacle prevents their use in many critical applications: their propensity to generate fluent, human-quality content that is not grounded in reality. The detection of such hallucinations is thus of the highest importance. In this work, we propose a new method to flag hallucinated content: MMD-Flagger. It relies on Maximum Mean Discrepancy (MMD), a non-parametric distance between distributions. On a high-level perspective, MMD-Flagger tracks the MMD between the output to inspect and counterparts generated with various temperature parameters. We show empirically that inspecting the shape of this trajectory is sufficient to detect most hallucinations. This novel method is benchmarked on machine translation and summarization datasets, on which it exhibits competitive performance relative to natural competitors.

Keywords

Cite

@article{arxiv.2506.01367,
  title  = {MMD-Flagger: Leveraging Maximum Mean Discrepancy to Detect Hallucinations},
  author = {Kensuke Mitsuzawa and Damien Garreau},
  journal= {arXiv preprint arXiv:2506.01367},
  year   = {2025}
}
R2 v1 2026-07-01T02:53:49.973Z