D-Score: A Spectral Hidden-State Signal for Hallucination Detection in Large Language Models

2026-07-27Computation and Language

Computation and LanguageArtificial Intelligence
AI summary

The authors study how large language models sometimes create false or unsupported text, a problem called hallucination. They propose a new method called the D-Score that looks at patterns inside the model’s hidden layers after reading a sentence. The D-Score measures how complex the hidden signals are, with more complexity suggesting the model is uncertain or contradicting itself. By using this score, the authors can detect hallucinated text without needing extra tools or multiple tries. Their tests show the D-Score effectively flags such mistakes based only on the model’s internal signals.

Large Language ModelsHallucinationHidden ActivationsSingular Value DecompositionSpectral AnalysisHidden RepresentationForward PassUncertainty DetectionText GenerationModel Internal State
Authors
Bianca Raimondi, Davide Evangelista, Maurizio Gabbrielli, Elena Loli Piccolomini
Abstract
Large Language Models can produce fluent text that is false, unsupported by the available evidence, or inconsistent with information that appears to be internally represented by the model. We study hallucination detection from the geometry of hidden activations and introduce the D-Score, a simple spectral statistic computed from a single forward pass. For a fixed model, layer, and tolerance parameter, the D-Score counts how many singular directions of the hidden activation matrix have singular values that remain close to the leading one. We use this quantity as a hallucination score, classifying an input text as hallucinated when its D-Score is larger than a pre-defined quantity. The motivation is that, when a model processes a text that conflicts with information available in its own internal state, the hidden representation may encode both the asserted content and some form of counter-evidence, uncertainty, correction, or lack of support; this can make the hidden trajectory spread across additional singular directions. We formalize this intuition through a lightweight spectral argument and evaluate the resulting detector on FAVA-Annotation and RAGTruth. The experiments indicate that the D-Score is a strong hidden-state signal for hallucination detection, while requiring no external verifier, no retrieval step, and no multiple generations.