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

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

Executive Summary

By testing Large Language Models (LLMs) on the NP-complete 3-SAT problem, researchers found that even top-tier models like GPT-4 fail to perform "true" reasoning. While LLMs can solve "easy" logic problems by latching onto statistical shortcuts, their performance craters at the mathematical "phase transition" where problems become inherently hard, proving they are sophisticated "statistical parrots" rather than logical engines.

The Challenge of Measuring Reasoning

The AI community is currently locked in a debate: Do LLMs actually "reason," or are they just really good at predicting the next token based on patterns? Most existing reasoning benchmarks (like GSM8K or Big-Bench) suffer from two issues: data contamination (the model might have seen the answer during training) and a lack of computational depth.

To cut through the noise, the authors turned to 3-SAT (3-Satisfiability). In computer science, 3-SAT is the "gold standard" for testing reasoning. It’s an NP-complete problem where you must determine if a set of logical constraints can be satisfied. Crucially, random 3-SAT problems have a known "phase transition"—a specific point where a problem moves from being easily solvable to being incredibly difficult.

Figure 3: Phase transitions in 3-SAT problems. As the constraint-to-variable ratio (alpha) reaches approximately 4.26, the probability of satisfiability drops sharply and solver time peaks, marking the transition from easy to hard problem instances.

By using 3-SAT, the authors could precisely measure if LLMs possess the "algebraic manipulation" skills required for true deductive reasoning.

Methodology

The researchers developed a rigorous experimental protocol using two primary formats:

  1. SAT-CNF: The problem is presented in its raw mathematical form (integers representing variables).
  2. SAT-Menu: The problem is "clothed" in natural language, presented as a menu-selection puzzle where food items represent variables and people's dietary preferences represent logical constraints.

They evaluated models on two tasks: SAT-Decision (Is this solvable? Yes/No) and SAT-Search (Provide a valid solution). The most novel part of their method was tracking performance against the hardness parameter (alpha), which is the ratio of constraints to variables. They also tested an "LLM-Modulo" approach (SAT-Translate), where the LLM doesn't solve the problem itself but instead translates the natural language requirements into a format that a classical symbolic solver (like MiniSAT) can process.

Dataset and Verification

The authors generated a massive dataset of 60,000 random 3-SAT formulas.

  • Variables (n): Varied from 3 to 10.
  • Hardness (alpha): Varied from 1 to 11 to cover the "Easy-Hard-Easy" spectrum.
  • Labels: Each instance was verified as satisfiable (SAT) or unsatisfiable (unSAT) using a professional-grade symbolic solver.
  • Mapping: For the SAT-Menu task, they mapped these formulas to natural language scenarios involving food preferences to ensure the LLM couldn't rely on seeing the exact math problem before.

Key Insights: Statistical Shortcuts vs. Logical Depth

  • The Phase Transition Dip: GPT-4’s performance perfectly mirrored the difficulty curve of classical algorithms. It did well on very under-constrained or over-constrained problems but its accuracy plummeted to near 10% at the critical "hard" region (alpha approx 4.267).
  • Statistical Shortcuts (The "Clever Hans" Effect): The researchers found that LLMs often use "shortcuts." For example, if a prompt is very long (indicating many constraints), the model is more likely to guess "Unsatisfiable" simply because long prompts statistically correlate with unsolvable problems in the training data.
  • Translation vs. Solving: LLMs are mediocre at solving logic, but they are world-class at translating it. When GPT-4 was used to translate the "SAT-Menu" into a formal logic language for an external solver, it achieved nearly 100% accuracy.
  • The Limits of Scale: The study suggests that simply making models bigger or providing more "Chain-of-Thought" tokens won't solve the fundamental inability of transformers to handle NP-complete logic. GPT-4 actually generated more tokens when faced with hard problems, but it still got the answers wrong.

Comparative Performance and Results

The experimental results highlight a significant gap between current LLM capabilities and true logical reasoning.

Figure 4: 0-shot performance of various LLMs across the hardness spectrum. All models show a characteristic performance dip at the phase transition (alpha approx 4.26). GPT-4 is the only model that significantly outperforms random guessing in the easier regions.
  • GPT-4 as the Leading Contender: Among the models tested (GPT-4, GPT-3.5, Llama-2, Mixtral, Gemini, PaLM 2), only GPT-4 showed a performance pattern that even remotely resembled a logical solver. Other models were essentially guessing.
  • The Accuracy Gap: In the "hard" region of 3-SAT, GPT-4’s accuracy for finding a solution (SAT-Search) dropped to roughly 10%.
  • The Power of External Tools: By using the SAT-Translate (LLM-Modulo) framework, the system's accuracy jumped from ~10% to ~100% across the entire hardness spectrum. This proves that the bottleneck isn't the model's understanding of the language, but its internal "processing unit" for logic.

Limitations and Future Work

The authors acknowledge that their study focuses on random 3-SAT instances. In the real world, many logic problems have "structure" that LLMs might be better at exploiting. Future work could explore whether LLMs perform better on "structured" SAT problems (like those found in software verification) compared to the "noisy" random ones used here.

Additionally, while the "LLM-Modulo" approach is highly effective, it requires a pre-defined symbolic solver. A major future challenge is determining how LLMs can autonomously decide when to call such a solver and how to handle more complex, non-Boolean reasoning tasks.

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