# Solver-Like Behavior in Large Language Models as Formalizers

Solver-like reasoning is common in formalizers and mostly redundant

Rikhil Amonkar, Stuti Mohan, Kevin Nguyen, Ceyhun Efe Kayan, Ronan Le Bras, Li Zhang · arXiv · 2026-11-2

- **Problem** Formalizers are judged only by their program's output, so a program that just repeats an answer already found in the reasoning trace goes unnoticed. The trace often does the solver's job, but nobody measured how much.
- **Method** The authors label each generation's trace, program and output with an ontology of solver-like behavior. LLM judges, checked against human labels, apply the labels to 2,000 generations.
- **Results** Solver-like behavior appears in 85% of traces and takes 24% of reasoning tokens. Only 9% of programs inherit the trace's answer, and they also inherit its errors.

## Why output checks miss the trace

A formalizer is a language model that writes a formal program, and a solver executes that program to find the answer. The paper argues that output checks cannot see what happens in the reasoning trace before that program is written.

Constraint satisfaction is NP-complete, and solver-like tokens grow with the instance. The cost is therefore paid in reasoning tokens even when the solver would have found the answer.

The second cost concerns verification rather than tokens. A program that prints the answer from the trace, which the authors call inheriting it, passes output-based evaluation. The authors test this across three reasoning models and four constraint satisfaction datasets, each formalized in Z3 or PDDL and in Python.

Their LLM judges agree with blind human labels on 94% of paragraphs. The ontology in the next section makes it possible to see what an output check hides.

## An ontology for solver-like behavior

Solver-like behavior is defined as text in the reasoning trace that does the solver's job on the instance, namely assigning, testing or ruling out values of decision variables. The ontology treats each task as a constraint satisfaction problem with decision variables and constraints, where encoding is the model's job and finding satisfying values is the solver's.

Figure 2 applies every definition to a toy seating problem with Ann, Bob and Cy in chairs 1 to 3.

Node A2 applies only when A1 is SLB and asks whether every decision variable receives a value, making the trace complete rather than partial. A partial trace can include a tentative answer that the trace later abandons. The solver-like ratio is the share of the trace that is solver-like.

For the program, the ontology records how much of the reasoning answer the program inherits instead of computing it. Node B2 marks a partly fixed program that computes the answer but writes trace decisions into its source, which can be harmless or even necessary for a numerical BlocksWorld constraint.

For the output, node C compares the program's output with the reasoning answer and applies when A2 is complete and the program runs. Node C1 asks whether the reasoning answer equals the program's output, and node C2 asks whether the reasoning answer passes the validator used to score the program. The labels come from LLM judges for A1, A2 and B, while C1 and C2 are computed by scripts.

## Models, datasets and label checks

The study samples 100 instances from each of four benchmarks, and each dataset is formalized in two formal languages. ZebraLogic consists of logic grid puzzles, and BlocksWorld is classical planning. The imperative language is Python with only the standard library, so the model designs the search itself.

Three reasoning models write the traces, because closed frontier models return only a summary of their reasoning through their APIs. DeepSeek-V4-Flash runs via API, while GPT-OSS-120B and Qwen3.8-27B run locally with vLLM. The authors use Gemma 4 31B-it as the LLM judge for A1, A2 and B, a model that is not one of the evaluated models.

The A1 judge agreed with the blind human reference labels on 103 of 110 paragraphs. The reference samples are small, which limits how precisely judge agreement is known. The A1 reference came from one annotator labeling blind, using 70 development and 40 held-out paragraphs. The B judge was checked by a second model on blind labels and by a human on held-out programs, and C1 and C2 need no agreement check because scripts compute them.

The authors also note that B and C cover non-random subsets, with 1,791 of 2,000 programs that ran and 1,547 complete reasoning answers.

Placeholders and batching were tested on two models and not in PDDL, and placeholders were tested on two datasets only.

## How common solver-like behavior is and whether programs reuse it

