基于时序多信号融合的Token级幻觉检测
文章背景与核心概要
在大语言模型(LLM)的实际应用中,幻觉现象一直是阻碍其迈向高可靠性的关键痛点。传统的Token级幻觉检测器通常仅依赖单一、孤立的信号对每个Token进行独立评估,这导致它们在生成模型表现出“自信且错误(confidently wrong)”的状态时彻底失效。为了突破这一瓶颈,该论文提出了一种全新的技术路线:将幻觉视为在时间维度上延伸的文本片段(Span),并通过序列标注(Sequence Labeling)的方式对其进行精准检测。
该研究的核心技术在于构建了一个33维的特征流,融合了文本统计特征、自然语言推理(NLI)蕴含度以及大语言模型困惑度(Surprisal),并将其输入双向门控循环单元(BiGRU)中。该方法无需访问模型的内部参数,即可在RAGTruth数据集上取得0.840的AUC,相比独立逻辑回归基线实现了高达11个百分点的性能提升。通过控制变量消融实验,作者证实性能增益主要源于时序关联而非模型容量的提升。此外,该检测器对循环网络、状态空间模型(Mamba)以及注意力机制等多种架构展现出良好的通用性,并能无缝适配闭源模型及未在训练集中出现过的新模型文本,展现出极高的工业落地价值。
📌 执行摘要
传统的Token级幻觉检测器通常使用单一信号独立评分每个Token,在生成模型“自信地出错”时往往会失效。本文提出了一种全新的方法:将幻觉视为一个在时间上延伸的片段(Span),并通过序列标注来进行检测。该方法通过一个33维的特征流(融合了文本统计、自然语言推理(NLI)蕴含度以及语言模型困惑度)对每个Token进行评分,且无需访问模型内部参数。应用在这些特征之上的双向门控循环单元(BiGRU)在RAGTruth(10个随机种子)上达到了0.840的AUC,相比独立的逻辑回归基线提升了11个百分点(\(p = 0.002\),Wilcoxon符号秩检验)。受控的分解实验表明,性能的大幅提升主要归功于时序顺序而非模型容量:证据得以从置信度高的位置传播到片段内的模糊邻居。递归、状态空间(Mamba)和注意力机制等架构都出现了相同的0.845性能上限,这表明性能瓶颈在于特征集而非模型本身。由于它仅读取生成的文本和外部信号,该检测器不仅适用于闭源模型,而且在处理训练期间未曾见过的语言模型所生成的文本时依然有效,AUC损失不到4%。
Traditional token-level hallucination detectors typically evaluate each token independently using a single isolated signal, rendering them ineffective when the generating language model is "confidently wrong."
This paper introduces a fresh approach: treating hallucinations as temporally extended spans evaluated through sequence labeling. By feeding a 33-dimensional feature stream—combining text statistics, Natural Language Inference (NLI) entailment, and language model surprisal—into a Bidirectional Gated Recurrent Unit (BiGRU) without needing access to model internals, the detector achieves state-of-the-art results while remaining compatible with closed-source models.
📋 摘要
Token级幻觉检测器从单一信号中独立对每个Token进行评分,恰恰在生成模型自信地犯错时失效。本文转而将幻觉视为一个在时间上延伸的片段,并通过序列标注来检测它:每个Token根据一个33维的特征流进行评分,该特征流融合了文本统计信息、自然语言推理(NLI)蕴含度以及语言模型困惑度,且无需访问模型内部。在这些特征之上的双向门控循环单元(BiGRU)在RAGTruth(10个种子)上达到了0.840的AUC,比独立的逻辑回归基线提升了11个点(\(p = 0.002\),Wilcoxon符号秩检验)。受控分解表明,大部分增益归因于时序顺序而非模型容量:证据在片段内从自信的位置传播到模糊的邻居。相同的0.845上限在循环、状态空间(Mamba)和注意力机制架构中重复出现,将瓶颈定位在特征集而不是模型中。由于它仅读取生成的文本和外部信号,该检测器适用于闭源模型,并且在它训练期间从未见过的语言模型生成的文本上也能持续工作,AUC损失小于4%。
Token-level hallucination detectors score each token independently from a single signal, and fail exactly when the generating model is confidently wrong. This paper instead treats hallucination as a temporally extended span and detects it by sequence labeling: each token is scored from a 33-dimensional feature stream that fuses text statistics, Natural Language Inference (NLI) entailment, and language model surprisal, with no access to model internals. A Bidirectional Gated Recurrent Unit (BiGRU) over these features reaches an AUC of 0.840 on RAGTruth (10 seeds), an 11-point gain over an independent logistic-regression baseline (\(p = 0.002\), Wilcoxon signed-rank). A controlled decomposition attributes most of the gain to temporal order rather than model capacity: evidence propagates from confident positions to ambiguous neighbors within a span. The same 0.845 ceiling recurs across recurrent, state-space (Mamba), and attention architectures, locating the bottleneck in the feature set rather than the model. Because it reads only the generated text and external signals, the detector works on closed-source models, and it keeps working on text produced by language models it never saw during training, losing under 4% AUC.
🔍 核心发现与方法论
- 序列标注方法: 模型不再将幻觉检测视为每个Token的孤立分类任务,而是将错误视为随时间连续分布的片段。
- 特征工程: 利用一个33维的特征流,结合了:
- 文本统计信息
- 自然语言推理(NLI)蕴含度得分
- 语言模型困惑度(Surprisal)指标
- 架构无关性: 在循环、状态空间(Mamba)和基于注意力机制的架构中进行了评估,它们一致触及了约 0.845 AUC 的性能上限,证明了瓶颈在于特征表示而非神经网络架构。
- 泛化能力: 由于系统独立于模型内部结构来分析外部信号和生成的文本,因此它可以与闭源模型无缝协作,并在未见过的语言模型生成的文本上保持高性能(AUC损失 \(<4\%\))。
- Sequence Labeling Approach: Instead of treating hallucination detection as isolated classification tasks per token, the model treats errors as continuous spans over time.
- Feature Engineering: Utilizes a 33-dimensional feature stream combining:
- Text statistics
- Natural Language Inference (NLI) entailment scores
- Language model surprisal metrics
- Architecture Agnosticism: Evaluated across Recurrent, State-Space (Mamba), and Attention-based architectures, all consistently hitting a performance ceiling of ~0.845 AUC, proving the bottleneck lies within the feature representations rather than the neural architecture.
- Generalizability: Because the system analyzes external signals and generated text independently of model internals, it functions seamlessly with closed-source models and maintains high performance (losing <4% AUC) on text generated by unseen language models.
📊 元数据与分类
- 学科领域: 计算与语言 (
cs.CL);人工智能 (cs.AI);机器学习 (cs.LG)- ACM 分类: I.2.7;I.2.6
- DOI 链接: 10.48550/arXiv.2608.18115
- Subjects: Computation and Language (
cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) - ACM Classes: I.2.7; I.2.6
- DOI: 10.48550/arXiv.2608.18115