Table of Contents
Fetching ...

Towards Long Context Hallucination Detection

Siyi Liu, Kishaloy Halder, Zheng Qi, Wei Xiao, Nikolaos Pappas, Phu Mon Htut, Neha Anna John, Yassine Benajiba, Dan Roth

TL;DR

The paper targets long-context contextual hallucination detection by introducing a dataset built on BookSum with hallucination injections and a decomposition–aggregation encoder architecture that processes long contexts via chunking and attentive aggregation. It avoids reliance on internal model states and pretraining on long-form data, achieving competitive accuracy with significantly faster inference than strong baselines. Empirical results show the method outperforms Longformer, HAT, Alignscore, RefChecker, and GPT-4o on the constructed dataset, while maintaining favorable latency, Balanced Accuracy, and MCC scores. The work provides practical resources—a dataset and a scalable model—for improving faithfulness in long-context reasoning tasks, with considerations for limitations and ethics in deployment.

Abstract

Large Language Models (LLMs) have demonstrated remarkable performance across various tasks. However, they are prone to contextual hallucination, generating information that is either unsubstantiated or contradictory to the given context. Although many studies have investigated contextual hallucinations in LLMs, addressing them in long-context inputs remains an open problem. In this work, we take an initial step toward solving this problem by constructing a dataset specifically designed for long-context hallucination detection. Furthermore, we propose a novel architecture that enables pre-trained encoder models, such as BERT, to process long contexts and effectively detect contextual hallucinations through a decomposition and aggregation mechanism. Our experimental results show that the proposed architecture significantly outperforms previous models of similar size as well as LLM-based models across various metrics, while providing substantially faster inference.

Towards Long Context Hallucination Detection

TL;DR

The paper targets long-context contextual hallucination detection by introducing a dataset built on BookSum with hallucination injections and a decomposition–aggregation encoder architecture that processes long contexts via chunking and attentive aggregation. It avoids reliance on internal model states and pretraining on long-form data, achieving competitive accuracy with significantly faster inference than strong baselines. Empirical results show the method outperforms Longformer, HAT, Alignscore, RefChecker, and GPT-4o on the constructed dataset, while maintaining favorable latency, Balanced Accuracy, and MCC scores. The work provides practical resources—a dataset and a scalable model—for improving faithfulness in long-context reasoning tasks, with considerations for limitations and ethics in deployment.

Abstract

Large Language Models (LLMs) have demonstrated remarkable performance across various tasks. However, they are prone to contextual hallucination, generating information that is either unsubstantiated or contradictory to the given context. Although many studies have investigated contextual hallucinations in LLMs, addressing them in long-context inputs remains an open problem. In this work, we take an initial step toward solving this problem by constructing a dataset specifically designed for long-context hallucination detection. Furthermore, we propose a novel architecture that enables pre-trained encoder models, such as BERT, to process long contexts and effectively detect contextual hallucinations through a decomposition and aggregation mechanism. Our experimental results show that the proposed architecture significantly outperforms previous models of similar size as well as LLM-based models across various metrics, while providing substantially faster inference.
Paper Structure (33 sections, 2 figures, 3 tables)

This paper contains 33 sections, 2 figures, 3 tables.

Figures (2)

  • Figure 1: The structure of our proposed architecture. In the attention layer, we add a new token of [CLS] at the beginning of all chunk-level CLS representations to be used as a pooled representation for the whole input, and a [SEP] between the context chunk representations and the response chunk representations to distinguish them.
  • Figure 2: ROC AUC results of Hierarchical Attention Transformer (HAT), Longformer, Alignscore, and our method.