ChatPaper.aiChatPaper

具備語言模型的認證推理

Certified Reasoning with Language Models

June 6, 2023
作者: Gabriel Poesia, Kanishk Gandhi, Eric Zelikman, Noah D. Goodman
cs.AI

摘要

語言模型在處理複雜任務時,通常能夠透過逐步推理來達到更高的準確性。然而,它們的推理可能不嚴謹、不一致,或是依賴不良的先前假設。為了應對這些問題,我們引入了一類針對語言模型的工具,稱為「導引器」,它利用狀態和增量約束來引導生成。模型可以呼叫導引器,將自身的生成限制在工具提供的一組有效陳述中。反之,模型的選擇也可能改變導引器的狀態。我們展示了如何將一般的邏輯推理系統用作導引器,我們稱之為 LogicGuide。對於自然語言中的推理問題,模型可以為 LogicGuide 正式化其假設,並確保其推理步驟是嚴謹的。在 PrOntoQA 和 ProofWriter 推理數據集的實驗中,LogicGuide 顯著提高了 GPT-3、GPT-3.5 Turbo 和 LLaMA 的性能(準確性提高達 35%)。LogicGuide 還大幅減少了內容效應:先前和當前假設的干擾,這是人類和語言模型都已被證明會受到影響的。最後,我們探索了從其自身推理中引導 LLaMA 13B 的方法,並發現 LogicGuide 至關重要:僅通過在經過驗證的自我生成推理上進行訓練,LLaMA 可以自我改進,避免從自身的幻覺中學習。
English
Language models often achieve higher accuracy when reasoning step-by-step in complex tasks. However, their reasoning can be unsound, inconsistent, or rely on undesirable prior assumptions. To tackle these issues, we introduce a class of tools for language models called 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 LogicGuide. Given a reasoning problem in natural language, a model can formalize its assumptions for LogicGuide and then guarantee that its reasoning steps are sound. In experiments with the PrOntoQA and ProofWriter reasoning datasets, LogicGuide significantly improves the performance of GPT-3, GPT-3.5 Turbo and LLaMA (accuracy gains up to 35%). LogicGuide also drastically reduces content effects: the interference of prior and current assumptions that both humans and language models have been shown to suffer from. Finally, we explore bootstrapping LLaMA 13B from its own reasoning and find that LogicGuide is critical: by training only on certified self-generated reasoning, LLaMA can self-improve, avoiding learning from its own hallucinations.
PDF20December 15, 2024