Solver-like behavior turns up in most traces, and the paper treats it as the norm rather than an edge case. Across all traces, 24% of reasoning tokens are solver-like, and the rare exception is BlocksWorld in PDDL, with 51% of traces and a ratio of 0.04. A Qwen trace spends 3,788 of 15,310 tokens, and a GPT-OSS trace spends 575 of 1,892.

The amount of solver-like behavior also grows with problem size on Meeting Planning and ZebraLogic. Accuracy falls over the same range, from 0.70 to 0.51 on Meeting Planning and from 0.90 to 0.78 on ZebraLogic. GPT-OSS on ZebraLogic is the exception, and on Calendar and BlocksWorld the tokens don't grow.

The program rarely reuses this work, because it computes the answer anew in most cases. Of the generations whose trace contains SLB, the program is independent (B4) in 89% for DeepSeek and 77% for Qwen and GPT-OSS. So the trace's search duplicates the work the program then does.

Inheritance is a separate question, and the paper finds it rare among the 1,791 programs that ran. Of those programs, 163 inherit the reasoning answer, and 157 of them come from traces that contain SLB. Inherited programs split into 47 hardcoded, 88 partly fixed and 28 steered. The Figure 3 bars show that split for each dataset and formal language, with the B4 share in the model's colour.

![Figure 3: H1 and H2: solver-like behavior is common, and the program rarely inherits it. For each dataset and FL, the share of traces with SLB (A1) and the mea…](https://refivu.com/papers/ab6953be-bd0f-4ed3-b15d-be5b58aaeb44/figures/figure-5236fae87e404dad9dc62e0d4d95e20f.png?thumb=512)

**Figure 3** : H1 and H2: solver-like behavior is common, and the program rarely inherits it. For each dataset and FL, the share of traces with SLB (A1) and the mean solver-like ratio, with 95% confidence intervals. Each SLB bar is split by the program’s label (B): programs that inherit the reasoning answer (B1–B3, grey) at the bottom, independent programs (B4) in the model’s colour, and programs with no output (missing, failed, or printed nothing) hatched; most of these are Qwen’s Z3 programs, which call Z3 methods that do not exist. DeepSeek is run in one FL per dataset (–).

[Original paper](https://arxiv.org/abs/2611.02395v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Rikhil Amonkar, Stuti Mohan, Kevin Nguyen, Ceyhun Efe Kayan, Ronan Le Bras, Li Zhang · Solver-Like Behavior in Large Language Models as Formalizers · Original paper figure · Extracted the figure area from page 6 of the original PDF.

## Where inheritance occurs and what it costs

Inheritance is rare: of the 1,791 programs that ran, 163 take the reasoning answer. Of those 163, 47 are hardcoded, 88 are partly fixed, and 28 are steered. Most of the hardcoded programs come from one model on one dataset, GPT-OSS on Meeting Planning in Python, with 40 of them. Partly fixed programs cluster mostly on BlocksWorld, Meeting Planning and ZebraLogic.

The harm lies in errors that pass through inheritance. By contrast, 32% of the 84 independent programs are correct under a wrong reasoning answer, because they recompute the answer and can recover.

## Whether solver-like behavior affects accuracy

The authors ask whether more solver-like behavior goes with lower accuracy on the same problem.

Ten more points of solver-like ratio change accuracy by +0.007 \[−0.011,+0.022\]. A thousand more solver-like tokens change accuracy by +0.005 \[−0.002,+0.013\]. Within datasets, the ratio's effect lies between −0.03 and +0.02, except on BlocksWorld, where it is +0.047 \[+0.004,+0.083\]. Programs that inherit the reasoning answer are not less accurate on average (−0.00 \[−0.09,+0.07\]).

Traces with no SLB are less often correct, at −0.09 \[−0.15,−0.02\] relative to traces with some SLB. That gap sits mostly in programs that fail to run, where 25% crash against 12%. Among programs that run, the gap shrinks to −0.04 \[−0.09,+0.03\]. The authors cannot rule out that working through a problem helps a model write a program that runs.

The cautionary prompts and placeholders of §6 point the same way, since removing solver-like behavior doesn't lower accuracy. Still, the cautionary prompts remove only part of the behavior, so the observational test stays the main evidence.

## How the formal language changes solving in the trace

Python draws more solver-like behavior than Z3 or PDDL on the same problems, in every dataset. Qwen on ZebraLogic is the one exception to this pattern. The ratio is higher in Python by 0.06 \[0.04,0.08\] on Calendar and by 0.20 \[0.17,0.23\] on Meeting Planning than in Z3. On ZebraLogic the Python ratio is higher by 0.03 \[0.01,0.06\] than in Z3, and on BlocksWorld it is higher by 0.16 \[0.14,0.18\] than in PDDL.

These comparisons pool the two models, Qwen and GPT-OSS.

The authors tie the gap to how much search the formal language leaves to the model. A declarative language hands a hard search to the planner or the solver, as PDDL does for BlocksWorld and Z3 does for Meeting Planning's friend order. In Python, the model must program that same search over orders itself, which pushes its trace toward solving.

Calendar is a trivial search and ZebraLogic uses permutations in Python, so the formal languages differ little on those two datasets. With the formal language fixed, Meeting Planning reaches 0.38 in Python while the other datasets reach 0.19 to 0.25, but in Z3 the datasets range only from 0.18 to 0.19.

The linear model with all three factors, fit on Qwen and GPT-OSS, has an R2 of 0.27.

DeepSeek-V4-Flash is run in one formal language per dataset, so the formal language comparison rests on Qwen and GPT-OSS. The model behind the DeepSeek API changed between runs, so those runs cannot be reproduced exactly. The authors didn't test other task types or languages, so their gap may differ elsewhere. The reference labels for the B judge come from only 60 programs, so the judges' agreement rests on a small sample.

## Prompt changes that reduce solving

Cautionary prompts test whether a warning can shrink solving in the trace while the answer stays right. Cautionary A warns against precomputing the answer in the trace and hardcoding it, while Cautionary B warns against substituting given values into arithmetic. From a baseline ratio of 0.20, Cautionary A lowers the ratio by 0.053 \[0.045,0.061\] and Cautionary B by 0.058 \[0.051,0.065\].

Solver-like tokens drop by 689 and 443 per trace, which is 23% and 15%, yet most traces still contain SLB.

The warnings mostly remove hardcoded answers rather than inherited decisions. GPT-OSS's 40 hardcoded Meeting programs in Python fall to 0 and 1 under the two warnings. Its partly fixed programs rise from 11 to 15 and 7, because they still follow a friend order chosen in the trace.

Placeholders replace every value with a name, and the program receives the values only at run time. Solver-like tokens per problem fall by 97% \[96,98\], from 2,820 to 78, while the ratio falls from 0.25 to 0.005. Accuracy rises by 2.6 points \[−0.5,+5.9\], and the largest gain is GPT-OSS on Meeting Planning in Python, from 0.66 to 0.82. Qwen's reasoning per problem grows by 54%, so removing the solving lengthens its text.

Batching puts K problems into one prompt and asks for K separate programs. Solver-like tokens per problem fall by 62% \[55,68\], but reasoning tokens fall almost as much, at 61%. The ratio barely moves, at −0.02 \[−0.045,+0.001\], so batching costs accuracy, with a drop of 5.9 points \[−11.0,−0.5\]. Larger batches cut more, with solver-like tokens falling by 56%, 78% and 91% at K= 2, 5 and 10.

## What the limitations leave open

They didn't test these task types or languages, so the results don't transfer to them. So the formal language comparison in H4 rests on Qwen and GPT-OSS, and DeepSeek's runs can't be reproduced exactly. That difference may contribute to the gaps H4 attributes to the formal language.

Each problem was generated once per setting, so the intervals don't capture sampling variation across generations. The ontology labels come from LLM judges and scripts, and the judges agree well with reference labels. One annotator labeled the A1 and A2 references, and a second model wrote the blind B references. B and C cover non-random subsets: B only includes programs that run, which drops most of Qwen's crashing Z3 programs.

C compares only 1,314 of the 1,547 complete reasoning answers with the program's output.

C also covers only reasoning answers that the task's parser reads. The cautionary prompts reduce solver-like behavior without changing accuracy, but they remove only part of it. Placeholders remove almost all of it, but they apply only where a problem's values separate from its structure. The placeholder and batching tests cover two models and not PDDL, and placeholders cover two datasets.

The paper sees no direct path to misuse, but deployment carries a risk. All human reference labels were written by one author, an NLP researcher, using the judge prompt definitions.

## Paper info

- **Authors**: Rikhil Amonkar, Stuti Mohan, Kevin Nguyen, Ceyhun Efe Kayan, Ronan Le Bras, Li Zhang
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-2
- **Added**: 2026-11-4
- **Updated**: 2026-11-2
- **Version**: v1
- **arXiv**: 2611.02395
- **Category**: cs.CL · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.02395v1) · [PDF ↗](https://arxiv.org/pdf/2611.02395v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

In the LLM-as-formalizer paradigm, a large language model translates a problem into a formal program and leaves the search to a solver, gaining the solver's guarantees. Formalizers are now often reasoning models that write a long reasoning trace before the program, yet they are judged only by the program's output. We find that the trace routinely does the solver's job, assigning, testing and ruling out values until it often reaches the full answer; we call this solver-like behavior (SLB). We define an ontology of SLB over the trace, the program and its output, and use LLM judges, checked against human labels, to label 2,000 generations from three reasoning models on four constraint satisfaction datasets, each formalized in a declarative and an imperative formal language. SLB appears in 85% of traces and takes 24% of reasoning tokens, yet the program usually recomputes the answer, so the effort is redundant. The 9% of programs that inherit the trace's answer also inherit its errors, and pass output-based evaluation whenever that answer is correct. The amount of SLB is not associated with accuracy, and SLB is more common in imperative Python than in declarative Z3 or PDDL. Cautionary prompts reduce it by only a quarter, but hiding the problem's values behind placeholders, which the program receives only at run time, removes 97% of it without loss of accuracy. Formalizers should therefore be evaluated by how their programs are reached, not only by what they output.

## Quote from the paper

Rikhil Amonkar, Stuti Mohan, Kevin Nguyen, Ceyhun Efe Kayan, Ronan Le Bras, Li Zhang (2026). Solver-Like Behavior in Large Language Models as Formalizers. arXiv:2611.02395v1. https://arxiv.org/abs/2611.02395v1

**BibTeX**

```
@misc{amonkar2026solver,
  title = {{Solver-Like Behavior in Large Language Models as Formalizers}},
  author = {Rikhil Amonkar and Stuti Mohan and Kevin Nguyen and Ceyhun Efe Kayan and Ronan Le Bras and Li Zhang},
  year = {2026},
  eprint = {2611.02395},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.02395v1}
}
```

## Related papers

- [Isolating Perception for Multi-View Planning under Occlusion-Induced Partial Observability](https://refivu.com/en/papers/6ac42b45-0624-43a7-9143-e917da2b7cc2-isolating-perception-for-multi-view-planning-under-occlusion.md)
- [Negative-Only Policy Optimization for One-Sided Verifiable Rewards](https://refivu.com/en/papers/75703081-c2a7-460f-8f67-70f70b2f4385-negative-only-policy-optimization-for-one-sided-verifiable.md)
- [NLTK: The Natural Language Toolkit](https://refivu.com/en/papers/26e265b2-45d0-4d0e-b6a7-a161ecf1fe09-nltk-the-natural-language-toolkit.md)
- [One Scale, Four Texts: Gaps, Overlaps and Silent Repairs in Published Grading Schemes](https://refivu.com/en/papers/7382b199-bae9-4bd2-bc8a-099292ab3de8-one-scale-four-texts-gaps-overlaps-and-silent.md)
- [Learning to Discover at Test Time](https://refivu.com/en/papers/16b1e431-51ac-4e6b-a951-6aa5a5c017bb-learning-to-discover-at-test-time.md)
- [Test-Time Compute Scales Better with Parallel Agent Teams](https://refivu.com/en/papers/64aa4da2-a253-4014-ad8f-766a6ed0fbee-test-time-compute-scales-better-with-parallel-agent.md)

## Other paper commentary

- [A Capitulation Direction Emerges With Scale and Is Causally Load-Bearing Where Validation Is Strong: Eight Models, Two Families, and Five Measurement Hazards](https://refivu.com/en/papers/62d926b5-3969-4869-9b24-cd2b36931cf4-a-capitulation-direction-emerges-with-scale-and-is.md)
- [Revisiting LLM Homogeneity Through a Multidimensional Lens](https://refivu.com/en/papers/737f6d2c-f5de-442f-9089-d5b9542c97da-revisiting-llm-homogeneity-through-a-multidimensional-lens.md)
- [Who Asks, Who Answers: Linear Attention Builds the Query in Hybrid Language Models](https://refivu.com/en/papers/9550022a-ad1c-4740-b9d0-0f19e5a9c614-who-asks-who-answers-linear-attention-builds-the.md)
- [Precedent Labels and Facts Shift LLM Approval Decisions in Opposite Directions](https://refivu.com/en/papers/2be7501f-3661-46f2-9181-80fc53b03b68-precedent-labels-and-facts-shift-llm-approval-decisions.md)
- [Robustness Starts with the Objective: Designing and Certifying Robust LLM-Generated Heuristics](https://refivu.com/en/papers/c5ef476a-8e13-4a8d-9bf3-f756d8e0931c-robustness-starts-with-the-objective-designing-and.md)
- [Temperature, Not Knowledge: What Recursive Self-Training and Its Remedies Do to a Language Model's Confidence](https://refivu.com/en/papers/647a62a0-780f-4069-8540-3b3571002565-temperature-not-knowledge-what-recursive-self-training-and.md)
- [When Rewards Depend on the Group, GRPO Plays a Tournament](https://refivu.com/en/papers/a2b9f3f8-1578-44ec-a11c-495a5ef254da-when-rewards-depend-on-the-group-grpo-plays.md)
- [Ranked but Not Stopped: Detecting Prompt-Injection Hijacks from Typed Decision Models' Output Probabilities](https://refivu.com/en/papers/bc0899b3-aa3e-4335-8078-f8b1b1183609-ranked-but-not-stopped-detecting-prompt-injection-hijacks.md)
- [Better Answers, Weaker Evidence Control: Evidence Bypass in On-Policy Distillation](https://refivu.com/en/papers/4f3b67b5-c171-433a-9e16-cafa103c6614-better-answers-weaker-evidence-control-evidence-bypass-in.md)
- [Chain-of-Thought Oversight Requires Separate Evidence for Faithfulness and Monitorability](https://refivu.com/en/papers/637e8c32-6fd4-4664-b753-e762abe41dfe-chain-of-thought-oversight-requires-separate-evidence-for.md)
- [Beyond Validation Loss: Coverage and Reliability Dynamics in Robot Policy Pretraining](https://refivu.com/en/papers/477dd3a5-e6d5-42f9-a862-0cc60ed2edfa-beyond-validation-loss-coverage-and-reliability-dynamics-in.md)
- [Hinted Scaling Laws](https://refivu.com/en/papers/b98fdaf7-9c61-4bcc-a76e-766a349931d3-hinted-scaling-laws.md)

## Terms in this paper

- [PDDL](https://refivu.com/en/terms/f2ba72f3841e-pddl)
- [Python](https://refivu.com/en/terms/623e854e43eb-python)
- [Z3](https://refivu.com/en/terms/8cac2d32bf39-z3)
- [batching](https://refivu.com/en/terms/c7fae058b064-batching)
- [BlocksWorld](https://refivu.com/en/terms/334919a9ed66-blocksworld)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/ab6953be-bd0f-4ed3-b15d-be5b58aaeb44-solver-like-behavior-in-large-language-models-as)
