Hallucination Detection and Hallucination Mitigation: An Investigation

Junliang Luo, Tianyu Li, Di Wu, Michael Jenkin, Steve Liu, Gregory DudekarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) have demonstrated unprecedented capabilities in natural language understanding and generation. However, their tendency to "hallucinate"—generating text that is fluent and grammatically correct but factually inaccurate or ungrounded—remains a critical bottleneck for real-world applications. This paper provides a comprehensive review of the current state-of-the-art in hallucination detection and mitigation, categorizing existing research and identifying key challenges for future development.

Detection and Mitigation Methodologies

The research landscape is broadly divided into detection (identifying hallucinations post-generation) and mitigation (preventing hallucinations during or before generation).

Detection is typically approached at two levels of granularity:

  1. Token-level Detection: This involves identifying specific erroneous words or entities within a generated sequence. Researchers often train specialized contextual detectors on synthetic datasets, such as HADES, where factual errors are intentionally introduced into clean text.
  2. Sentence-level Detection: This broader approach evaluates the factuality of entire claims. A prominent technique is SelfCheckGPT, which leverages the model's own internal uncertainty. By sampling multiple responses to the same prompt at high temperature, the system checks for consistency; high variance across samples is a strong indicator of hallucination.
Summary of hallucination detection literature, categorizing methods by affiliation, task, and granularity.

Mitigation strategies are categorized into three main pillars:

  • Knowledge Grounding: Anchoring LLM responses in external, factual data sources like Knowledge Graphs or through Retrieval-Augmented Generation (RAG).
  • Training and Decoding Guidance: Utilizing "control codes" to enforce an objective tone or employing contrastive learning (e.g., MixCL) to help models distinguish between correct and confusingly similar incorrect entities.
  • Post-generation Correction: Using secondary "fact-checker" models to edit outputs. For instance, the HERMAN model is designed to specifically correct numerical errors in abstractive summaries.

Benchmark Datasets

The paper highlights several essential benchmarks for evaluating these systems:

  • HADES (HAllucination DEtection dataSet): A novel dataset created by perturbing Wikipedia text using BERT to create realistic, fluent hallucinations.
  • HaluEval: A large-scale collection of generated and human-annotated samples across QA, dialogue, and summarization tasks.
  • AlignScore: A unified metric trained on a massive array of alignment tasks (NLI, QA, etc.), demonstrating superior performance over task-specific metrics.

Key Insights and Discussion

A notable finding is the "Factual Hallucination" paradox in summarization: a model may include true facts not present in the source text. While technically ungrounded, these "hallucinations" can improve the quality of the output if factually correct. Additionally, the success of self-consistency methods suggests that LLMs "know" when they are guessing, as their internal stochasticity serves as a powerful signal for detecting errors without external databases.

Experimental Results

Quantitative benchmarks on the HADES dataset demonstrate the difficulty of the detection task. State-of-the-art models like RoBERTa and XLNet achieve accuracies between 70% and 73% in identifying hallucinated tokens in an offline setting.

Benchmark results for the offline setting on the HADES dataset, showing performance metrics for various baseline models.

In mitigation, the RHO model, which utilizes both local and global knowledge grounding, achieved 98.53% entity coverage in dialogue tasks, significantly outperforming standard baselines. Furthermore, AlignScore-large set a new benchmark for summary evaluation, achieving an average AUC-ROC of 88.6 on the SummaC benchmark.

Conclusion and Future Work

Despite significant progress, several "pain points" remain, including the high computational overhead of model-based detection and the difficulty of reference-free evaluation. Future research is expected to shift from "patching" models post-generation toward "pre-generation" mitigation through improved training data and more sophisticated decoding constraints.

Summary updated

BibTeX
@misc{luo2024hallucination,
  author = {Junliang Luo and Tianyu Li and Di Wu and Michael Jenkin and Steve Liu and Gregory Dudek},
  title = {{Hallucination Detection and Hallucination Mitigation: An Investigation}},
  year = {2024},
  eprint = {2401.08358},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.08358},
}
Figure