Can Large Language Models Reason? A Characterization via 3-SAT

Rishi Hazra, Gabriele Venturato, Pedro Zuidberg Dos Martires, Luc De Raedt

TL;DR

By framing 3-SAT problems as natural language menu-selection puzzles and raw formulas, this paper evaluates whether large language models (LLMs) can truly perform multi-step deductive reasoning. The findings reveal that LLMs rely heavily on statistical shortcuts rather than genuine logical reasoning—plummeting to near-failure on inherently hard problem instances—but excel when paired with external symbolic solvers.

What Problem Does This Paper Address?

Evaluating whether LLMs can genuinely "reason" remains contentious. Popular benchmarks often conflate common sense (fact retrieval from pretraining) with pure logical deduction, while also suffering from potential test-set contamination. Furthermore, standard benchmarks typically report aggregate accuracy without considering the inherent computational hardness of individual test instances.

To test true reasoning—defined formally as algebraically manipulating acquired knowledge to answer novel queries—the authors evaluate LLMs on 3-SAT, the canonical NP-complete constraint satisfaction problem.

Methods

The authors design an experimental protocol leveraging the well-known phase transition phenomenon in random 3-SAT:

  • The Hardness Parameter ($\alpha$): Problem difficulty is controlled by the clause-to-variable ratio $\alpha = m/n$. Around the critical threshold $\alpha_c \approx 4.267$, problems switch sharply from satisfiable to unsatisfiable. In this transition zone ("Hard region"), problem heuristics fail, requiring exponential search. Away from $\alpha_c$ ("Easy regions"), problems are either under-constrained or heavily over-constrained.
  • Problem Setups:
  • SAT-Menu: A natural language translation where variables represent food items and clauses represent dietary likes/dislikes of individuals.
  • SAT-CNF: The raw propositional formula in Conjunctive Normal Form represented as integer lists.
  • SAT-Translate (LLM + Solver): The LLM translates the natural language puzzle into formal CNF syntax, which is then solved by an external symbolic solver (MiniSAT).
  • Evaluation Tasks: Both the Decision problem ("Is this formula satisfiable? Yes/No") and the Search problem ("Provide a satisfying variable assignment, or return empty").
  • Models Tested: Proprietary models (GPT-4 Turbo, GPT-3.5 Turbo, Gemini 1.0 Pro, PaLM 2) and open-weight models (Llama 2 70B, Mixtral 8×7B) using zero-shot and few-shot Chain-of-Thought (CoT) prompting.

Datasets

The authors generated synthetic benchmarks to avoid benchmark contamination and domain bias:

  • 3-SAT Dataset: 60,000 randomly sampled formulas (with replacement) spanning $n \in [1, 10]$ variables and $\alpha \in [1, 11]$ (39,909 satisfiable, 20,091 unsatisfiable). Each was labeled via MiniSAT and annotated with exact solution counts via the D4 model counter. A stratified subset of ~6,000 instances was used for evaluation.
  • 2-SAT Dataset: 29,600 formulas ($n \in [3, 10]$, $\alpha \in [1, 10]$) representing the polynomial-time, NL-complete baseline.
  • Horn-SAT Dataset: 31,200 formulas each across 1-2-HornSAT and 1-3-HornSAT distributions to benchmark P-complete reasoning.

Key Insights and Ideas

  • Reasoning Failure at the Phase Transition: Standalone LLM performance collapses precisely where classical symbolic solvers experience exponential runtime spikes ($\alpha \approx 4.267$).
  • Apparent Reasoning is Shortcut Exploitation: In the "easy" regions, LLMs exploit surface-level statistical cues. For example, over-constrained problems feature longer prompt texts; GPT-4 frequently defaults to declaring long inputs unsatisfiable or outputting an empty dictionary ("lazy solutions"), which artificially inflates accuracy on over-constrained instances.
  • GPT-4 vs. Other LLMs: Only GPT-4 exhibited an "Easy-Hard-Easy" phase transition curve. Other models (Gemini, Llama 2, Mixtral) showed an "Easy-Hard-Hard" curve because they almost never correctly predicted unsatisfiability in the high-$\alpha$ regime.
  • The Limits of Chain-of-Thought: In the hard region, GPT-4 allocated more CoT generation tokens (attempting search-like steps such as backtracking), yet its accuracy still cratered to near-zero.
  • Complexity Hierarchy Holds: GPT-4 performed relatively well on 2-SAT (NL-complete), but degraded sharply on Horn-SAT (P-complete) and 3-SAT (NP-complete) at their respective transition thresholds.

Key Results

  • Standalone Collapse in Hard Regions: For 3-SAT Search, GPT-4’s accuracy plunged to $\approx 10\%$ in the hard region ($\alpha \approx 4.267$).
  • Model Count Correlation: LLM accuracy scaled monotonically with the satisfiability ratio ($\text{model count} / 2^n$)—the more valid solutions existed, the easier it was for the model to guess one.
  • Neurosymbolic Pairing (LLM + Solver): Under the SAT-Translate framework, GPT-4 achieved $\approx 100\%$ accuracy across all values of $\alpha$, translating natural language constraints into solver-ready syntax without having to perform NP-complete combinatorial search internally.

Limitations and Future Work

  • Input Regularity: The natural language instances were synthesized using templated phrasing; mapping messier, ambiguous real-world language to formal logic remains challenging.
  • Translation Robustness: Non-GPT-4 models frequently violated output syntax constraints when generating CNF representations for the solver.
  • Pipelined vs. Interactive Frameworks: The study tested a straightforward one-shot translation pipeline. Future work should investigate iterative verifier-in-the-loop architectures (such as LLM-Modulo frameworks) that allow bidirectional guidance between solvers and LLMs.

Summary updated

BibTeX
@inproceedings{hazra2025can,
  author = {RISHI HAZRA and Gabriele Venturato and Pedro Zuidberg Dos Martires and Luc De Raedt},
  title = {{Can Large Language Models Reason? A Characterization via 3-SAT}},
  booktitle = {LLM Reason and Plan @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=RqvtYEsyo8},
}
Figure