NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

G2LDetect: A Global-to-Local Approach for Hallucination Detection

Xiaoxia Cheng, Zeqi Tan, Zhe Zheng, Weiming LuAAAI 2025

TL;DR

This paper introduces G2LDetect, a novel approach to detecting hallucinations in text generated by large language models (LLMs). Instead of focusing solely on isolated local details, G2LDetect first builds a comprehensive global representation of the text as a hierarchical tree, then extracts context-aware local details for more accurate detection. This global-to-local strategy significantly improves hallucination detection, especially for longer and more complex texts.

What Problem Does This Paper Address?

Large language models (LLMs) are increasingly capable of generating human-like text, but they also suffer from a significant problem: hallucinations. These are instances where the model generates information that is factually incorrect or not supported by the provided reference material. Detecting these hallucinations is crucial for ensuring the reliability and trustworthiness of LLM-generated content, especially in applications like summarization, question answering, and content creation.

Existing hallucination detection methods often rely on extracting specific "local details" (like sentences, sub-sentences, or factual triples) directly from the text and then analyzing them. While this approach can be effective, it has a major drawback: it often ignores the broader context of the text. This can lead to isolated pieces of information being analyzed without understanding their relationship to the whole document, potentially causing missed detections (when a hallucination is spread across multiple local details) or over-detections (when a detail is flagged as a hallucination out of context). The paper argues that this lack of global understanding is a key limitation of current methods.

Methods

G2LDetect proposes a "global-to-local" strategy to overcome the limitations of existing methods. The core innovation lies in how it processes the input text:

  1. Global Representation Construction: The first step involves creating a holistic understanding of the text. This is achieved by using a pre-trained LLM (like Llama3 or GPT-4) to transform the input text into a hierarchical tree structure. This "Global Tree" represents the text's main theme at the root, with branches extending to major concepts and further sub-branches detailing specific facts or secondary ideas. This structure aims to capture relationships between different parts of the text, providing a rich, context-aware overview.
  2. Local Path Identification: Once the Global Tree is constructed, G2LDetect identifies "local details" by traversing paths within this tree. A path is defined as a sequence of connected nodes from the root to a leaf node. Each path represents a specific contextual flow, ensuring that the extracted local details are not isolated but are situated within the broader structure. This "path-wise identification" algorithm is designed to cover all relevant information and prevent missed or over-detections.
  3. Detection and Aggregation: Each identified local path is then fed into an LLM for a specific hallucination detection task, using a tailored prompt. The results from these individual path detections are aggregated using a logical AND operation to produce a final conclusion on whether the text contains hallucinations.

Datasets

The paper evaluates G2LDetect on four existing hallucination detection datasets:

  • HaluEval-Summary: Part of the HaluEval benchmark, focusing on summaries.
  • QAGS-CNNDM: From the TRUE benchmark, likely involving question-answering generation.
  • FEVER: Also from the TRUE benchmark, known for its multi-hop reasoning challenges.
  • SCIFACT: A dataset focused on scientific claims.

The authors mention sampling portions of these datasets due to resource limitations, following previous methods. They do not introduce new datasets.

Key Insights and Ideas

  • Context is King: The most significant insight is that ignoring the global context of a text is a major bottleneck in hallucination detection. By first building a global representation, G2LDetect ensures that local details are analyzed within their proper context, leading to more reliable results.
  • Hierarchical Trees for Understanding: Representing text as a hierarchical tree structure is a powerful way to capture semantic relationships and build a comprehensive understanding, mimicking human cognitive processes.
  • Path-wise Extraction for Completeness: Extracting local details via paths in the tree structure ensures that all relevant information is considered, reducing the risk of missed hallucinations that might be spread across different parts of the text.
  • LLMs as Both Generators and Detectors: The paper effectively leverages LLMs for both constructing the global representation and performing the final detection, showcasing their versatility.

Key Results

G2LDetect consistently outperforms existing methods across various LLMs (LLAMA3-8B-Instruct, ChatGPT, GPT-4) and datasets, particularly on longer texts.

  • On HaluEval-Summary and QAGS-CNNDM (datasets with longer texts), G2LDetect achieved the best F1 scores, with GPT-4 yielding F1 scores of 72.98% and 84.44%, respectively.
  • On the FEVER dataset, which involves multi-hop reasoning, G2LDetect showed improvements over the standard method and leading local-detail extraction methods.
  • On the SCIFACT dataset, G2LDetect demonstrated a 1.36% improvement in precision on ChatGPT compared to standard methods.
  • A key analysis showed that replacing the text input in existing methods (FacTool, REFCHECKER) with G2LDetect's global representation led to an average F1 score improvement of 2.2%, highlighting the benefit of the global context.

Limitations and Future Work

  • Resource Intensive: The reliance on LLMs for both global representation and detection can be computationally expensive, especially for very long texts or when using larger models.
  • Sampling: Due to resource constraints, the authors sampled data, which might not fully represent the performance on the entire original datasets.
  • Human Evaluation: While a human evaluation was conducted to assess the quality of local details, it involved a small number of annotators and a limited sample size.

The paper implicitly suggests future work could involve optimizing the LLM usage for efficiency, exploring different tree structures or global representation methods, and conducting more extensive human evaluations.

Summary updated

BibTeX
@inproceedings{cheng2025g,
  author = {Xiaoxia Cheng and Zeqi Tan and Zhe Zheng and Weiming Lu},
  title = {{G2LDetect: A Global-to-Local Approach for Hallucination Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=3Sw7hxBovK},
}
Figure