arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2306.04031cs.AI
收藏

基于语言模型的认证演绎推理

Certified Deductive Reasoning with Language Models

Stanford University(斯坦福大学)

Gabriel Poesia, Kanishk Gandhi, Eric Zelikman, Noah D. Goodman

AI总结:

针对语言模型逐步推理存在逻辑缺陷的问题,提出名为LogicGuide的引导工具约束推理过程,提升多模型推理准确率并降低内容效应,还可支撑模型基于认证推理实现自我改进。

摘要:

语言模型在复杂任务中进行逐步推理时通常能取得更高的准确率。然而,即便最终得出正确答案,其推理过程往往存在逻辑不健全或不一致的问题。在需要可靠推理轨迹的场景下,这是一个核心问题,例如利用模型生成的推理进行微调以实现自我改进时。为解决这些问题,我们为语言模型引入一类名为“guides(引导工具)”的工具,它利用状态和增量约束来引导生成过程。模型可以调用引导工具,将自身的生成内容约束在工具给出的有效陈述集合范围内。相应地,模型的选择也可以改变引导工具的状态。我们展示了如何将通用逻辑推理系统用作引导工具,并将其命名为\textsc{LogicGuide}。给定自然语言表述的推理问题,模型可以为\textsc{LogicGuide}形式化其假设,从而保证逐步推理的可靠性。在PrOntoQA、ProofWriter和Syllogism Validity数据集上的实验表明,\textsc{LogicGuide}显著提升了GPT-3、GPT-3.5 Turbo和LLaMA的性能(准确率提升最高达35%),同时大幅降低了“内容效应”——即人类和语言模型都会受到的、无关先验假设对推理的干扰。随后我们探索了利用GPT-3.5 Turbo和LLaMA自身的推理轨迹进行自举训练的方法。我们发现\textsc{LogicGuide}至关重要:仅通过经过认证的自生成推理进行训练,模型就能实现自我改进,避免从自身的幻觉中学习。此外,自举后的模型在ReClor这一具有挑战性的真实推理数据集上也获得了显著提升,即便在推理阶段不依赖形式化处理也能实现该效果。

英文摘要:

Language models often achieve higher accuracy when reasoning step-by-step in complex tasks. However, even when arriving at a correct final answer, their rationales are often logically unsound or inconsistent. This is a major issue when reliable reasoning traces are needed, such when fine-tuning on model-generated reasoning for self-improvement. To tackle these issues, we introduce a class of tools for language models called \emph{guides}, that use state and incremental constraints to guide generation. A guide can be invoked by the model to constrain its own generation to a set of valid statements given by the tool. In turn, the model's choices can change the guide's state. We show how a general system for logical reasoning can be used as a guide, which we call \textsc{LogicGuide}. Given a reasoning problem in natural language, a model can formalize its assumptions for \textsc{LogicGuide} and guarantee that its step-by-step reasoning is sound. In experiments on PrOntoQA, ProofWriter and Syllogism Validity datasets, \textsc{LogicGuide} significantly improves the performance of GPT-3, GPT-3.5 Turbo and LLaMA (accuracy gains up to 35\%), while drastically reducing \emph{content effects} -- the interference between unwanted prior assumptions and reasoning, which humans and language models suffer from. We then explore bootstrapping GPT-3.5 Turbo and LLaMA using their own reasoning traces. We find that LogicGuide is critical: by training only on certified self-generated reasoning, models can self-improve, avoiding learning from their own hallucinations. Moreover, bootstrapped models enjoy significant boosts on ReClor, a challenging real-world reasoning dataset, even when not relying on formalization at inference time.

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

↑