arXiv:2606.31033cs.CL2026-06

定位RAG生成中局部幻觉,提升准确率。

CORTEX: Token-Level Hallucination Detection in RAG via Comparative Internal Representations

论文配图:CORTEX: Token-Level Hallucination Detection in RAG via Comparative Internal Representations
图 1 · 摘自论文原文
  • 通过对比有无检索文档时模型内部表示差异,识别幻觉
  • 在两个基准上显著提升检测精度,各模块均有贡献
  • 适合需要精准纠错的长文本生成场景

本文提出CORTEX,一种针对检索增强生成(RAG)的细粒度令牌级幻觉检测方法。在长文本RAG输出中,幻觉常出现在局部片段而非整体。CORTEX在令牌级别识别无依据内容,实现精确定位。其核心思想是:基于检索文档的内容应比幻觉内容更受文档影响。为此,CORTEX比较大语言模型(LLM)在有无检索文档条件下的内部表示。不仅关注每个令牌对检索文档的即时敏感性,还利用前序令牌传播的文档信息,减少已吸收证据的误报。最后,通过后处理平滑步骤,建模幻觉标签在连续片段上的持续性,降低局部噪声,促进一致预测。在两个RAG基准和三个LLM上的实验表明,CORTEX显著提升令牌级幻觉检测性能,各组件均持续带来增益。

原文摘要 · Abstract (English)

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.

幻觉检测RAGLLM细粒度

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。