HaluNet: Multi-Granular Uncertainty Modeling for Efficient Hallucination Detection in LLM Question Answering
Chaodong Tong, Qi Zhang, Jiayang Gao, Lei Jiang, Yanbing Liu, Nannan Sun
TL;DR
HaluNet addresses the problem of hallucinations in QA by leveraging internal uncertainty signals from LLMs. It introduces a lightweight, multi-branch network that fuses token-level log-likelihoods, entropies, and semantic embeddings, trained with scalable LLM-as-a-Judge supervision. The approach achieves strong detection performance across SQuAD, TriviaQA, and NQ-Open in both context-rich and context-free settings, while maintaining low inference cost. Ablation studies show that multi-granular signals, especially embeddings from intermediate layers, are highly informative, supporting the use of layer 20 for robust detection. Overall, HaluNet offers a practical, real-time solution for robust hallucination detection in LLM-based QA systems and sets the stage for future extensions to broader QA tasks.
Abstract
Large Language Models (LLMs) excel at question answering (QA) but often generate hallucinations, including factual errors or fabricated content. Detecting hallucinations from internal uncertainty signals is attractive due to its scalability and independence from external resources. Existing methods often aim to accurately capture a single type of uncertainty while overlooking the complementarity among different sources, particularly between token-level probability uncertainty and the uncertainty conveyed by internal semantic representations, which provide complementary views on model reliability. We present \textbf{HaluNet}, a lightweight and trainable neural framework that integrates multi granular token level uncertainties by combining semantic embeddings with probabilistic confidence and distributional uncertainty. Its multi branch architecture adaptively fuses what the model knows with the uncertainty expressed in its outputs, enabling efficient one pass hallucination detection. Experiments on SQuAD, TriviaQA, and Natural Questions show that HaluNet delivers strong detection performance and favorable computational efficiency, with or without access to context, highlighting its potential for real time hallucination detection in LLM based QA systems.
