Reliable Reasoning with Large Language Models via Preference-Based Maximum Satisfiability
This paper proposes a hybrid reasoning framework where Large Language Models generate Python code to encode preference-based reasoning tasks as MaxSAT problems, which are then solved and verified by exact solvers to achieve significantly higher feasibility and correctness rates compared to direct-answer or chain-of-thought baselines.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very talented but slightly chaotic translator (the Large Language Model, or LLM) and a strict, unyielding mathematician (the MaxSAT solver).
The paper argues that if you ask the translator to solve a complex puzzle on their own, they will likely give you a plausible-sounding answer that is actually wrong. However, if you ask the translator to write the instructions for the mathematician to solve the puzzle, the result is perfect.
Here is a breakdown of the paper's approach using simple analogies:
The Problem: The "Confident but Wrong" Translator
Large Language Models are great at understanding language. If you ask them, "Write a story about a cat," they do it beautifully. But if you ask them, "Schedule six jobs on one machine so that Job A happens before Job B, and try to finish Job C by 2 PM," they often fail.
The paper calls this the "hallucination" problem. The model might say, "Okay, I'll put Job A at 1 PM and Job B at 2 PM," but it forgets that Job B actually needs to happen before Job A. It sounds confident, but the logic is broken. It's like a tour guide who knows all the facts about a city but keeps giving you directions that lead you into a river.
The Solution: The "Architect and the Builder"
The authors propose a new way of working called a hybrid approach. Instead of asking the LLM to be the solver, they ask the LLM to be the architect.
- The Architect (LLM): You tell the LLM your problem in plain English: "I have these jobs, these rules, and I prefer these deadlines." The LLM doesn't try to solve it. Instead, it translates your English into a specific set of Python code instructions. Think of this as the architect drawing a blueprint.
- The Builder (MaxSAT Solver): The computer takes that blueprint (the Python code) and hands it to a specialized tool called a MaxSAT solver. This tool is like a super-strict builder who follows the blueprint exactly. It checks every single rule. If the blueprint says "Job A before Job B," the builder ensures it happens. If there's a conflict, it finds the mathematically perfect way to satisfy the most important rules.
- The Inspector (Verification): The paper adds a safety step. Even though the builder is perfect, the team checks the final house against a "canonical" (perfect) blueprint to make sure the architect didn't misunderstand the original request.
Why "MaxSAT"?
The paper uses a specific type of math problem called Maximum Satisfiability (MaxSAT).
- Hard Constraints: These are the "must-haves." (e.g., "Job A must happen before Job B"). If you break these, the solution is invalid.
- Soft Constraints (Preferences): These are the "nice-to-haves." (e.g., "I'd prefer Job C to finish early"). If you can't do it, it's okay, but you get a "penalty."
The MaxSAT solver's job is to satisfy all the "must-haves" while minimizing the "penalties" for the "nice-to-haves." It guarantees that the solution is the best possible one according to the rules.
What the Experiments Showed
The researchers tested this "Architect + Builder" team against models that tried to solve the puzzles alone (Direct Answer) or models that tried to think step-by-step (Chain-of-Thought).
- The Solo Models: When asked to solve scheduling or logic puzzles, the models that tried to do it all in their "head" failed almost 100% of the time. They produced answers that looked good but broke the rules.
- The Hybrid Team: When the LLM wrote the code for the solver, the success rate jumped dramatically. In some cases, over 80% of the solutions were perfect.
- The "Plan" Step: The paper found that if the LLM first wrote a "plan" (a list of variables and rules) before writing the code, the stronger models got even better. However, for weaker models, this extra step sometimes confused them, making things worse.
The Bottom Line
The paper concludes that we shouldn't trust AI to do the heavy lifting of logic and optimization. Instead, we should trust AI to translate our human wishes into a language that a strict, logical machine can understand.
By letting the LLM be the "interface" (the translator) and the MaxSAT solver be the "brain" (the logic engine), we get the best of both worlds: the ability to understand natural language and the guarantee of a mathematically correct, optimal solution.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.