arXiv:2606.01033cs.AI2026-06被引 1

通过分析模型内部各层的熵变化,精准识别大模型幻觉。

TriLens: Per-Layer Logit-Lens Entropy for White-Box Hallucination Detection

论文配图:TriLens: Per-Layer Logit-Lens Entropy for White-Box Hallucination Detection
图 1 · 摘自论文原文
  • 在每层读取注意力、前馈和残差流的熵值,构建简洁检测信号。
  • 在多个指令微调模型与问答数据集上实现高精度幻觉检测。
  • 揭示不同模块熵变轨迹互补,为可解释性提供新视角。

当语言模型产生幻觉时,最终答案错误,但错误可能并非完全隐藏于模型内部。不同的内部路径可能保持不确定,以不同速度收敛,或在输出前选择相互竞争的延续。我们提出TriLens,一种白盒检测器,将此直觉转化为紧凑表征:在每一层,它通过模型自身的对数透镜读取多头自注意力输出、前馈输出和残差流,并仅记录每个输出的熵值。由此生成的3L维轨迹描述了深度与模块间确定性的形成过程,无需存储高维隐藏状态或多次采样生成。该简单信号在多个指令微调的大语言模型与问答基准上表现强劲,分析显示三类模块熵轨迹提供互补证据。TriLens表明,幻觉检测可受益于追踪内部计算如何收敛,而不仅关注最终层的预测。

原文摘要 · Abstract (English)

When a language model hallucinates, the final answer is wrong, but the mistake is not necessarily invisible inside the model. Different internal pathways may remain uncertain, disagree in how quickly they sharpen, or commit to competing continuations before the output is produced. We introduce TriLens, a white-box detector that turns this intuition into a compact representation: at every layer, it reads the multi-head self-attention output, the feed-forward output, and the residual stream through the model's own logit lens, then records only the entropy of each readout. The resulting 3L-dimensional trajectory describes how certainty forms across depth and across modules, without storing high-dimensional hidden states or sampling multiple generations. This simple signal yields a strong detector across instruction-tuned LLMs and QA benchmarks, and our analyses show that the three module-wise entropy trajectories provide complementary evidence. TriLens suggests that hallucination detection can benefit from tracking how internal computation settles, not only what the final layer predicts.

幻觉检测可解释性大模型

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