通过主动干扰生成过程,高效检测大模型幻觉。
Hallucination Detection in Large Language Models Using Diversion Decoding

- 在解码阶段主动引入干扰,捕捉模型对替代答案的抵抗能力
- 仅需少量计算开销,检测准确率显著优于现有方法
- 适合需要实时可靠输出的落地场景,如医疗、法律问答
大语言模型(LLMs)虽能实现自然流畅的人机交互,但常产生事实错误或虚构知识,影响其可信度。现有幻觉检测方法多依赖概率模型,计算成本高,实用性受限。本文提出分流解码(diversion decoding),在解码过程中主动挑战模型生成结果,提取其抵抗替代答案的能力特征,并用这些特征训练机器学习模型,构建评估模型不确定性的启发式指标。实验表明,该方法在保持高检测精度的同时,计算复杂度大幅降低,具备高效与鲁棒性,为实际应用提供可行方案。
原文摘要 · Abstract (English)
Large language models (LLMs) have emerged as a powerful tool for retrieving knowledge through seamless, human-like interactions. Despite their advanced text generation capabilities, LLMs exhibit hallucination tendencies, where they generate factually incorrect statements and fabricate knowledge, undermining their reliability and trustworthiness. Multiple studies have explored methods to evaluate LLM uncertainty and detect hallucinations. However, existing approaches are often probabilistic and computationally expensive, limiting their practical applicability. In this paper, we introduce diversion decoding, a novel method for developing an LLM uncertainty heuristic by actively challenging model-generated responses during the decoding phase. Through diversion decoding, we extract features that capture the LLM's resistance to produce alternative answers and utilize these features to train a machine-learning model to develop a heuristic measure of the LLM's uncertainty. Our experimental results demonstrate that diversion decoding outperforms existing methods with significantly lower computational complexity, making it an efficient and robust solution for evaluating hallucination detection.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。