ANAH-v2: Scaling Analytical Hallucination Annotation of Large Language Models

Yuzhe Gu, Ziwei Ji, Wenwei Zhang, Chengqi Lyu, Dahua Lin, Kai Chen

TL;DR

ANAH-v2 introduces an iterative self-training framework that scales hallucination annotation datasets while simultaneously boosting the accuracy of the annotator model. By applying an Expectation-Maximization (EM) approach, the authors developed a specialized 7B parameter model that outperforms GPT-4 in detecting hallucinations and significantly improves LLM faithfulness through response re-ranking.

What Problem Does This Paper Address?

Large Language Models (LLMs) frequently "hallucinate"—generating plausible but factually incorrect or unfaithful information. To fix this, researchers need large, fine-grained datasets that pinpoint exactly where and why a model went wrong.

However, creating these datasets is a massive bottleneck. Human annotation is prohibitively expensive and slow, especially for long-form content. Meanwhile, existing automated tools (even powerful ones like GPT-4) often lack the precision required for fine-grained, sentence-by-sentence analysis. There is a critical need for a scalable way to generate high-quality hallucination annotations across diverse domains without relying solely on manual labor.

Methods

The authors propose an iterative framework grounded in the Expectation-Maximization (EM) algorithm, which treats the ground-truth annotations as hidden variables.

Figure 1: Our iterative self-training framework pro- gressively scales up the hallucination annotation dataset size (left) and simultaneously increases the annotator’s accuracy (right) in three stages.

The EM Cycle

  • E-Step (Data Annotation): The current best annotator labels new, unlabeled data. To ensure quality, they use a self-consistency strategy: the model generates multiple candidate annotations, and a representative one is chosen via majority voting (for hallucination types) and cosine similarity (for reference points).
  • M-Step (Annotator Training): The model is fine-tuned on the newly expanded dataset. The training follows a specific three-phase analytical process that mimics human reasoning:
  • Factual Existence Judgment: Does the sentence even contain a verifiable fact?
  • Reference Information Extraction: What specific parts of the source document are relevant?
  • Hallucination Type Judgment: Is the sentence a "No Hallucination," a "Contradiction," or "Unverifiable"?
Figure 2: The schema of EM-based interactive self-training framework. In the E-step, given unlabeled new data from the Data Growth Flywheel, the annotator predicts N candidate outputs y. Then the representative annotation y∗is chosen via self-consistency. As a result, we construct a larger dataset by collecting the new annotations. In the M-step, we train an annotator on the larger dataset aligned to our training format. This annotation process consists of three phases: Factual Existence Judgment, Reference Information Extraction, and Hallucination Type Judgment. As a result, we gain a stronger annotator with higher accuracy.

Multi-dimensional Scaling

The framework scales the data in three stages:

  1. Seed Stage: Training on the original human-in-the-loop ANAH dataset.
  2. Response Scaling: Collecting answers from 13 different open-source LLMs for the same questions to improve the annotator's generalization across different model behaviors.
  3. Topic Scaling: Expanding the dataset to over 3,000 topics across domains like politics, health, and sports.

Datasets

  • ANAH-v2 (New): The primary contribution, featuring ~822k annotated sentences across ~196k model responses and ~3k topics in both English and Chinese.
  • HaluEval & HalluQA: Used as third-party benchmarks to test the annotator's zero-shot generalization capabilities.
  • ANAH (v1): Used as the initial seed data for Stage 1.
Figure 3: The topic distribution by chart of categories (inner) and domains (outer).

Key Insights and Ideas

  • The "Data Growth Flywheel": Scaling the dataset doesn't just provide more examples; it stabilizes the annotator's performance on unfamiliar topics and diverse model response styles.
  • Decomposed Reasoning Beats One-Shot: Breaking the annotation task into three distinct logical steps (Existence -> Extraction -> Judgment) significantly improves accuracy compared to asking a model to provide a full label in one go.
  • Specialization Trumps Scale: A 7B parameter model (based on InternLM2) specialized for this task can outperform a general-purpose giant like GPT-4. This is likely because the specialized model is trained on the specific cognitive steps required for factual verification.
  • Self-Consistency is a Noise Filter: Using multiple samplings in the E-step reduces the variance between inferred labels and true labels, leading to a much stronger training signal for the M-step.

Key Results

  • Superior Accuracy: The final ANAH-v2 Stage 3 annotator achieved 89.55% accuracy, surpassing GPT-4’s 86.97% on the same test set.
  • SOTA Performance: It set new state-of-the-art results for zero-shot hallucination detection on HaluEval (81.54%) and HalluQA (94.44%).
  • Effective Mitigation: By using the annotator to re-rank candidate responses from other LLMs, the authors improved the Natural Language Inference (NLI) faithfulness metric from 25% to 37% on HaluEval.
  • Cost Efficiency: The authors estimate their automated pipeline is roughly 40 times cheaper than traditional manual + GPT-4 assisted annotation methods.

Limitations and Future Work

  • Residual Error: Despite the scaling, a non-negligible margin of error remains in the automated annotations, which could affect model convergence.
  • EM Sensitivity: The EM algorithm is sensitive to initial conditions; the quality of the "seed" data is paramount.
  • Computational Cost: While cheaper than humans, iterative training still requires significant GPU resources (e.g., 32 A100s for 100 hours).
  • Future Directions: The authors suggest expanding to more languages, applying the framework to other tasks like dialogue generation, and integrating the annotator into fine-grained RLHF (Reinforcement Learning from Human Feedback) pipelines.

Summary updated

BibTeX
@inproceedings{gu2024anah,
  author = {Yuzhe Gu and Ziwei Ji and Wenwei Zhang and Chengqi Lyu and Dahua Lin and Kai Chen},
  title = {{ANAH-v2: Scaling Analytical Hallucination Annotation of Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=NrwASKGm7A},
}
Figure