CORTEX: Token-Level Hallucination Detection in RAG via Comparative Internal Representations
Kazuaki Furumai, Shuichiro Haruta, Kazunori Matsumoto, Daisuke Kamisaka
Abstract
In this paper, we propose CORTEX, a token-level hallucination detection method for Retrieval-Augmented Generation (RAG). In long-form RAG outputs, hallucinations often arise in localized spans rather than throughout an entire response. CORTEX therefore identifies ungrounded content at the token level, enabling fine-grained localization of hallucinations. The key intuition behind CORTEX is that tokens grounded in retrieved documents should be more strongly influenced by those documents than hallucinated tokens. To capture this document-induced effect, CORTEX compares internal representations of a large language model (LLM) under two conditions: with and without the retrieved documents. Instead of relying solely on each token's immediate sensitivity to the retrieved documents, CORTEX also leverages the propagation of document-grounded information through preceding tokens, reducing false positives for tokens whose evidence has already been absorbed into the context. Finally, CORTEX applies post-processing smoothing step that models the tendency of hallucination labels to persist over contiguous spans, reducing local noise and encouraging span-consistent predictions. Experiments on two RAG benchmarks and three LLMs show that CORTEX substantially improves token-level hallucination detection, with each component consistently contributing to performance gains.
Create a lesson
Related papers
Temporal Multi-Signal Fusion for Token-Level Hallucination Detection
Shared title terminology · Igor Itkin
Beyond Document Grounding: Span-Level Hallucination Detection over Code, Tool Output, and Documents
Shared title terminology · Ádám Kovács, Bowei He, Xue Liu et al.
Alignment without Transfer: Tokenization Impacts Cross-lingual Representations during Multilingual Language Model Pretraining
Shared title terminology · Jonathan von Rad, Pontus Stenetorp, Yao Lu
How Language Models Compress and Compare: Understanding Selection with Token Covariance Maps
Shared title terminology · Moshe Eliasof
Readable but Not Controllable: Neuron-Level Evidence for Medical LLM Hallucination
Shared title terminology · Vijay Vankadaru, Asha Matthews, Tanya Roosta et al.
How Far Can You Get Without a GPU? A Systematic Benchmark of Lightweight Hallucination Detection Across Question Answering, Dialogue, and Summarisation
Shared title terminology · Kriti Faujdar, Smit Kadvani