Evolving Checkers for Silent Translation Errors in Logic Solvers

Large language models get worse at logic problems as the number of chained inference steps grows. One well-supported fix is to have the model translate the problem into formal logic and let a symbolic solver, a program that performs exact deduction, do the chaining. Solvers do not tire at step six. The weak point then moves to the translation step. In one open-world system, 78.54% of failures come from the model mistranslating natural language into logic (Open-World LLM Logical Reasoning). These errors are silent: the formula parses, the solver runs, and it returns a confident wrong answer. Current repair loops catch syntax errors, or they ask the same language model to judge whether its own translation is faithful.

We propose a different source of feedback. An LLM-driven evolutionary search would write and improve a library of small, deterministic Python checkers. Each checker inspects a problem and its proposed formalization and flags a specific kind of silent mistranslation. Examples include a predicate spelled two ways across premises, which breaks the chain between them; a negation present in the text but missing from the formula; or a premise whose symbols never connect to the goal. The search is trained once against labeled translations. The checkers then persist across problems, and at test time they drive the repair loop instead of an LLM judge.

Core Claim

Once deduction is handed to a solver, what still decays with depth is translation fidelity. It compounds over the number of premises a proof has to use, not over the number of reasoning steps the model writes out. If each premise on the proof path is translated faithfully with probability $q$, and a proof needs $m$ premises, a sound solver answers correctly with probability roughly

$$A(m) \approx q^{m}.$$

This follows from the same independence argument that gives chain-of-thought its $p^n$ decay over $n$ steps (RuleBERT). Most harmful errors break links between premises rather than individual premises, so they are properties of the whole formalization and can be detected by structure. Our claim is that evolved checkers raise the effective $q$ more than same-model judgment does, and that they do so in a way that transfers across benchmarks. A flatter accuracy-versus-depth curve on depth-controlled data would be the signature of success.

Relation to Prior Work

Three systems motivate the claim by showing that solvers remove step-wise decay but inherit translation errors. Logic-LM translates problems into logic for Z3, Prover9 or Pyke, and repairs only solver syntax errors. Open-World LLM Logical Reasoning (OpenIKLR) uses Prover9 to locate missing premises and reports that translation dominates its failures. Relational Programming with Foundational Models (VIEIRA) reaches 100% on Tracking Shuffled Objects, but only with hand-written Datalog skeletons.

LOGIC-LM++ is the closest competitor. It repairs one formalization per problem, using LLM pairwise comparison and backtracking. We keep its backtracking but replace the judge with evolved checkers. We also carry what is learned across problems, which Logic-LM++ discards once each problem is answered.

The evolutionary method is borrowed directly from prior work. EVIL evolves short NumPy programs with MAP-Elites, a search that keeps the best program in each of several behavioral niches, for under $1 per run. [MCTS-AHD](/work/monte-carlo-tree-search-for-comprehensive-exploration) and [$A_2$DEPT](/work/a-2-dept-large-language-modeldriven-automated-algorithm) show that tree search with program repair beats one-shot LLM design, and [Zhang et al.](/work/understanding-the-importance-of-evolutionary-search) find that standalone LLMs design heuristics poorly without evolution. All of that work evolves numerical optimizers whose fitness is an optimality gap. We evolve diagnostic programs whose fitness is how accurately they detect errors. $A_2$DEPT's own finding shapes this choice: its dependency checker cannot detect runtime-clean semantic errors, and those errors are exactly our target.

Work on the semantic-structural gap supplies the design principle. SKILL-KNN and LogicPro both show that the logical skeleton of a problem, not its vocabulary, is what matters. Our checkers are built to test skeleton-level invariants, such as symbol linkage, polarity and quantifier scope, so they should transfer across domains where vocabulary-bound prompts do not.

Research Program

The first step is to build labeled translation pools. Depth-controlled generators, PRONTOQA-OOD and DyVal, supply gold logic for unlimited problems at chosen depth. We also use FOLIO's training split, whose premises come with first-order annotations (FOLIO). We sample many LLM formalizations of each problem. Each formalization is labeled by whether the solver answer is correct and, where gold logic exists, by which premises diverge from the gold version.

The search itself uses MAP-Elites. Each individual is a pure-Python checker with no LLM calls. It may call the solver, for example to test whether the goal's symbols are reachable from the premises or to extract a counter-model. It returns flags that point to specific premises. The behavioral niches are clusters of failure types, so the library stays diverse instead of collapsing onto the most common error. Fitness is flag precision and recall for predicting wrong answers on held-out pool items, with a penalty for flagging correct formalizations. A cheaper proxy step then measures downstream gain when the checker's flags are fed into one repair round.

