Beyond In-Domain Detection: SpikeScore for Cross-Domain Hallucination Detection
Yongxin Deng, Zhen Fang, Yixuan Li, Ling Chen
TL;DR
This work tackles the challenge of detecting hallucinations when training data and evaluation domains differ by proposing Generalizable Hallucination Detection (GHD) and a cross-domain instability indicator called SpikeScore. SpikeScore measures the maximum second-order difference in a trajectory of per-turn uncertainty scores across induced multi-turn continuations, capturing sharp confidence reversals more effectively than global variability. The authors provide a probabilistic lower bound on cross-domain separability via Cantelli’s inequality and validate SpikeScore across four LLM families and six benchmarks, showing superior cross-domain AUROC against strong baselines. They further demonstrate robustness in retrieval-augmented settings and under prompt variability, and show that SpikeScore remains effective even when models are trained for multi-turn consistency. The findings offer a practical, threshold-based detector with theoretical guarantees and broad applicability to real-world, pipeline-based AI systems.
Abstract
Hallucination detection is critical for deploying large language models (LLMs) in real-world applications. Existing hallucination detection methods achieve strong performance when the training and test data come from the same domain, but they suffer from poor cross-domain generalization. In this paper, we study an important yet overlooked problem, termed generalizable hallucination detection (GHD), which aims to train hallucination detectors on data from a single domain while ensuring robust performance across diverse related domains. In studying GHD, we simulate multi-turn dialogues following LLMs initial response and observe an interesting phenomenon: hallucination-initiated multi-turn dialogues universally exhibit larger uncertainty fluctuations than factual ones across different domains. Based on the phenomenon, we propose a new score SpikeScore, which quantifies abrupt fluctuations in multi-turn dialogues. Through both theoretical analysis and empirical validation, we demonstrate that SpikeScore achieves strong cross-domain separability between hallucinated and non-hallucinated responses. Experiments across multiple LLMs and benchmarks demonstrate that the SpikeScore-based detection method outperforms representative baselines in cross-domain generalization and surpasses advanced generalization-oriented methods, verifying the effectiveness of our method in cross-domain hallucination detection.
