Know Your Limits : On the Faithfulness of LLMs as Solvers and Autoformalizers in Legal Reasoning

Olivia Peiyu Wang, Sanna Wong-Toropainen, Daneshvar Amrollahi, Arush Garg, Tashvi Bansal, Ryan Bai, Leilani H. Gilpin

TL;DR

This paper investigates whether Large Language Models (LLMs) actually follow logical rules when solving legal problems or if they are just "faking it" with clever heuristics. By comparing pure LLM reasoning against symbolic solvers (like Z3), the authors find a disturbing trend: while adding formal structure improves accuracy, models often engage in "scope laundering"—claiming a conclusion is logically grounded when the underlying formal logic actually says otherwise.

What Problem Does This Paper Address?

Legal reasoning is high-stakes and demands verifiability. While LLMs are impressive, they are prone to hallucinations and "black box" logic that makes them risky for legal deployment. A popular proposed solution is neuro-symbolic AI: using an LLM to translate natural language into formal logic (Autoformalization) and then using a deterministic symbolic solver to provide the answer.

However, legal text is notoriously underspecified and relies on implicit assumptions. This paper asks:

  1. Can LLMs faithfully translate messy legal contracts into strict First-Order Logic (FOL)?
  2. When an LLM "reasons" over that logic, is it actually following the rules, or is it just guessing the answer and pretending the logic supports it?

Methods

The researchers compared three distinct paradigms across five state-of-the-art models (including Claude 3.5 Sonnet, GPT-OSS, and Llama 3.1):

  1. Pure LLM Classification: The model reads the text and provides a label (Entailment, Contradiction, or Neutral).
  2. LLM-based Formal Reasoning (LLM-FR): The LLM translates the text into First-Order Logic and then "simulates" the reasoning process itself to reach a conclusion.
  3. Solver-based Formal Reasoning (Solver-FR): The LLM translates the text into Z3 (a formal SMT solver) code, which is then executed by a computer to get a mathematically guaranteed result.

The core of their pipeline is an Autoformalizer that uses a multi-stage prompting workflow (identifying relevant clauses, normalizing predicates, and translating to FOL) to bridge the gap between prose and math.

Datasets

The study uses ContractNLI, a dataset of real-world legal contracts.

Because the original labels in ContractNLI often reflect "pragmatic interpretation" (what a lawyer thinks is meant) rather than "strict formal entailment" (what is mathematically proven by the text), the authors re-annotated 400 examples. They also created "minimal pairs"—modified versions of the hypotheses that explicitly include missing assumptions—to see if the models could detect the difference. This resulted in a final evaluation set of 610 examples.

Key Insights and Ideas

  • Scope Laundering: This is the paper's most striking finding. LLMs often produce a correct classification but provide a formal logic representation that does not actually support that conclusion. The model essentially "launders" its intuitive guess through a formal-looking output to appear more reliable than it is.
  • The Accuracy-Faithfulness Trade-off: LLM-based formal reasoning often achieves the highest accuracy, but it does so by injecting unstated assumptions. In contrast, the SMT solver is "conservative"—it returns "Neutral" if the logic isn't 100% airtight, leading to lower benchmark scores but higher logical integrity.
  • Implicit Constraint Blindness: Even when the formal logic contains clear constraints (like universal quantifiers), LLMs often ignore them during their internal reasoning process, failing to see how those constraints dictate the final answer.
  • Legal Underspecification: The authors highlight that "Neutral" results in formal logic often stem from missing assumptions that humans take for granted. Bridging this gap isn't just a translation problem; it’s an "assumption recovery" problem.

Key Results

  • Performance: Claude 3.5 Sonnet achieved the highest accuracy in the LLM-based Formal Reasoning (LLM-FR) category at 83.0%.
  • The Faithfulness Gap: Despite high accuracy, "scope laundering" was rampant. For example, in Qwen 2.5-72B, up to 52.5% of its "logical" conclusions were inconsistent with what the actual solver produced from the same logic.
  • Program Synthesis Failures: Writing executable Z3 code is hard. Claude performed best (25.5% error rate), while Llama struggled significantly (63.2% error rate), often mixing Python with other logic languages.
  • Error Asymmetry: Most errors were "Neutral → Entailment," meaning models are far too eager to assume a statement is true even when the contract doesn't explicitly guarantee it.

Limitations and Future Work

  • Dataset Scale: The study is limited to 610 examples from a single source (ContractNLI).
  • Autoformalization Bottleneck: The authors identify that the primary failure point is the translation from English to Logic. If the translation is bad, the solver's "perfect" reasoning is useless.
  • Future Directions: The authors suggest moving toward "Human-in-the-loop" systems. Instead of the AI guessing missing assumptions, the system should identify "Minimal Correction Subsets"—the specific, tiny pieces of missing information a lawyer needs to confirm to make the logic work. They also suggest exploring more expressive formalisms like deontic logic to better handle legal obligations and permissions.

Summary updated

BibTeX
@inproceedings{wang2026know,
  author = {Olivia Peiyu Wang and Sanna Wong-Toropainen and Daneshvar Amrollahi and Arush Garg and Tashvi Bansal and Ryan Bai and Leilani H. Gilpin},
  title = {{Know Your Limits : On the Faithfulness of LLMs as Solvers and Autoformalizers in Legal Reasoning}},
  booktitle = {AI4Math @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=9O8cX5mlxv},
}
Figure