Large Language Models (LLMs) have gained significant popularity for their impressive performance across diverse fields. However, LLMs are prone to hallucinate untruthful or nonsensical outputs that fail to meet user expectations in many real-world applications. Existing works for detecting hallucinations in LLMs either rely on external knowledge for reference retrieval or require sampling multiple responses from the LLM for consistency verification, making these methods costly and inefficient. In this paper, we propose a novel reference-free, uncertainty-based method for detecting hallucinations in LLMs. Our approach imitates human focus in factuality checking from three aspects: 1) focus on the most informative and important keywords in the given text; 2) focus on the unreliable tokens in historical context which may lead to a cascade of hallucinations; and 3) focus on the token properties such as token type and token frequency. Experimental results on relevant datasets demonstrate the effectiveness of our proposed method, which achieves state-of-the-art performance across all the evaluation metrics and eliminates the need for additional information.
翻译:大语言模型(LLMs)因其在各领域的卓越表现而广受青睐。然而,LLMs 易产生不真实或无意义的输出(即“幻觉”),无法满足许多实际应用中用户的期望。现有用于检测LLMs幻觉的方法,要么依赖外部知识进行参考检索,要么需从LLM中采样多个响应进行一致性验证,导致这些方法成本高且效率低下。本文提出一种新颖的无参考、基于不确定性的LLMs幻觉检测方法。我们的方法从三个方面模拟人类在事实核查中的聚焦机制:1)聚焦给定文本中最具信息量和最重要的关键词;2)聚焦历史上下文中可能导致级联幻觉的不可靠令牌;3)关注令牌属性,如令牌类型和令牌频率。在相关数据集上的实验结果证明了所提方法的有效性。该方法在所有评估指标上均达到最优性能,且无需额外信息。