The Dawn After the Dark: An Empirical Study on Factuality Hallucination in Large Language Models

Junyi Li, Jie Chen, Ruiyang Ren, Xiaoxue Cheng, Wayne Xin Zhao, Jian-Yun Nie, Ji-Rong WenACL 2024 · DOI

TL;DR

This paper presents a comprehensive empirical study on factuality hallucinations in Large Language Models (LLMs), introducing a new benchmark (HaluEval 2.0) and a detection method. It systematically analyzes the sources of hallucinations across LLM training and usage stages and evaluates various mitigation techniques, offering key insights into why LLMs hallucinate and how to reduce it.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown incredible capabilities, but a persistent and critical issue is "hallucination" – generating factually incorrect but plausible-sounding content. This tendency severely hinders their reliable deployment in real-world applications where accuracy is paramount, such as medical diagnoses or financial advice. While research has touched upon detecting, understanding the causes, and mitigating these hallucinations, there's a lack of a systematic, in-depth empirical study that connects these aspects. This paper aims to fill that gap by providing a comprehensive analysis of LLM factuality hallucinations.

Methods

The authors tackle the problem by focusing on three core questions: detection, source, and mitigation.

  • Detection: They propose a two-step approach: first, extract factual statements from LLM responses using GPT-4's instruction-following capabilities, and second, use GPT-4 again to judge the factuality of these statements, considering them in relation to each other for better accuracy. They validate this method against human annotations, achieving high consistency.
  • Source Analysis: They investigate factors influencing hallucinations across different LLM stages:
  • Pre-training: Examining the impact of the scale (number of tokens) and mixture of pre-training data.
  • Supervised Fine-Tuning (SFT): Analyzing how different types of instructions (daily chat vs. task-specific) and synthesis strategies affect hallucinations.
  • Inference: Studying the effects of various decoding strategies (greedy search, top-p sampling, etc.) and quantization.
  • Prompt Design: Evaluating how task descriptions, in-context examples, and question phrasing influence hallucinations.
  • Mitigation: They implement and evaluate several existing techniques:
  • Reinforcement Learning from Human Feedback (RLHF): Fine-tuning LLMs using human preferences.
  • Retrieval Augmentation: Providing LLMs with relevant external documents.
  • Self-Reflexion: Enabling LLMs to review and correct their own outputs.
  • Advanced Decoding: Developing novel strategies to balance generation diversity and factuality.
  • Prompt Improvement: Enhancing prompts with domain information, character roles, and Chain-of-Thought (CoT) reasoning.

Datasets

  • HaluEval 2.0: A newly constructed benchmark for evaluating factuality hallucinations. It comprises 8,770 questions across five domains: biomedicine, finance, science, education, and open domain. This dataset is an extension of the previous HaluEval, incorporating more questions and domains.
  • Existing Domain Datasets: The construction of HaluEval 2.0 utilized subsets from BioASQ, NFCorpus, FiQA-2018, SciFact, LearningQ, and HotpotQA.
  • Wikipedia: Used for entity frequency analysis in pre-training.

Key Insights and Ideas

  • Pre-training Scale vs. Data Mixture: Simply increasing pre-training tokens doesn't guarantee reduced hallucinations; the type and mixture of data are crucial. Specialized data (e.g., scientific text) can significantly reduce domain-specific hallucinations, while a diverse mix of general and specialized data can sometimes lead to more hallucinations.
  • Frequency Matters: LLMs tend to hallucinate more about infrequent knowledge facts. The "long tail" of rare entities is a significant source of errors.
  • Instruction Tuning Nuances: Daily chat instructions lead to fewer hallucinations than task-specific ones. Balancing instruction complexity is key; overly complex instructions can backfire.
  • Prompting is Powerful (and Tricky): More detailed task descriptions and in-context learning generally reduce hallucinations. However, reversing prompt structure or using overly simplistic prompts can increase them. Readability, formality, and concreteness in questions also play a role, with clearer questions leading to fewer hallucinations.
  • Decoding Trade-offs: Diversity-enhancing decoding strategies can increase hallucinations in professional domains, while greedy search can worsen them in open-ended ones. Beam search offers a better balance.
  • Quantization's Double-Edged Sword: While quantization speeds up inference and reduces memory, it can significantly increase hallucinations, especially at lower bit depths (e.g., 4-bit).
  • Self-Reflexion is an Emergent Ability: Only very large models (e.g., 70B parameters) seem to benefit from self-reflexion; smaller models can actually perform worse due to over-suspecting correct answers.
  • RLHF Effectiveness Varies by Domain: RLHF is effective for mitigating hallucinations, particularly in open-ended domains, but its impact is less pronounced in highly specialized fields.

Key Results

  • HaluEval 2.0 Benchmark: Contains 8,770 questions across five domains.
  • Detection Reliability: The proposed GPT-4 based detection method achieved high consistency rates (91.5%-94.7%) compared to human annotations across different domains.
  • Model Performance Gap: Closed-source models (like ChatGPT and Claude 2) generally exhibit significantly lower hallucination rates than open-source models.
  • Domain Sensitivity: Hallucinations are more prevalent in education and open-domain questions compared to biomedicine or science.
  • RLHF Impact: RLHF alignment significantly reduced hallucination rates, especially in open domains, by making responses more concise and accurate.
  • Retrieval Augmentation: Significantly mitigated hallucinations, particularly for smaller models with limited world knowledge.
  • Self-Reflexion: Only models of significant scale (70B+) showed benefits; smaller models performed worse.

Limitations and Future Work

  • Pre-training and SFT Analysis: The study's analysis of pre-training and SFT stages is limited by the lack of disclosed training details and computational resources. Future work will involve more detailed investigations into these stages.
  • Mechanism Understanding: The authors acknowledge that the "working mechanism or nature of LLMs in generating hallucinations" is still not fully understood and requires deeper research.
  • Novel Mitigation Strategies: The paper focuses on evaluating existing mitigation techniques. Future work could involve developing new strategies based on the findings.
  • Detection Model Errors: The GPT-4 based detection approach might have minor errors, and continuous improvement is planned.
  • Prompt Engineering Nuances: The effectiveness of prompt engineering techniques like CoT is highly dependent on LLM size and domain characteristics, requiring careful consideration in future applications.

Summary updated

BibTeX
@misc{li2024dawn,
  author = {Junyi Li and Jie Chen and Ruiyang Ren and Xiaoxue Cheng and Wayne Xin Zhao and Jian-Yun Nie and Ji-Rong Wen},
  title = {{The Dawn After the Dark: An Empirical Study on Factuality Hallucination in Large Language Models}},
  year = {2024},
  eprint = {2401.03205},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.03205},
}
Figure