Fine-grained Hallucination Detection and Editing for Language Models

Abhika Mishra, Akari Asai, Vidhisha Balachandran, Yizhong Wang, Graham Neubig, Yulia Tsvetkov, Hannaneh Hajishirzi

TL;DR

Researchers have moved beyond simple "true or false" labels for AI hallucinations by introducing a fine-grained taxonomy of six distinct error types. They developed FAVA (FAct Vericaton with Augmentation), a retrieval-augmented model that not only detects specific hallucinated spans in text but also suggests edits to fix them, significantly outperforming GPT-4 in precision.

What Problem Does This Paper Address?

While Large Language Models (LMs) are impressively fluent, they frequently "hallucinate"—generating plausible-sounding but factually incorrect information. Most current detection methods treat this as a binary problem: a statement is either factual or it isn't.

However, the authors argue that hallucinations are not monolithic. A wrong date (an Entity error) is fundamentally different from a completely fabricated story about a non-existent person (an Invented error) or a statement that simply cannot be verified by web searches (Unverifiable). Existing systems often miss these nuances and fail to provide actionable edits. This paper addresses the need for a system that can pinpoint exactly where an error occurs, what type of error it is, and how to correct it.

Methods

The authors introduce FAVA, a retrieval-augmented language model designed for fine-grained detection and editing.

  1. Taxonomy: They defined a hierarchical taxonomy of six error types: Entity, Relation, Sentence-level contradiction, Invented information, Subjective statements, and Unverifiable claims. Overview of the taxonomy and FAVA's task
Figure 1: Overview of our taxonomy, fine-grained hallucination detection task, and FAVA.
  1. Synthetic Data Generation: To train FAVA, the team created a massive synthetic dataset (35k instances). Instead of relying on expensive human labeling, they used a "reverse" process: they took factual Wikipedia passages and prompted an LM to intentionally insert specific types of errors. This allowed them to create a gold-standard dataset where the "ground truth" of the error was known by design. The synthetic data generation pipeline
The synthetic data generation pipeline
  1. Retrieval-Augmentation: At inference time, FAVA uses a retriever (Contriever) to pull relevant documents from Wikipedia. The model then processes the LM output alongside these references to identify and edit hallucinations using a unified tagging syntax (e.g., <entity>BarcelonaMiami<entity>).

Datasets

  • FAVABENCH (New): A benchmark consisting of ~1,000 fine-grained human annotations on outputs from ChatGPT, Llama2-7B, and Llama2-70B. It covers diverse domains like biography, science, and general knowledge.
  • Training Data: 35,074 synthetic instances derived from Wikipedia and the Natural Questions (NQ) dataset.
  • Source Prompts: Queries were pulled from Open Assistant, No Robots, and WebNLG to ensure a wide variety of information-seeking scenarios.

Key Insights and Ideas

  • Hallucinations are the Norm, Not the Exception: In information-seeking tasks, the majority of responses from ChatGPT (59.8%) and Llama2-7B (70.2%) contained at least one hallucination.
  • Beyond Entities: While "Entity" errors are the most common, they only represent about half of the problem. Over 60% of hallucinations in some models consist of more complex errors like unverifiable sentences or fabricated entities.
  • The "Invented" Challenge: Errors involving totally fabricated entities are the hardest to catch because they require an "exhaustive search" to prove a negative (i.e., confirming that something doesn't exist).
  • Taxonomy Matters: By breaking down errors into a hierarchy, the researchers could identify that models like Llama2 are particularly prone to "Invented" information compared to ChatGPT. Distribution of error types across different models
Figure 3: Distribution of hallucination types in ChatGPT, Llama2-Chat-7B and Llama2-Chat- 70B outputs across four datasets of diverse information-seeking queries.

Key Results

  • Detection Superiority: FAVA outperformed retrieval-augmented ChatGPT and GPT-4 on fine-grained detection by a significant margin. On the FAVABENCH, FAVA achieved an average F1 score of 48.1, compared to GPT-4’s 34.2.
  • Effective Editing: When used to edit the outputs of other models (like Alpaca or ChatGPT), FAVA improved their factuality scores (measured by FActScore) by up to 9.3%.
  • Binary Accuracy: Even when simplified to a basic "is there an error?" task, FAVA beat specialized systems like FActScore, showing that fine-grained training helps even coarse-grained performance.

Limitations and Future Work

  • Retrieval Bottlenecks: FAVA’s performance is heavily dependent on the quality of the retrieved documents. If the retriever fails to find the "smoking gun" evidence, the model struggles to identify "Invented" or "Unverifiable" errors.
  • Context Length: The model currently considers the top five retrieved documents. The authors note that some complex errors might require searching through a much larger corpus.
  • Reasoning Errors: The current taxonomy focuses on factual errors grounded in world knowledge. It does not explicitly cover errors in common sense, numerical calculation, or logical reasoning.
  • Future Directions: The authors suggest that future iterations could integrate more sophisticated retrieval strategies and expand the taxonomy to include reasoning-based hallucinations.

Summary updated

BibTeX
@inproceedings{mishra2024fine,
  author = {Abhika Mishra and Akari Asai and Vidhisha Balachandran and Yizhong Wang and Graham Neubig and Yulia Tsvetkov and Hannaneh Hajishirzi},
  title = {{Fine-grained Hallucination Detection and Editing for Language Models}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=dJMTn3QOWO},
}
Figure