Skip to main content
QUICK REVIEW

[Paper Review] Conditional and Modal Reasoning in Large Language Models

Wesley H. Holliday, Matthew Mandelkern|arXiv (Cornell University)|Jan 30, 2024
Natural Language Processing TechniquesComputer Science3 citations
TL;DR

This paper evaluates the logical reasoning capabilities of large language models (LLMs) in conditional and modal inference, using formal logic standards from philosophy and linguistics. It finds that while GPT-4 performs relatively well, most LLMs—including GPT-3.5 and Mixtral—make fundamental logical errors with conditionals and display inconsistent judgments with epistemic modals, indicating a lack of mastery over core logical structures.

ABSTRACT

The reasoning abilities of large language models (LLMs) are the topic of a growing body of research in AI and cognitive science. In this paper, we probe the extent to which twenty-nine LLMs are able to distinguish logically correct inferences from logically fallacious ones. We focus on inference patterns involving conditionals (e.g., 'If Ann has a queen, then Bob has a jack') and epistemic modals (e.g., 'Ann might have an ace', 'Bob must have a king'). These inferences have been of special interest to logicians, philosophers, and linguists, since they play a central role in the fundamental human ability to reason about distal possibilities. Assessing LLMs on these inferences is thus highly relevant to the question of how much the reasoning abilities of LLMs match those of humans. All the LLMs we tested make some basic mistakes with conditionals or modals, though zero-shot chain-of-thought prompting helps them make fewer mistakes. Even the best performing LLMs make basic errors in modal reasoning, display logically inconsistent judgments across inference patterns involving epistemic modals and conditionals, and give answers about complex conditional inferences that do not match reported human judgments. These results highlight gaps in basic logical reasoning in today's LLMs.

Motivation & Objective

  • To assess whether large language models (LLMs) can accurately perform logically valid inferences involving conditionals and epistemic modals, using formal logic standards.
  • To investigate whether LLMs distinguish between logically valid and invalid inference patterns, particularly those involving 'if-then' statements and modal operators like 'might' and 'must'.
  • To identify systematic logical errors or inconsistencies in LLM reasoning, especially in relation to duality and modal quantification over possible worlds.
  • To challenge the assumption that LLMs exhibit human-like logical reasoning by testing them against rigorously defined logical criteria from philosophy and linguistics.
  • To establish a foundation for future research on LLMs using insights from formal logic, philosophy of language, and cognitive science.

Proposed method

  • Applied a formal logic framework based on possible worlds semantics to model the meaning of conditionals and epistemic modals, treating 'must' and 'might' as universal and existential quantifiers over possible worlds.
  • Designed a series of inference tasks based on standard logical patterns: Modus Tollens (MT), Modus Ponens (MP), Affirming the Consequent (AC), Disjunctive Syllogism (DS), and their modal variants (e.g., DSmu, DSmi).
  • Used controlled prompts with strict formatting (e.g., 'Answer with only yes or no') to minimize model hallucination and ensure consistent response parsing.
  • Tested 12 LLMs, including GPT-4, GPT-3.5, Mistral 7B, Mixtral, and others, across multiple inference patterns involving both natural language and abstract predicates.
  • Evaluated model responses against expert-verified logical validity judgments from the philosophical and linguistic literature, particularly focusing on the invalidity of inferences like DSmu and DSmu in modal contexts.
  • Analyzed response consistency across related inferences (e.g., duality between 'must' and 'might') to detect logical contradictions in model behavior.

Experimental results

Research questions

  • RQ1To what extent do LLMs correctly apply the Modus Tollens inference pattern in conditional reasoning?
  • RQ2How do LLMs handle inferences involving epistemic modals like 'might' and 'must', particularly when logical duality is involved?
  • RQ3Are LLMs consistent in their logical judgments across structurally related inferences, such as those involving modal quantifiers and disjunctions?
  • RQ4Do LLMs exhibit systematic errors in reasoning about conditionals that deviate from the material conditional analysis, as formalized in modern modal logic?
  • RQ5How does the performance of GPT-4 compare to other LLMs in maintaining logical consistency across complex modal and conditional inference patterns?

Key findings

  • All LLMs except GPT-4 made frequent errors on basic conditional inferences like Modus Tollens (MT), indicating a failure to master fundamental logical patterns.
  • GPT-4, while mostly correct on standard MT, exhibited logical inconsistency in responses to modal variants: it accepted DSmu (Disjunctive Syllogism with 'must') but rejected DSmI (with 'might'), contradicting the principle of duality.
  • Even GPT-4 showed inconsistent behavior across 'x' and 'ox' variants of inferences, suggesting robustness of the inconsistency beyond superficial phrasing.
  • Models like GPT-3.5 and Mistral 7B displayed significant sensitivity to premise order, rejecting valid inferences when premises were reordered, indicating unstable reasoning.
  • LLMs such as Mixtral and Llama 2 showed human-like rejection of invalid inferences like MTmi (modal Modus Tollens with 'might'), but their acceptance of MTmu (with 'must') was logically inconsistent with duality principles.
  • The study reveals that even state-of-the-art LLMs fail to maintain logical consistency when reasoning about epistemic modals, challenging assumptions about their mastery of core logical structures.

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.