Research

Paper

AI LLM February 20, 2026

Detecting Contextual Hallucinations in LLMs with Frequency-Aware Attention

Authors

Siya Qi, Yudong Chen, Runcong Zhao, Qinglin Zhu, Zhanghao Hu, Wei Liu, Yulan He, Zheng Yuan, Lin Gui

Abstract

Hallucination detection is critical for ensuring the reliability of large language models (LLMs) in context-based generation. Prior work has explored intrinsic signals available during generation, among which attention offers a direct view of grounding behavior. However, existing approaches typically rely on coarse summaries that fail to capture fine-grained instabilities in attention. Inspired by signal processing, we introduce a frequency-aware perspective on attention by analyzing its variation during generation. We model attention distributions as discrete signals and extract high-frequency components that reflect rapid local changes in attention. Our analysis reveals that hallucinated tokens are associated with high-frequency attention energy, reflecting fragmented and unstable grounding behavior. Based on this insight, we develop a lightweight hallucination detector using high-frequency attention features. Experiments on the RAGTruth and HalluRAG benchmarks show that our approach achieves performance gains over verification-based, internal-representation-based, and attention-based methods across models and tasks.

Metadata

arXiv ID: 2602.18145
Provider: ARXIV
Primary Category: cs.CL
Published: 2026-02-20
Fetched: 2026-02-23 05:33

Related papers

Raw Data (Debug)
{
  "raw_xml": "<entry>\n    <id>http://arxiv.org/abs/2602.18145v1</id>\n    <title>Detecting Contextual Hallucinations in LLMs with Frequency-Aware Attention</title>\n    <updated>2026-02-20T11:18:45Z</updated>\n    <link href='https://arxiv.org/abs/2602.18145v1' rel='alternate' type='text/html'/>\n    <link href='https://arxiv.org/pdf/2602.18145v1' rel='related' title='pdf' type='application/pdf'/>\n    <summary>Hallucination detection is critical for ensuring the reliability of large language models (LLMs) in context-based generation. Prior work has explored intrinsic signals available during generation, among which attention offers a direct view of grounding behavior. However, existing approaches typically rely on coarse summaries that fail to capture fine-grained instabilities in attention. Inspired by signal processing, we introduce a frequency-aware perspective on attention by analyzing its variation during generation. We model attention distributions as discrete signals and extract high-frequency components that reflect rapid local changes in attention. Our analysis reveals that hallucinated tokens are associated with high-frequency attention energy, reflecting fragmented and unstable grounding behavior. Based on this insight, we develop a lightweight hallucination detector using high-frequency attention features. Experiments on the RAGTruth and HalluRAG benchmarks show that our approach achieves performance gains over verification-based, internal-representation-based, and attention-based methods across models and tasks.</summary>\n    <category scheme='http://arxiv.org/schemas/atom' term='cs.CL'/>\n    <published>2026-02-20T11:18:45Z</published>\n    <arxiv:comment>25 pages, 10 figures</arxiv:comment>\n    <arxiv:primary_category term='cs.CL'/>\n    <author>\n      <name>Siya Qi</name>\n    </author>\n    <author>\n      <name>Yudong Chen</name>\n    </author>\n    <author>\n      <name>Runcong Zhao</name>\n    </author>\n    <author>\n      <name>Qinglin Zhu</name>\n    </author>\n    <author>\n      <name>Zhanghao Hu</name>\n    </author>\n    <author>\n      <name>Wei Liu</name>\n    </author>\n    <author>\n      <name>Yulan He</name>\n    </author>\n    <author>\n      <name>Zheng Yuan</name>\n    </author>\n    <author>\n      <name>Lin Gui</name>\n    </author>\n  </entry>"
}