Unsupervised Hallucination Detection by Inspecting Reasoning Processes

Ponhvoan Srey, Xiaobao Wu, Anh Tuan Luu

TL;DR

This paper introduces IRIS, a novel unsupervised method for detecting hallucinations in Large Language Models (LLMs). IRIS leverages the LLM's own reasoning process to generate "soft pseudolabels" for truthfulness, which are then used to train a lightweight classifier, achieving state-of-the-art performance without requiring human annotations.

What Problem Does This Paper Address?

Large Language Models (LLMs) like GPT-4 are incredibly powerful, but they have a tendency to "hallucinate" – generating plausible-sounding but factually incorrect information. Detecting these hallucinations is crucial for reliable LLM deployment. Existing unsupervised methods often rely on proxy signals that don't directly measure factual accuracy, leading to poor generalizability. Supervised methods, while more accurate, require expensive human labeling. This paper aims to bridge this gap by developing an unsupervised method that directly assesses factual correctness using the LLM's internal reasoning.

Methods

IRIS works by prompting an LLM to "carefully verify" a given statement. Instead of just outputting a true/false label, the LLM is asked to provide a step-by-step reasoning process. The key innovation is using the uncertainty within this reasoning process as a "soft pseudolabel" for the statement's truthfulness. This uncertainty is derived from the LLM's internal contextualized embeddings during verification. A lightweight classifier (a small feedforward MLP) is then trained on these embeddings and their corresponding pseudolabels. This approach requires only a single query per statement, making it computationally efficient and suitable for real-time detection.

Datasets

The paper evaluates IRIS on three existing hallucination detection datasets:

  • True-False dataset: A compilation of factual statements and LLM-generated statements across various topics.
  • HaluEval2: A subset of responses from ChatGPT to challenging queries.
  • HELM: LLM-generated text continuations based on Wikipedia articles.

The authors also mention preliminary investigations on mathematical reasoning datasets like Arithmetic and GSM8K.

Key Insights and Ideas

  • Reasoning as a Truth Signal: The core idea is that an LLM's confidence or uncertainty while reasoning about a statement is a more reliable indicator of its truthfulness than its direct output or superficial features.
  • Uncertainty as Soft Pseudolabels: Instead of hard true/false labels, using uncertainty from the reasoning process provides a more nuanced signal for training.
  • Internal States are Informative: The contextualized embeddings of the LLM's verification response are more informative for detecting hallucinations than embeddings of the original statement itself.
  • Efficiency: The method requires only one query per statement, significantly reducing computational cost compared to methods that sample multiple responses.
  • Unsupervised Advantage: IRIS bypasses the need for expensive human annotations, making it more scalable.

Key Results

IRIS achieves state-of-the-art performance among unsupervised methods on the evaluated datasets, outperforming baselines by significant margins (e.g., 3.2% on True-False, 7.0% on HaluEval2, and 10.2% on HELM). It demonstrates strong consistency, achieving the best accuracy on 15 out of 18 sub-datasets. While commercial models like GPT-40 perform better, IRIS achieves comparable accuracy using a much smaller 8B model. The method also shows robustness to adversarial prompts and performs well even with a small amount of training data (as few as 32 statements).

Limitations and Future Work

  • Model Variety: The current work primarily uses instruction-tuned models. Further investigation with a wider range of models and sizes could yield more insights.
  • Data Coverage: The datasets consist of single statements. Future work could extend IRIS to handle entire passages, requiring more sophisticated passage decomposition and statement filtering.
  • Interpretability: The black-box nature of internal LLM signals poses challenges for understanding why IRIS works. Enhancing transparency and explainability is an open problem.
  • Advanced Uncertainty Metrics: The paper suggests exploring more advanced uncertainty metrics (like SAR) as pseudolabels to further enhance IRIS.
  • Layer Depth: While the study shows layer depth matters, there's no definitive "best" layer, suggesting architectures that integrate embeddings from multiple layers could be beneficial.
  • Specialized Domains: Preliminary results on mathematical reasoning datasets show promise but also highlight challenges in eliciting reliable verbalized confidence, suggesting further research is needed for specialized domains.

Summary updated

BibTeX
@inproceedings{srey2025unsupervised,
  author = {Ponhvoan Srey and Xiaobao Wu and Anh Tuan Luu},
  title = {{Unsupervised Hallucination Detection by Inspecting Reasoning Processes}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure