NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Solver-Localized Grounding for Statutory Reasoning

Large language models misread statutes surprisingly often. On SARA, a small benchmark of U.S. tax-code sections paired with short case stories, GPT-3 reaches at most 71% accuracy, while a hand-written Prolog program reaches 100%. The obvious remedy is to have the model translate the statute and the case into logic, run a solver, and repair the translation when the solver complains, as recent math autoformalization systems do. Two things break this in law. First, the case is written in everyday words ("she drove for a delivery app") and the statute in defined terms ("employee," "wages"), so the translation step fails at exactly the point where vocabularies diverge. Second, a model allowed to repair its own logic until the solver is satisfied will invent rules or facts to force an answer. This failure is already documented for theorem proving.

This proposal makes the solver do the localization work and makes the statute's own cross-reference structure act as a guard. The statute is compiled once into a logic program. That program is checked against a connection graph, a graph in which every defined term links to every place it is used and every "as defined in subsection (b)" becomes an edge. After it passes, the program is frozen. Repair is then allowed only on the case-fact side. When the solver cannot prove or refute the query, its failed proof tree names the specific statutory predicates that no fact supports. The model searches the case text only for those concepts, and it must attach a supporting text span to every fact it adds. The vocabulary gap is closed one solver-identified concept at a time rather than by expanding the whole query, and fabrication becomes structurally visible.

Core Claim

Most of the errors that remain in neurosymbolic statutory reasoning come from two places: binding case facts to statutory concepts across a vocabulary gap, and unfaithful repair. Both can be addressed by keeping the statute program and the case bindings in separate loops with different feedback. The statute program gets graph-structural feedback. Its predicate-dependency graph must align with the connection graph extracted from the statute text, so no rule may exist without a textual anchor. The case bindings get solver feedback. The ungrounded leaves of the proof attempt define targeted lookups in the case text. The prediction is that this split beats an equally budgeted generic repair loop on accuracy. The larger and more distinctive gains should show up in two places: on case stories rewritten into lay vocabulary, and on the rate of fabricated rules.

The work sits among the cited papers as follows. SARA supplies the benchmark and the gold Prolog. It motivates the work by showing that fine-tuned encoders sit near chance (about 50–55% entailment) while hand-built logic is perfect. Factoring Statutory Reasoning breaks the task into argument identification, coreference, structure extraction, and argument instantiation. It finds instantiation stuck barely above 50% with a strictly sequential, non-backtracking procedure. Our binding loop is a solver-driven, backtracking version of that instantiation step. LINC shows that pairing a language-model parser with a prover beats chain-of-thought, but it locates most errors in parsing and has no repair loop. We add the loop. ProofBridge and Aria supply the method family: compiler-in-the-loop repair, with Aria's dependency graph built bottom-up over concepts. Both stay in mathematics, both judge faithfulness with a language model or term retrieval, and neither separates a frozen theory from repairable instance data. Do LLMs Game Formalization? constrains the design. It shows that compilation rates of 87–99% hide unfaithful formalizations, including GPT-5 fabricating axioms in 107 cases. Our freezing and span-anchoring rules are a direct response to that finding.

The connection-graph idea itself comes from FormulaNet, which uses binding edges and variable anonymization to make formula embeddings invariant to renaming. It also draws on SIRISMT, which adds use-definition edges, and ENIGMA Anonymous, which guides a prover from symbol-free hypergraph structure. Unlike all three, we do not train a graph neural network. The graph is a deterministic checking object, which sidesteps the latency cost of running such networks inside a loop.

There is an apparent conflict between symbol invariance and LeSeR. LeSeR shows that exact statutory wording matters: BM25 reranking lifts mAP@10 from 0.1077 to 0.6655 on ObliQA. We resolve it by applying each principle to a different object. Alignment is invariant to the predicate names the model invents in its program. Anchoring is exact on the statute side, because each graph node carries its verbatim defined-term string, and the lexical lookup for case facts starts from that string.

Research Program

The system has three components.

The first is a statute connection graph extractor. It turns a statute section into nodes and edges. Nodes are defined terms, conditions, and subsection identifiers. Edges are definition-to-use links, explicit cross-references, and the conjunction, disjunction, and exception structure of conditions. SARA v2's structure-extraction and coreference annotations give a gold version of this graph. We run every experiment with both the gold graph and an automatically extracted one, so that extraction error can be separated from the rest of the method.

The second is a statute compiler loop. A language model writes Prolog for the statute. We compute the program's predicate-dependency graph, with predicate names anonymized in the way FormulaNet anonymizes variables. We then compute a graph-matching alignment against the connection graph, using Smatch-style matching, which the FOL closeness-metrics study found catches the structural logic errors that BLEU misses. Any unmatched rule, missing edge, or unanchored predicate is returned to the model as a concrete diff. The program is frozen once alignment passes and syntax checks succeed. A second check requires the frozen program to pass the statute's own internal consistency queries, for example that exceptions do not make the base rule unreachable.

The third is a binding loop for each case. The model writes case facts, and the solver attempts the query. If the solver neither proves nor refutes it, we extract the leaves of the failed derivation that no fact supports, such as employee(alice, company, 2017). For each leaf, the model receives the exact statutory term and its definition and must either produce a fact with a quoted supporting span from the case text or declare the fact absent. A separate entailment check verifies that the span supports the fact. The loop backtracks when a binding produces a contradiction downstream. Facts with no span are rejected. The loop stops at a fixed call budget, informed by the observation in Yan et al. that gains plateau after 3–5 iterations.

