Low-Cost Black-Box Detection of LLM Hallucinations via Dynamical System Prediction
It provides a computationally efficient hallucination detection method for LLM users who need single-pass detection without sampling or external knowledge.
The paper introduces a low-cost black-box method for detecting LLM hallucinations by modeling the LLM as a dynamical system and using Koopman operator theory to compute a differential residual score, achieving state-of-the-art performance on three benchmarks with reduced resource overhead.
Large Language Models (LLMs) frequently generate plausible but non-factual content, a phenomenon known as hallucination. While existing detection methods typically rely on computationally expensive sampling-based consistency checks or external knowledge retrieval, we propose a new method that treats the LLM as a black-box dynamical system. By projecting LLM responses into a high-dimensional manifold via an embedding model, we characterize the resulting vector sequences as observable realizations of the model's latent state-space dynamics. Leveraging Koopman operator theory, we fit the transition operators for both factual and hallucinated regimes and define a differential residual score based on their respective prediction errors. To accommodate varying user requirements and domain-specific sensitivities, we introduce a preference-aware calibration mechanism that optimizes the classification threshold based on a small set of demonstrations. This approach enables low-cost hallucination detection in a single-sample pass, avoiding the need for secondary sampling or external grounding. Extensive testing across three data benchmarks demonstrates that our method achieves state-of-the-art performance with reduced resource overhead.