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

迈向逻辑可靠的自然语言推理:基于逻辑增强的语言模型智能体

Towards Logically Sound Natural Language Reasoning with Logic-Enhanced Language Model Agents

Royal Holloway, University of London(伦敦大学皇家霍洛威学院)

Agnieszka Mensfelt, Kostas Stathis, Vince Trencsenyi

AI总结:

针对LLMs在开放式任务中易出现逻辑错误的问题,提出逻辑增强框架LELMA,通过自动形式化将自然语言推理转化为逻辑表示以验证和优化推理,实验表明该框架有效提升了错误检测准确率与推理正确性。

摘要:

大型语言模型(LLMs)正日益被探索为通用推理器,特别是在智能体语境中。然而,其输出仍易出现数学和逻辑错误。在开放式任务中,这一点尤为具有挑战性,因为非结构化输出缺乏明确的真值,且可能包含细微的不一致性。为解决此问题,我们提出了逻辑增强语言模型智能体(LELMA),这是一个将LLMs与形式逻辑相结合的框架,旨在实现自然语言推理的验证与优化。LELMA包含三个组件:LLM-Reasoner、LLM-Translator和Solver,并采用自动形式化技术将推理转化为逻辑表示,随后利用这些表示来评估逻辑有效性。以囚徒困境等博弈论场景作为测试平台,我们揭示了能力较弱(Gemini 1.0 Pro)与先进(GPT-4o)模型在生成逻辑可靠推理时的局限性。LELMA在错误检测上实现了高准确率,并通过自我优化提升了推理正确性,尤其是在GPT-4o中。本研究还强调了自动形式化准确性以及评估本质上具有歧义的开放式推理任务所面临的挑战。

英文摘要:

Large language models (LLMs) are increasingly explored as general-purpose reasoners, particularly in agentic contexts. However, their outputs remain prone to mathematical and logical errors. This is especially challenging in open-ended tasks, where unstructured outputs lack explicit ground truth and may contain subtle inconsistencies. To address this issue, we propose Logic-Enhanced Language Model Agents (LELMA), a framework that integrates LLMs with formal logic to enable validation and refinement of natural language reasoning. LELMA comprises three components: an LLM-Reasoner, an LLM-Translator, and a Solver, and employs autoformalization to translate reasoning into logic representations, which are then used to assess logical validity. Using game-theoretic scenarios such as the Prisoner's Dilemma as testbeds, we highlight the limitations of both less capable (Gemini 1.0 Pro) and advanced (GPT-4o) models in generating logically sound reasoning. LELMA achieves high accuracy in error detection and improves reasoning correctness via self-refinement, particularly in GPT-4o. The study also highlights challenges in autoformalization accuracy and in evaluation of inherently ambiguous open-ended reasoning tasks.

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

↑