Drowzee:面向大语言模型中事实冲突型幻觉检测的蜕变测试
Drowzee: Metamorphic Testing for Fact-Conflicting Hallucination Detection in Large Language Models
AI总结:
本文提出Drowzee方法,利用逻辑编程增强蜕变测试,从Wikipedia等来源生成多样化测试用例,在六种大语言模型上检测事实冲突型幻觉,幻觉率达24.7%至59.8%,揭示了LLMs在时间概念、分布外知识和逻辑推理方面的不足。
摘要:
大语言模型(LLMs)已经改变了语言处理的格局,但在安全性、隐私以及生成看似连贯但事实不准确的输出(通常称为幻觉)方面仍面临重大挑战。在这些挑战中,一个尤为紧迫的问题是事实冲突型幻觉(Fact-Conflicting Hallucination,FCH),即大语言模型生成直接与既定事实相矛盾的内容。应对FCH是一项艰巨的任务,主要存在两个障碍:首先,自动化构建和更新基准数据集具有挑战性,因为当前方法依赖的静态基准无法覆盖多样化的FCH场景。其次,验证大语言模型输出的推理过程本身就很复杂,尤其是在涉及复杂逻辑关系时。针对这些障碍,我们提出了一种创新方法,利用逻辑编程来增强蜕变测试,以检测事实冲突型幻觉(FCH)。我们的方法从Wikipedia等来源收集数据,通过逻辑推理对其进行扩展以创建多样化的测试用例,通过结构化提示评估大语言模型,并使用语义感知评估机制验证其一致性。我们的方法在跨越九个领域的六种不同大语言模型上生成测试用例并检测幻觉,揭示幻觉率在24.7%到59.8%之间。关键观察结果表明,大语言模型在时间概念处理、分布外知识应对以及逻辑推理能力方面存在不足。结果凸显了我们的工具所生成的基于逻辑的测试用例在触发和识别幻觉方面的有效性。这些发现强调了社区内持续协作以检测和解决大语言模型幻觉问题的必要性。
英文摘要:
Large language models (LLMs) have transformed the landscape of language processing, yet struggle with significant challenges in terms of security, privacy, and the generation of seemingly coherent but factually inaccurate outputs, commonly referred to as hallucinations. Among these challenges, one particularly pressing issue is Fact-Conflicting Hallucination (FCH), where LLMs generate content that directly contradicts established facts. Tackling FCH poses a formidable task due to two primary obstacles: Firstly, automating the construction and updating of benchmark datasets is challenging, as current methods rely on static benchmarks that don't cover the diverse range of FCH scenarios. Secondly, validating LLM outputs' reasoning process is inherently complex, especially with intricate logical relations involved. In addressing these obstacles, we propose an innovative approach leveraging logic programming to enhance metamorphic testing for detecting Fact-Conflicting Hallucinations (FCH). Our method gathers data from sources like Wikipedia, expands it with logical reasoning to create diverse test cases, assesses LLMs through structured prompts, and validates their coherence using semantic-aware assessment mechanisms. Our method generates test cases and detects hallucinations across six different LLMs spanning nine domains, revealing hallucination rates ranging from 24.7% to 59.8%. Key observations indicate that LLMs encounter challenges, particularly with temporal concepts, handling out-of-distribution knowledge, and exhibiting deficiencies in logical reasoning capabilities. The outcomes underscore the efficacy of logic-based test cases generated by our tool in both triggering and identifying hallucinations. These findings underscore the imperative for ongoing collaborative endeavors within the community to detect and address LLM hallucinations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。