Skip to main content
QUICK REVIEW

[Paper Review] A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generation

Neeraj Varshney, Wenlin Yao|arXiv (Cornell University)|Jul 8, 2023
Topic ModelingComputer Science28 citations
TL;DR

The paper presents an active, two-stage approach to detect and mitigate hallucinations during LLM generation by validating uncertain concepts with retrieval-based knowledge and repairing outputs, reducing hallucinations from 47.5% to 14.5% on GPT-3.5.

ABSTRACT

Recently developed large language models have achieved remarkable success in generating fluent and coherent text. However, these models often tend to 'hallucinate' which critically hampers their reliability. In this work, we address this crucial problem and propose an approach that actively detects and mitigates hallucinations during the generation process. Specifically, we first identify the candidates of potential hallucination leveraging the model's logit output values, check their correctness through a validation procedure, mitigate the detected hallucinations, and then continue with the generation process. Through extensive experiments with GPT-3.5 (text-davinci-003) on the 'article generation task', we first demonstrate the individual efficacy of our detection and mitigation techniques. Specifically, the detection technique achieves a recall of ~88% and the mitigation technique successfully mitigates 57.6% of the correctly detected hallucinations. Importantly, our mitigation technique does not introduce new hallucinations even in the case of incorrectly detected hallucinations, i.e., false positives. Then, we show that the proposed active detection and mitigation approach successfully reduces the hallucinations of the GPT-3.5 model from 47.5% to 14.5% on average. We further demonstrate the effectiveness and wide applicability of our approach through additional studies including performance on different types of questions (multi-hop and false premise questions) and with another LLM from a different model family (Vicuna). In summary, our work contributes to improving the reliability and trustworthiness of large language models, a crucial step en route to enabling their widespread adoption in real-world applications.

Motivation & Objective

  • Improve the reliability and trustworthiness of large language models by addressing hallucinations during generation.
  • Develop an active, iterative detection and mitigation framework that operates sentence-by-sentence to curb error propagation.
  • Leverage model logits to identify uncertain concepts, validate them with retrieved knowledge, and repair hallucinations using evidence.

Proposed method

  • Identify key concepts in each generated sentence using instruction-based prompts (preferred) or entity/keyword extraction.
  • Compute concept-level uncertainty from token logits using the minimum token probability across each concept.
  • Create validation questions (Yes/No) for uncertain concepts and retrieve relevant knowledge via web search (or self-inquiry as a fallback).
  • Answer validation questions using retrieved knowledge and verify correctness against the generated sentence; if any concept fails, mitigate by removing/substituting the hallucinated content using evidence.
  • Mitigate by repairing the sentence with retrieved knowledge and optionally prepending evidence to guide next sentence generation.
  • Evaluate active detection and mitigation on GPT-3.5 (text-davinci-003) across topics, and test generality on Vicuna and multi-hop/false-premise questions.

Experimental results

Research questions

  • RQ1Can logit-based uncertainty signals detect hallucinations at the concept level?
  • RQ2Does active detection and mitigation during generation reduce hallucinations and prevent propagation to subsequent sentences?
  • RQ3How does the approach perform across different LLM families (e.g., GPT-3.5, Vicuna) and across task types (single-hop, multi-hop, false-premise questions)?
  • RQ4What is the impact of mitigation on false positives and overall output quality?

Key findings

  • Detection recall reaches about 88% for identifying potential hallucinations.
  • Mitigation succeeds in addressing 57.6% of correctly detected hallucinations while introducing hallucinations in only 3.06% of non-hallucinated cases.
  • Active approach reduces hallucinations in GPT-3.5 outputs from 47.5% to 14.5% on average.
  • The method remains effective across model families (GPT-3.5 and Vicuna) and across task types (single-hop, multi-hop, false premise).
  • Mitigation does not introduce new hallucinations even when detection yields false positives.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.