测试大模型在逻辑查询下的一致性,发现其易出错且可改进。
Logical Consistency of Large Language Models in Fact-checking
- 构建基于知识图谱的逻辑事实核查数据集,评估模型对复杂逻辑表达的理解。
- 实验证明现有大模型在含否定、合取等逻辑操作的查询中一致性差。
- 通过监督微调提升模型在复杂逻辑任务中的推理一致性,适合安全敏感场景使用。
近年来,大语言模型(LLMs)在机器翻译、问答、摘要和事实核查等自然语言任务中表现卓越。尽管生成文本能力出色,但其响应不一致问题严重——输入语义不变时输出却可能矛盾,这导致幻觉等漏洞。现有研究多关注简单改写的一致性评估,忽视了需深层逻辑推理的复杂查询。本文聚焦于包含否定、合取、析取等基础逻辑运算符的复杂逻辑查询下的模型不一致性问题。以知识图谱(KGs)为背景,设计检索增强型大模型在命题逻辑查询上的事实核查任务作为测试基准。贡献有三:1)提出三个面向社区的逻辑事实核查数据集;2)设计逻辑一致性评估指标,证明现有模型在复杂查询中逻辑一致性不足;3)采用监督微调方法显著提升模型在知识图谱上下文中的复杂逻辑任务一致性。代码与数据已开源。
原文摘要 · Abstract (English)
In recent years, large language models (LLMs) have demonstrated significant success in performing varied natural language tasks such as language translation, question-answering, summarizing, fact-checking, etc. Despite LLMs' impressive ability to generate human-like texts, LLMs are infamous for their inconsistent responses - a meaning-preserving change in the input query results in an inconsistent response and attributes to vulnerabilities of LLMs such as hallucination. Consequently, existing research focuses on simple paraphrasing-based consistency assessment of LLMs, and ignores complex queries that necessitate an even better understanding of logical reasoning by an LLM. Our work therefore addresses the logical inconsistency of LLMs under complex logical queries with primitive logical operators, e.g., negation, conjunction, and disjunction. As a test bed, we consider retrieval-augmented LLMs on a fact-checking task involving propositional logic queries from knowledge graphs (KGs). Our contributions are threefold. Benchmark: We introduce three logical fact-checking datasets over KGs for community development towards logically consistent LLMs. Assessment: We propose consistency measures of LLMs on propositional logic queries and demonstrate that existing LLMs lack logical consistency, especially on complex queries. Improvement: We employ supervised fine-tuning to improve the logical consistency of LLMs on the complex fact-checking task with KG contexts. We have made our source code and benchmarks available.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。