Large language models are now routinely used in high-stakes applications where hallucinations can cause serious harm, such as medical consultations or legal advice. Existing hallucination detection methods, however, are impractical for real-world use, as they are either limited to short factual queries or require costly external verification. We present a cheap, scalable method for real-time identification of hallucinated tokens in long-form generations, and scale it effectively to 70B parameter models. Our approach targets entity-level hallucinations-e.g., fabricated names, dates, citations-rather than claim-level, thereby naturally mapping to token-level labels and enabling streaming detection. We develop an annotation methodology that leverages web search to annotate model responses with grounded labels indicating which tokens correspond to fabricated entities. This dataset enables us to train effective hallucination classifiers with simple and efficient methods such as linear probes. Evaluating across four model families, our classifiers consistently outperform baselines on long-form responses, including more expensive methods such as semantic entropy (e.g., AUC 0.90 vs 0.71 for Llama-3.3-70B), and are also an improvement in short-form question-answering settings. Despite being trained only to detect hallucinated entities, our probes effectively detect incorrect answers in mathematical reasoning tasks, indicating generalization beyond entities. While our annotation methodology is expensive, we find that annotated responses from one model can be used to train effective classifiers on other models; accordingly, we publicly release our datasets to facilitate reuse. Overall, our work suggests a promising new approach for scalable, real-world hallucination detection.


翻译:大型语言模型现已广泛应用于高风险场景,如医疗咨询或法律建议,其中幻觉可能导致严重危害。然而,现有的幻觉检测方法在实际应用中存在局限:它们要么仅适用于简短的事实性查询,要么需要昂贵的外部验证。本文提出了一种低成本、可扩展的方法,用于实时识别长文本生成中的幻觉标记,并将其有效扩展至700亿参数模型。我们的方法针对实体级幻觉(例如虚构的名称、日期、引用文献),而非主张级幻觉,从而自然地映射到标记级标签,并支持流式检测。我们开发了一种标注方法,利用网络搜索为模型响应标注基础标签,以指示哪些标记对应虚构实体。该数据集使我们能够通过简单高效的方法(如线性探针)训练有效的幻觉分类器。在四个模型系列上的评估表明,我们的分类器在长文本响应中始终优于基线方法,包括更昂贵的语义熵等方法(例如,Llama-3.3-70B的AUC为0.90对0.71),在短形式问答场景中也有改进。尽管仅针对幻觉实体进行训练,我们的探针在数学推理任务中也能有效检测错误答案,表明其能力可泛化至实体之外。虽然我们的标注方法成本较高,但我们发现从一个模型获得的标注响应可用于训练其他模型的有效分类器;为此,我们公开发布数据集以促进复用。总体而言,我们的工作为可扩展的实际应用幻觉检测提供了一条前景广阔的新途径。

0
下载
关闭预览

相关内容

实体(entity)是有可区别性且独立存在的某种事物,但它不需要是物质上的存在。尤其是抽象和法律拟制也通常被视为实体。实体可被看成是一包含有子集的集合。在哲学里,这种集合被称为客体。实体可被使用来指涉某个可能是人、动物、植物或真菌等不会思考的生命、无生命物体或信念等的事物。在这一方面,实体可以被视为一全包的词语。有时,实体被当做本质的广义,不论即指的是否为物质上的存在,如时常会指涉到的无物质形式的实体-语言。更有甚者,实体有时亦指存在或本质本身。在法律上,实体是指能具有权利和义务的事物。这通常是指法人,但也包括自然人。
大语言模型与视觉模型中的幻觉现象理解综述
专知会员服务
21+阅读 · 2025年10月2日
多模态幻觉的评估与检测综述
专知会员服务
18+阅读 · 2025年7月28日
《大型视觉语言模型中的幻觉现象》综述
专知会员服务
57+阅读 · 2024年2月2日
大型语言模型幻觉缓解技术的全面综述
专知会员服务
72+阅读 · 2024年1月3日
多模态大模型的幻觉问题与评估
专知会员服务
57+阅读 · 2023年7月28日
文本+视觉,多篇 Visual/Video BERT 论文介绍
AI科技评论
22+阅读 · 2019年8月30日
异常检测论文大列表:方法、应用、综述
专知
126+阅读 · 2019年7月15日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
论文浅尝 | 远程监督关系抽取的生成式对抗训练
开放知识图谱
17+阅读 · 2018年7月12日
白翔:趣谈“捕文捉字”-- 场景文字检测 | VALSE2017之十
深度学习大讲堂
19+阅读 · 2017年9月4日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员