2026· Annual Meeting of the Association for Computational Linguistics· pp. 43197-43220· 0 citations· 33 references
Computer Science
TL;DR
A lightweight Transformer-based detector is trained that uses LLM internal representations to identify hallucinations, substantially outperforming existing methods across several code generation domains and shows particular promise for enabling self-correction in LLM-based coding agents.
Abstract
Large language models (LLMs) frequently produce source code that seems correct and well-formed, yet includes hallucinated elements that cause downstream test failures. In this study, we benchmark state-of-the-art uncertainty quantification methods and existing base-lines for the task of hallucination detection in source code and introduce a diff-based pipeline to construct a code dataset annotated with line-level hallucinations. Building on this, we train a lightweight Transformer-based detector that uses LLM internal representations to identify hallucinations, substantially outperforming existing methods across several code generation domains. The detector also shows particular promise for enabling self-correction in LLM-based coding agents. We release the first publicly available dataset of line-level code hallucinations, along with the corresponding source code and trained hallucination detectors https://github.com/ datapaf/CodeHallucinationDetection
The results recast package hallucination as both a measurement problem and a decoding-time control problem, and they demonstrate that the choice of defense must be matched to the threat model and recommendation utility.
Albérick Euraste Djiré, Iyiola E. Olatunji, Melissa Tessa et al.· 1 citation
EAHC is proposed, an Execution-Anchored Hallucination Calibration reranking framework that anchors reasoning judgments to execution behavior so that execution-equivalent candidates receive consistent scores, which implements a dual-channel architecture.
Guang Yang, Xing Hu, Xiang Chen et al.· 0 citations
This work introduces the task of hallucination span detection with input-side evidence alignment, which jointly identifies hallucinated spans and aligns output tokens with the corresponding input evidence.
HallDetect, a lightweight, reference-free, and black-box framework for hallucination detection, is presented, a lightweight, reference-free, and black-box framework for hallucination detection that is evaluated not only on summarization but across a broader range of source-grounded generation settings.
Achir Oukelmoun, N. Semmar, Gäel de Chalendar· 0 citations
InnerExpert is introduced, the first method to leverage MoE-specific signals for per-token hallucination detection, and shows that InnerExpert outperforms existing methods across five datasets and two MoE architectures.
João Fonseca, Rodrigo Rodrigues, Paolo Romano· 0 citations
Fine-grained hallucination diagnosis for MLLMs is proposed, a new unified task that jointly performs hallucination detection, classification, and interpretable explanation generation and feedback experiments show that the fine-grained diagnostic explanations produced by the model effectively guide target models to correct their hallucinations.
Weilin Jin, Mingyu Wang, Wenbo Li et al.· arXiv.org· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.