Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning

Liangming Pan, Alon Albalak, Xinyi Wang, William Yang Wang
5/20/2023
cs.CLcs.AI

Official code: teacherpeterpan/Logic-LLM (407 stars, MIT, last commit 2024-06-13). 1 more implementation below.

Abstract

Large Language Models (LLMs) have shown human-like reasoning abilities but still struggle with complex logical problems. This paper introduces a novel framework, Logic-LM, which integrates LLMs with symbolic solvers to improve logical problem-solving. Our method first utilizes LLMs to translate a natural language problem into a symbolic formulation. Afterward, a deterministic symbolic solver performs inference on the formulated problem. We also introduce a self-refinement module, which utilizes the symbolic solver's error messages to revise symbolic formalizations. We demonstrate Logic-LM's effectiveness on five logical reasoning datasets: ProofWriter, PrOntoQA, FOLIO, LogicalDeduction, and AR-LSAT. On average, Logic-LM achieves a significant performance boost of 39.2% over using LLM alone with standard prompting and 18.4% over LLM with chain-of-thought prompting. Our findings suggest that Logic-LM, by combining LLMs with symbolic logic, offers a promising avenue for faithful logical reasoning. Code and data are publicly available at https://github.com/teacherpeterpan/Logic-LLM.

View on arXivView PDF

Code Implementations(2)

MIT

The project page for "LOGIC-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning"

40775C, HTMLMay 17, 20232 years agoMIT
MIT

Claude Code Plugin port for "LOGIC-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning"

20Shell, JavaScriptJan 24, 20268 months agoMIT
claude-code-pluginpaper-implementation

Similar Papers

Cite this paper

@article{pan2023logiclm,
  title  = {Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning},
  author = {Liangming Pan and Alon Albalak and Xinyi Wang and William Yang Wang},
  year   = {2023},
  eprint = {2305.12295},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.12295v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.12295.svg)](https://codeofpaper.com/paper/2305.12295)

Discussion