Hallucination Detection in LLMs Using Spectral Features of Attention Maps

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Binkowski, Jakub, Janiak, Denis, Sawczyn, Albert, Gabrys, Bogdan, Kajdanowicz, Tomasz
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909854914838528
author Binkowski, Jakub
Janiak, Denis
Sawczyn, Albert
Gabrys, Bogdan
Kajdanowicz, Tomasz
author_facet Binkowski, Jakub
Janiak, Denis
Sawczyn, Albert
Gabrys, Bogdan
Kajdanowicz, Tomasz
contents Large Language Models (LLMs) have demonstrated remarkable performance across various tasks but remain prone to hallucinations. Detecting hallucinations is essential for safety-critical applications, and recent methods leverage attention map properties to this end, though their effectiveness remains limited. In this work, we investigate the spectral features of attention maps by interpreting them as adjacency matrices of graph structures. We propose the $\text{LapEigvals}$ method, which utilises the top-$k$ eigenvalues of the Laplacian matrix derived from the attention maps as an input to hallucination detection probes. Empirical evaluations demonstrate that our approach achieves state-of-the-art hallucination detection performance among attention-based methods. Extensive ablation studies further highlight the robustness and generalisation of $\text{LapEigvals}$, paving the way for future advancements in the hallucination detection domain.
format Preprint
id arxiv_https___arxiv_org_abs_2502_17598
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Hallucination Detection in LLMs Using Spectral Features of Attention Maps
Binkowski, Jakub
Janiak, Denis
Sawczyn, Albert
Gabrys, Bogdan
Kajdanowicz, Tomasz
Machine Learning
Artificial Intelligence
Computation and Language
Large Language Models (LLMs) have demonstrated remarkable performance across various tasks but remain prone to hallucinations. Detecting hallucinations is essential for safety-critical applications, and recent methods leverage attention map properties to this end, though their effectiveness remains limited. In this work, we investigate the spectral features of attention maps by interpreting them as adjacency matrices of graph structures. We propose the $\text{LapEigvals}$ method, which utilises the top-$k$ eigenvalues of the Laplacian matrix derived from the attention maps as an input to hallucination detection probes. Empirical evaluations demonstrate that our approach achieves state-of-the-art hallucination detection performance among attention-based methods. Extensive ablation studies further highlight the robustness and generalisation of $\text{LapEigvals}$, paving the way for future advancements in the hallucination detection domain.
title Hallucination Detection in LLMs Using Spectral Features of Attention Maps
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2502.17598