TriLens: Per-Layer Logit-Lens Entropy for White-Box Hallucination Detection
Title: TriLens: Leveraging Per-Layer Logit-Lens Entropy for White-Box Hallucination Detection
Abstract: Language model hallucinations often manifest as incorrect final answers, yet the underlying errors may be detectable within the model’s internal mechanics. Distinct internal pathways can exhibit uncertainty, diverge in their rate of confidence sharpening, or advocate for conflicting continuations prior to output generation. To address this, we present TriLens, a white-box detection method that condenses these internal signals into a compact format. TriLens operates by extracting multi-head self-attention outputs, feed-forward network outputs, and residual stream data at each layer, passing them through the model’s own logit lens to calculate the entropy of each readout. This process generates a 3L-dimensional trajectory that maps the evolution of certainty across network depth and modules, eliminating the need to store high-dimensional hidden states or perform multiple sampling iterations. Our evaluations demonstrate that this straightforward metric serves as a robust detector for instruction-tuned LLMs and QA benchmarks. Furthermore, our analysis reveals that the entropy trajectories from the three distinct modules offer complementary insights. TriLens underscores the potential of monitoring how internal computations converge, rather than relying solely on the predictions of the final layer, to improve hallucination detection.
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC




