TL;DR
SatLM (Satisfiability-Aided Language Modeling) shifts the burden of complex reasoning from Large Language Models (LLMs) to specialized automated theorem provers. By prompting LLMs to generate declarative logical constraints rather than step-by-step imperative instructions, SatLM eliminates planning errors and achieves state-of-the-art results on challenging logic and math benchmarks like the LSAT and BoardgameQA.
What Problem Does This Paper Address?
While LLMs have become surprisingly good at "Chain-of-Thought" (CoT) reasoning—breaking a problem into sequential steps—they frequently stumble on tasks requiring sophisticated planning, search, or constraint satisfaction.
Existing "program-aided" models (like PAL or Program-of-Thought) try to fix this by having the LLM write an imperative script (e.g., in Python). This solves the execution problem (the LLM won't fail at basic arithmetic), but it doesn't solve the planning problem. The LLM still has to figure out the exact sequence of steps to reach the answer. If the problem involves a complex system of equations or a logic puzzle where the "path" to the solution isn't a straight line, the LLM often generates a flawed plan.
Methods: The Parse-Then-Solve Paradigm
The authors propose a "parse-then-solve" paradigm called SatLM. Instead of asking the LLM to solve the problem step-by-step, they ask it to act as a translator.
- Declarative Prompting: The LLM is prompted to translate a natural language problem into a set of formal logical constraints (a declarative specification). For example, instead of writing a loop to solve a puzzle, the LLM simply states the rules:
visits(Sharon) != visits(Paul). - External SAT Solver: These constraints are fed into an off-the-shelf automated theorem prover (specifically the Z3 SMT solver).
- Sound Reasoning: The solver handles the "thinking"—it performs the search and logical deduction internally. Because the solver is mathematically sound, it is guaranteed to find a correct answer if the LLM's parsed constraints are accurate.
- Selective Prediction: Unlike standard LLMs that always try to provide an answer, SatLM can detect if the constraints are contradictory (UNSAT) or if there are multiple possible answers (AMBIG), allowing the system to abstain when it's likely to be wrong.
Key Insights
- Declarative > Imperative: The core insight is that it is fundamentally easier for an LLM to describe a problem than to solve it. Natural language descriptions are often already declarative; translating "A is taller than B" into
height(A) > height(B)is a much shorter leap than planning a multi-step algebraic substitution algorithm. - Offloading the "Search": Many reasoning tasks are essentially search problems. LLMs are notoriously bad at backtracking and keeping track of state during a search. SAT solvers, however, are built specifically for this.
- Higher Confidence in Parsing: The authors found that the LLM's log-likelihood (a measure of confidence) was higher when generating declarative constraints than when generating imperative code. This suggests that the "translation" task is more aligned with the LLM's pre-training than the "planning" task.
Datasets and Key Results
The researchers evaluated SatLM across 8 diverse datasets spanning Arithmetic Reasoning (GSM8K, GSM-SYS, ALGEBRA), Logical Reasoning (LSAT, BoardgameQA, CLUTRR), Symbolic Reasoning (Colored Objects), and Regex Synthesis (StructuredRegex).
SatLM consistently outperformed both standard CoT and program-aided LMs:
- GSM-SYS: On this challenging new math subset requiring systems of equations, SatLM outperformed program-aided LMs by a massive 23% (69.4% vs 43.4% accuracy).
- LSAT & BoardgameQA: SatLM achieved new State-of-the-Art (SoTA) results, even surpassing models that were specifically fine-tuned on those datasets' training sets.
- Self-Consistency: When combined with self-consistency (sampling multiple outputs and taking the majority), SatLM reached 84.8% on GSM8K, rivaling much more complex, specialized systems.
Limitations and Future Work
- Solver Expressivity: The system is limited by what the SAT solver can handle. Extremely complex non-linear math or problems requiring high-level "common sense" that can't be easily formalized remain out of reach.
- One-Shot Parsing: Currently, if the solver returns "UNSAT," the system fails. A promising future direction is a "multi-turn" approach where the solver provides feedback to the LLM, asking it to correct its constraints.
Summary updated