From Flat Facts to Sharp Hallucinations: Detecting Stubborn Errors via Gradient Sensitivity

Liew, Yee Zhing, Tan, Andrew Huey Ping, Majeed, Anwar P. P. Abdul

–arXiv.org Artificial Intelligence 

Current approaches to hallucination detection predominantly frame the problem through the lens of predictive Traditional hallucination detection fails on "Stub-uncertainty. Black-box methods operate on the assumption born Hallucinations" -- errors where LLMs arethat hallucinations manifest as "confusion" (Farquhar et al., confidently wrong. We propose a geometric solu-2024; Tonolini et al., 2024). This state is typically charaction: Embedding-Perturbed Gradient Sensitivityterized by high entropy or inconsistency across stochastic (EPGS). Similarly, white-box methods often analyze static side in flat minima, stubborn hallucinations sit ininternal representations to detect deviations in the latent sharp minima, supported by brittle memorization. However, these EPGS detects this sharpness by perturbing inputuncertainty-based paradigms face a critical failure mode embeddings with Gaussian noise and measuringknown as the Stubborn Hallucination. We define Stubborn the resulting spike in gradient magnitude. This Hallucinations as factually incorrect predictions generated acts as an efficient proxy for the Hessian spec-with high confidence and stability. In these pathological trum, differentiating stable knowledge from uncases, the model has memorized an error or heuristic, restable memorization. Our experiments show thatsulting in a low-entropy output distribution that mimics the EPGS significantly outperforms entropy-basedstatistical signature of robust factual knowledge. Because and representation-based baselines, providing athe model is "confidently wrong," methods relying on output robust signal for detecting high-confidence factualconsistency or probability are rendered ineffective as they errors. In this work, we diverge from probabilistic heuristics and 1. Introductionpropose a geometric perspective on hallucination detection. Large Language Models (LLMs) have catalyzed a paradigm Drawing on generalization theory (Hochreiter & Schmidhuber, 1997; Keskar et al., 2017), we hypothesize that theshift in artificial intelligence and enabled remarkable profidistinguish-ability between facts and stubborn errors liesciency across generative and reasoning tasks. However, the not in the output probability, but in the local curvature of thedeployment of these models in critical domains is severely hindered by the phenomenon of hallucination. As illustrated in Figure 1 (left), we posit that refers to the generation of content that is fluent and co-generalized knowledge resides in flat minima.