arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.13416cs.CL
收藏

基于时态逻辑推理增强的大语言模型事实冲突幻觉检测

Detecting LLM Fact-conflicting Hallucinations Enhanced by Temporal-logic-based Reasoning

Huazhong University of Science and Technology(华中科技大学);National University of Singapore(新加坡国立大学);University of New South Wales(新南威尔士大学);Nanyang Technological University(南洋理工大学)

Ningke Li, Yahui Song, Kailong Wang, Yuekang Li, Ling Shi, Yi Liu, Haoyu Wang

AI总结:

针对大语言模型(LLMs)的事实冲突幻觉(FCH)问题,提出基于时态逻辑推理的Drowzee框架,构建含时态特征的测试用例集,通过语义感知预言机验证推理,在9个领域的9个LLMs上有效检测出不同比率的幻觉。

摘要:

大语言模型(LLMs)面临幻觉问题——输出看似连贯但实则错误。一种特别有害的类型是事实冲突幻觉(FCH),即生成内容与既定事实相矛盾。解决FCH存在三大挑战:1)自动构建和维护大规模基准数据集困难且资源密集;2)生成LLM未训练过的复杂高效测试用例(尤其是涉及复杂时态特征的用例)具有挑战性,但对诱发幻觉至关重要;3)验证LLM输出背后的推理本质上很困难,特别是涉及复杂逻辑关系时,因为这需要模型决策过程的透明度。本文提出Drowzee,一种创新的端到端蜕变测试框架,利用时态逻辑识别LLMs中的事实冲突幻觉(FCH)。Drowzee通过爬取维基百科等来源构建全面的事实知识库,并使用自动化时态逻辑推理将这些知识转换为带有真值答案的大型可扩展测试用例集。通过基于模板的提示用这些用例测试LLMs,要求其生成答案和推理步骤。为验证推理,我们提出两个语义感知预言机,比较LLM输出与真值的语义结构。在9个知识领域的9个LLMs上,实验结果显示Drowzee有效识别非时态相关幻觉的比率为24.7%至59.8%,时态相关幻觉的比率为16.7%至39.2%。

英文摘要:

Large language models (LLMs) face the challenge of hallucinations -- outputs that seem coherent but are actually incorrect. A particularly damaging type is fact-conflicting hallucination (FCH), where generated content contradicts established facts. Addressing FCH presents three main challenges: 1) Automatically constructing and maintaining large-scale benchmark datasets is difficult and resource-intensive; 2) Generating complex and efficient test cases that the LLM has not been trained on -- especially those involving intricate temporal features -- is challenging, yet crucial for eliciting hallucinations; and 3) Validating the reasoning behind LLM outputs is inherently difficult, particularly with complex logical relationships, as it requires transparency in the model's decision-making process. This paper presents Drowzee, an innovative end-to-end metamorphic testing framework that utilizes temporal logic to identify fact-conflicting hallucinations (FCH) in large language models (LLMs). Drowzee builds a comprehensive factual knowledge base by crawling sources like Wikipedia and uses automated temporal-logic reasoning to convert this knowledge into a large, extensible set of test cases with ground truth answers. LLMs are tested using these cases through template-based prompts, which require them to generate both answers and reasoning steps. To validate the reasoning, we propose two semantic-aware oracles that compare the semantic structure of LLM outputs to the ground truths. Across nine LLMs in nine different knowledge domains, experimental results show that Drowzee effectively identifies rates of non-temporal-related hallucinations ranging from 24.7% to 59.8%, and rates of temporal-related hallucinations ranging from 16.7% to 39.2%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