Attention Head Embeddings with Trainable Deep Kernels for Hallucination Detection in LLMs

Rodion Oblovatny, Alexandra Bazarova, Alexey Zaytsev
6/11/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

We present a novel approach for detecting hallucinations in large language models (LLMs) by analyzing the probabilistic divergence between prompt and response hidden-state distributions. Counterintuitively, we find that hallucinated responses exhibit smaller deviations from their prompts compared to grounded responses, suggesting that hallucinations often arise from superficial rephrasing rather than substantive reasoning. Leveraging this insight, we propose a model-intrinsic detection method that uses distributional distances as principled hallucination scores, eliminating the need for external knowledge or auxiliary models. To enhance sensitivity, we employ deep learnable kernels that automatically adapt to capture nuanced geometric differences between distributions. Our approach outperforms existing baselines, demonstrating state-of-the-art performance on several benchmarks. The method remains competitive even without kernel training, offering a robust, scalable solution for hallucination detection.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{oblovatny2025attention,
  title  = {Attention Head Embeddings with Trainable Deep Kernels for Hallucination Detection in LLMs},
  author = {Rodion Oblovatny and Alexandra Bazarova and Alexey Zaytsev},
  year   = {2025},
  eprint = {2506.09886},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.09886v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.09886.svg)](https://codeofpaper.com/paper/2506.09886)

Discussion