Skip to main content
QUICK REVIEW

[Paper Review] Reliable Natural Language Understanding with Large Language Models and Answer Set Programming

Abhiramon Rajasekharan, Yankai Zeng|arXiv (Cornell University)|Feb 7, 2023
Topic ModelingComputer Science27 references5 citations
TL;DR

This paper proposes STAR, a framework that combines large language models (LLMs) for semantic parsing and answer set programming (ASP) for reliable, explainable reasoning in natural language understanding. By using LLMs to extract predicates from text and ASP to perform goal-directed, logic-based reasoning, STAR significantly improves reasoning accuracy—especially for smaller LLMs—while generating proof trees for full explainability across qualitative reasoning, math word problems, and interactive concierge conversations.

ABSTRACT

Humans understand language by extracting information (meaning) from sentences, combining it with existing commonsense knowledge, and then performing reasoning to draw conclusions. While large language models (LLMs) such as GPT-3 and ChatGPT are able to leverage patterns in the text to solve a variety of NLP tasks, they fall short in problems that require reasoning. They also cannot reliably explain the answers generated for a given question. In order to emulate humans better, we propose STAR, a framework that combines LLMs with Answer Set Programming (ASP). We show how LLMs can be used to effectively extract knowledge -- represented as predicates -- from language. Goal-directed ASP is then employed to reliably reason over this knowledge. We apply the STAR framework to three different NLU tasks requiring reasoning: qualitative reasoning, mathematical reasoning, and goal-directed conversation. Our experiments reveal that STAR is able to bridge the gap of reasoning in NLU tasks, leading to significant performance improvements, especially for smaller LLMs, i.e., LLMs with a smaller number of parameters. NLU applications developed using the STAR framework are also explainable: along with the predicates generated, a justification in the form of a proof tree can be produced for a given output.

Motivation & Objective

  • To address the limitations of LLMs in complex reasoning tasks, where they frequently make errors due to flawed reasoning or lack of explainability.
  • To develop a system that emulates human-like language understanding by integrating semantic parsing, commonsense knowledge, and explicit reasoning.
  • To improve performance and reliability in NLU applications requiring multi-step reasoning, especially for smaller LLMs with limited reasoning capacity.
  • To produce explainable outputs through proof trees that justify the reasoning process, enabling transparency and error analysis.
  • To enable interactive, goal-directed conversations that correctly track and reason over user-provided information without hallucination or contradiction.

Proposed method

  • Use fine-tuned or in-context learning LLMs (e.g., GPT-3 variants) to convert natural language into logical predicates representing semantic meaning.
  • Encode domain-specific commonsense knowledge as rules in Answer Set Programming (ASP), enabling formal, logic-based reasoning.
  • Employ a goal-directed ASP solver (s(CASP)) to execute queries over the combined knowledge base of LLM-extracted predicates and ASP-coded knowledge.
  • Generate queries either manually or via LLMs to represent user questions or conversational goals.
  • Construct justification proof trees from the ASP reasoning process to provide explainable outputs for each answer.
  • Integrate the framework into three distinct NLU applications: qualitative reasoning, mathematical word problems, and interactive concierge conversations.

Experimental results

Research questions

  • RQ1Can combining LLMs with ASP improve reasoning performance in NLU tasks compared to LLMs alone?
  • RQ2Does the STAR framework reduce reasoning errors in smaller LLMs, particularly in tasks requiring multi-step logic?
  • RQ3Can the system produce explainable outputs through proof trees that trace the reasoning process?
  • RQ4How does the framework perform in interactive, goal-directed conversations compared to end-to-end LLM-based bots?
  • RQ5To what extent does the separation of semantic parsing (LLM) and reasoning (ASP) enhance reliability and knowledge transparency?

Key findings

  • STAR significantly improves answer prediction accuracy on qualitative reasoning and math word problems, with performance gains most pronounced for smaller LLMs like Curie (~6.7B parameters).
  • The framework produces proof trees that justify each answer, enabling full explainability and transparency in reasoning, which is not feasible with LLMs alone.
  • In the concierge conversation task, the STAR-based bot maintains consistency and avoids hallucinating or mixing up user-provided information, unlike LLM-only counterparts.
  • The system demonstrates better control in interactive settings by correctly identifying and requesting missing information, leading to more reliable and coherent dialogues.
  • The integration of LLM-extracted predicates with ASP knowledge allows for diagnosing reasoning failures and identifying gaps in commonsense knowledge.
  • STAR advances the state-of-the-art on most QuaRel datasets for qualitative reasoning, demonstrating its effectiveness in structured reasoning tasks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.