RefChecker: Reference-based Fine-grained Hallucination Checker and Benchmark for Large Language Models

Xiangkun Hu, Dongyu Ru, Lin Qiu, Qipeng Guo, Tianhang Zhang, Yang Xu, Yun Luo, Pengfei Liu, Yue Zhang, Zheng ZhangarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) frequently generate "hallucinations"—content that is fluent and plausible but factually incorrect. Detecting these errors is a significant challenge because hallucinations are often localized; a long response might be largely accurate while containing only a few critical factual errors.

Existing detection methods often struggle with granularity. Checking an entire response is too coarse, while sentence-level checking often fails because a single sentence can contain multiple distinct facts. To address this, the authors propose REFCHECKER, a framework that utilizes structured claim-triplets (subject, relation, object) as the fundamental unit of analysis. This fine-grained approach allows for more precise verification and aligns more closely with human judgment.

The REFCHECKER Framework

REFCHECKER operates through a two-stage automated pipeline designed to decompose and verify information systematically:

  1. Extraction (The Extractor $E$): An LLM decomposes unstructured response text into a set of knowledge triplets. For example, the sentence "The song 'I Ran' was performed by A Flock of Seagulls" is converted into the triplet [I Ran, originally performed by, A Flock of Seagulls].
  2. Checking (The Checker $C$): Each extracted triplet is compared against a reference document. Unlike binary systems, REFCHECKER employs a three-way classification:
  3. Entailment: The claim is supported by the reference.
  4. Contradiction: The claim is refuted by the reference.
  5. Neutral: The reference lacks sufficient information to verify the claim.
The REFCHECKER pipeline: Extracting claim-triplets and verifying them against a reference.

Benchmarking Hallucinations

To evaluate the framework, the authors introduced a comprehensive benchmark covering three realistic LLM interaction scenarios:

  • Zero Context (ZC): The model relies on internal memory to answer factual questions.
  • Noisy Context (NC): A Retrieval-Augmented Generation (RAG) setting where the reference may contain irrelevant or distracting information.
  • Accurate Context (AC): Tasks like summarization where the provided reference is clean and reliable.
Three evaluation scenarios for hallucination detection: Zero Context, Noisy Context, and Accurate Context.

The benchmark includes 11,000 manually annotated claim-triplets derived from 2,100 responses generated by seven prominent LLMs, including GPT-4 and Llama 2.

Key Insights and Results

The study yields several critical findings regarding the nature of hallucinations and the effectiveness of fine-grained checking:

  • Granularity Matters: Using triplets instead of whole-response checking provided a 10-point boost in Macro-F1 scores. Triplets define claim boundaries more clearly, preventing the overlap of facts and simplifying logical comparisons.
  • Superior Performance: REFCHECKER outperformed prior state-of-the-art methods, such as SelfCheckGPT and FActScore, by 6.8 to 26.1 points on the new benchmark.
  • The Role of Context: Hallucination rates (contradictions) dropped significantly from 25% in Zero Context settings to just 6% when an accurate reference was provided, highlighting the importance of high-quality context in reducing model errors.
  • Open-Source Viability: A distilled Mistral-7B model fine-tuned for triplet extraction performed comparably to proprietary models like Claude 2, suggesting that specialized, smaller models can effectively handle fact-checking tasks.

Conclusion and Future Work

REFCHECKER represents a significant advancement in the automated detection of LLM hallucinations. By focusing on claim-triplets and incorporating a "Neutral" label, the framework provides a more nuanced and accurate assessment of model faithfulness.

However, limitations remain. The current framework is optimized for local factual contexts and may struggle with complex hallucinations arising from multi-step reasoning errors. Additionally, while the system excels at identifying hallucinations, providing precise source attribution within very large documents remains a challenge for future research. Future iterations aim to expand the framework to handle non-textual data formats such as tables, code, and mathematical expressions.

Summary updated

BibTeX
@misc{hu2024refchecker,
  author = {Xiangkun Hu and Dongyu Ru and Lin Qiu and Qipeng Guo and Tianhang Zhang and Yang Xu and Yun Luo and Pengfei Liu and Yue Zhang and Zheng Zhang},
  title = {{RefChecker: Reference-based Fine-grained Hallucination Checker and Benchmark for Large Language Models}},
  year = {2024},
  eprint = {2405.14486},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.14486},
}
Figure