Baselines

The naive reference point is direct prompting with the same language model: zero-shot, few-shot, and chain-of-thought on statute plus case. Can GPT-3 Perform Statutory Reasoning? reports up to 71% accuracy on SARA for GPT-3. On its synthetic statutes it reports 81% two-shot at 3-wide, 3-deep, and 78% zero-shot at 2-wide, 2-deep. We rerun this baseline with our chosen model rather than relying on those figures, because the figures come from an older model.

The second baseline is one-shot neurosymbolic translation in the style of LINC: the model writes statute and case Prolog in one pass, and the solver answers. The result is null if the program fails to run. No reported result found on Lacuna for LINC-style translation on SARA.

The strongest competitor is a generic solver-in-the-loop repair baseline modeled on ProofBridge's repair loop. The model rewrites the whole program, statute and facts together, using the raw solver error or failure message plus a language-model faithfulness judge in the role ProofBridge and Do LLMs Game Formalization? use. This is the most likely threat: if solver feedback alone fixes most errors, our structure adds nothing. No reported result found on Lacuna for any iterative repair loop on SARA or the synthetic statutes. The closest reported figure is ProofBridge's +31.14% semantic correctness on MINIF2F-TEST-PF, which is in a different domain.

For fairness, every system uses the same model, the same few-shot exemplars drawn from SARA's training split, the same maximum number of model calls per case (set to our system's median), and the same hyperparameter-tuning budget on the development split. Beating the strongest baseline means three things: higher SARA entailment accuracy and numerical exact-match accuracy at equal call budget; a lower fabrication rate, defined as rules or facts not traceable to statute nodes or case spans when checked against gold Prolog; and a larger margin on the lay-vocabulary split described below.

Three ablations isolate the key ingredients. The first removes graph alignment from the statute loop, using solver feedback only. The second removes leaf-targeted lookup from the binding loop, so that the full case is re-prompted for all facts. The third removes freezing, so that statute rules may be edited during case repair. Each ablation tests one claimed ingredient.

Why not just…?

Why not just run a generic repair loop on the whole program? This is the real threat, and the strongest baseline is designed to test it. The evidence against it as sufficient is indirect but specific. Do LLMs Game Formalization? shows that models under pressure to make proofs succeed modify formalizations by fabricating axioms, and a repair loop that can edit statute rules invites exactly this. If the generic loop matches our accuracy and our fabrication rate, the structural guard is unnecessary and we would report that. Our expectation is that it matches on accuracy for easy cases but fabricates more on cases where the gold answer requires "not entailed." Blair-Stanek et al. found a false-positive bias in exactly those cases.

Why not just bridge the vocabulary gap with query expansion or dense retrieval over the case? Dense retrieval alone ranked regulatory passages poorly in LeSeR (mAP@10 0.1077). Generative expansion in the style of InteR or RaFe can drift and add spurious legal terms. Both expand blindly, whereas our lookup is restricted to the concepts the solver proved it needs. The second ablation, untargeted re-prompting for all facts, is the direct test. If it equals targeted lookup on the lay-vocabulary split, solver localization is not contributing.

Why not just use a stronger model with chain-of-thought? On LaborBench, five frontier models with retrieval topped out at 0.691 F1 (LaborBench). On FOLIO, GPT-4 eight-shot reached 64.2% against 78.1% for a solver-backed pipeline (FOLIO). We still run the strongest available model directly. The synthetic-statute depth sweep will show whether its accuracy decays with depth while the solver-backed system stays flat.

Why not train a graph neural network on statute graphs, as FormulaNet and ENIGMA do? SARA has nine sections, too few to train one. A learned encoder would also reintroduce the overhead the connection-graph literature itself flags as a limitation. We use the graph only to check structure. A learned encoder becomes worth revisiting only for LaborBench-scale transfer.

Proposed Experiments

The main evaluation is SARA entailment and numerical tax questions, plus SARA v2 argument instantiation, which directly tests the stage that Holzenberger and Van Durme left near 50%. We build two stress splits.

The first is a lay-vocabulary split of SARA cases. An annotator rewrites each case story so that no statutory defined term appears; for example, "employer" becomes "the shop she worked at." Gold answers are unchanged. This split measures the vocabulary gap directly.

The second is a renamed synthetic-statute split, built with Blair-Stanek et al.'s width and depth generator. Defined terms are replaced with arbitrary coined words, so that memorized meanings cannot help. It tests whether graph alignment holds when names carry no information.

The decisive checks come in three parts. The first is whether the gap between our system and the generic repair loop is larger on the lay-vocabulary split than on original SARA, as solver-localized grounding predicts. The second is whether our fabrication rate, scored against gold Prolog, is substantially lower than the generic loop's at equal accuracy. The third is whether accuracy on the depth sweep stays flat past 3-deep, where prompting degrades. Comparing the gold-graph and extracted-graph runs shows how much of the remaining error is graph extraction.

As an exploratory transfer test, we compile the unemployment-insurance sections for a handful of states from StateCodes and answer the corresponding LaborBench boolean questions, comparing against the reported 0.691 peak F1. This is only indicative, since LaborBench has no gold logic and differs in format.

A negative result would still be informative. If generic repair matches everything, then fabrication in statutory autoformalization is less severe than in Lean theorem proving, and the extra structure is not worth its cost.