AttentionCD: Reducing Factuality Hallucinations in Large Language Models using Task-specific Head-based Contrastive Decoding

Viju Sudhi, Regina Stodden, Philipp Cimiano


Abstract
Despite the tremendous volume of data they are trained on, Large Language Models (LLMs) can generate plausibly sounding but non-factual responses. These factually hallucinated responses reduce users’ trust in such models and hinder their adoption in safety-critical applications. Among the many training-free hallucination mitigation strategies proposed, contrastive decoding strategies have received wide attention. Most of the work in this direction explores how contrasting probability distributions from different decoder layers can help in reducing factuality hallucinations. This work, in contrast, investigates whether masking of attention heads can provide reliable contrastive signals. In particular, we propose AttentionCD, a decoding strategy that masks task-specific attention heads to yield better contrastive signals to reduce factuality hallucinations in LLMs. Our approach shows competitive performance with the existing layer-based contrastive decoding strategies and offers an average performance improvement of over +11.1% over greedy decoding across different tasks and models.
Anthology ID:
2026.uncertainlp-main.3
Volume:
The Proceedings of the Third Workshop on Uncertainty-Aware NLP
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Wilker Aziz, Jonathan Berant, Bryan Eikema, Evgenia Ilia, Marie-Catherine de Marneffe, Barbara Plank, Artem Shelmanov, Swabha Swayamdipta, Jörg Tiedemann, Artem Vazhentsev, Raúl Vázquez, Chrysoula Zerva
Venues:
UncertaiNLP | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
30–47
Language:
URL:
https://aclanthology.org/2026.uncertainlp-main.3/
DOI:
Bibkey:
Cite (ACL):
Viju Sudhi, Regina Stodden, and Philipp Cimiano. 2026. AttentionCD: Reducing Factuality Hallucinations in Large Language Models using Task-specific Head-based Contrastive Decoding. In The Proceedings of the Third Workshop on Uncertainty-Aware NLP, pages 30–47, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
AttentionCD: Reducing Factuality Hallucinations in Large Language Models using Task-specific Head-based Contrastive Decoding (Sudhi et al., UncertaiNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.uncertainlp-main.3.pdf