At inference, the checker library runs on each formalization. Its located flags become repair instructions for the translating LLM, and a Logic-LM++-style backtracking step reverts any repair that raises the flag count or changes the answer while new flags appear. A problem stops once no flags remain or the budget runs out.

Baselines

The naive reference points are few-shot chain-of-thought and plain Logic-LM. On FOLIO, 8-shot GPT-4 scores 64.2% and Logic-LM with GPT-4 scores 78.1% (FOLIO). These numbers define the gap that translation repair has to close.

The strongest existing method is Logic-LM++, reported at 84.80% on FOLIO and 46.32% on AR-LSAT with GPT-4 (LOGIC-LM++). For open-world evaluation, the strongest baseline is OpenIKLR at 68.53% on Multi-LogiEval with 90% of premises missing, using DeepSeek-V3.2 (Open-World LLM Logical Reasoning). No reported result was found on Lacuna for either system on ProofWriter or PrOntoQA individually.

The original backbones may be unavailable, so we rerun every baseline on one shared current backbone, with the same solvers, the same demonstrations, and a matched cap on LLM calls per problem. The reported figures serve only to confirm that our reproductions are faithful. The one-time search cost is reported separately and amortized over the test sets. Beating Logic-LM++ means higher accuracy at an equal or smaller per-problem call budget on FOLIO test and AR-LSAT, significant under paired bootstrap across three seeds. On Multi-LogiEval, beating OpenIKLR means the checkers improve it when inserted into its translation stage.

Two ablations isolate the key ingredient. In the first, the checker library is replaced by an expert-written set of lint rules of similar size. In the second, the same evolutionary budget is spent on evolving the translation prompt and demonstrations rather than checkers.

Why not just…?

Why not just sample several translations and majority-vote the solver answers? This is a genuine threat, since it costs nothing to implement. Our expectation is that it helps little on systematic errors. A model that habitually drops a quantifier's scope will drop it in most samples, so the votes agree on the wrong answer. We run self-consistency at matched calls. We also report the fraction of problems where the majority answer is wrong while one of our checkers fires on that majority formalization. If voting matches our method, the correlated-error story is false, and we will say so.

Why not just let the LLM judge its own translations, as Logic-LM++ does? Its pairwise comparison uses the same model that produced the error. The Logic-LM++ authors note that this judgment weakens on long, intricate problems, which are the deep ones. The depth-stratified comparison on PRONTOQA-OOD and DyVal settles the question directly. If the judge's advantage shrinks with depth while the checkers' does not, deterministic checking is the right source of feedback.

Why not just hand-write the obvious checks? Some of the most useful checks, such as dangling predicates, may be obvious. The hand-written ablation is therefore central to the proposal. If expert rules match evolved ones, the contribution reduces to a solid linting study. The evolutionary claim survives only if evolved checkers find error types absent from the expert set, and those types account for measurable accuracy.

Why not just evolve the translator prompt or retrieve skill-matched demonstrations? SKILL-KNN shows that structure-based retrieval of demonstrations helps, gaining 78.3% versus 74.6% on Spider, and prompt evolution is a natural competitor. Both, however, act before translation and cannot catch an error that happens anyway. We hypothesize that checkers transfer better because they test invariants of the logic rather than domain phrasing. The test is to evolve both on PRONTOQA-OOD plus FOLIO and evaluate on AR-LSAT, whose constraint-satisfaction format neither system saw during search.

Decisive Experiments

The first check is the depth curve. On PRONTOQA-OOD and DyVal we vary the number of premises a proof requires from 2 to 8 and fit $\log A$ against $m$. Success means a significantly smaller slope for the checker-driven loop than for Logic-LM and Logic-LM++. Chain-of-thought is plotted alongside to show the step-wise decay being replaced.

The second check is failure attribution. We repeat OpenIKLR's error analysis on its own benchmark and ask whether the share of failures due to translation, 78.54% in that paper, drops once our checkers are inserted.

The third check is transfer without re-evolution. The library is evolved only on PRONTOQA-OOD and FOLIO training data and applied unchanged to FOLIO test, ProofWriter, AR-LSAT and Multi-LogiEval.

The fourth check measures label efficiency and cost. We track how checker precision scales with the size of the labeled pool, and we report search cost in dollars against EVIL's reference of about $1 per run.

A clean negative result on the first check would be the most informative outcome. If translation fidelity does not in fact decay with premise count, the $q^m$ framing is wrong and the proposal should be abandoned.