arXiv:2611.02395cs.CLNov 2026

Manuscript Offprint

arXiv:2611.02395

Solver-Like Behavior in Large Language Models as Formalizers

Rikhil Amonkar, Stuti Mohan, Kevin Nguyen, Ceyhun Efe Kayan, Ronan Le Bras, Li Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.¹

1 Introduction

In the LLM-as-formalizer paradigm (Tantakoun et al., 2025), a large language model (LLM) does not solve a problem but translates it into a formal program, such as a planning domain or a set of constraints, which a solver executes (Huang and Zhang, 2025; Lin et al., 2025; Amonkar et al., 2026). The

LLM handles language, and the solver performs the search with guarantees that the LLM's own reasoning lacks (Wei et al., 2025). Formalizers today are often reasoning models that write a long reasoning trace before the program. Yet they are judged almost only by whether the program's output is correct, which cannot tell a program that searches from one that restates an answer the model already worked out in its trace. The trace itself has gone unexamined: work on reasoning traces, which finds them often unfaithful or wasteful (Lanham et al., 2023; Arcuschin et al., 2025; Chen et al., 2025a; Sui et al., 2025), studies models that solve the problem themselves, and formalizer traces have been discussed only in passing (Amonkar et al., 2026).

We find that formalizers routinely do the solver's job themselves, a phenomenon we call solver-like behavior (SLB): before writing the program, the reasoning trace assigns, tests and rules out values of the problem's variables, often until it reaches the full answer (Figure 1). This defeats the purpose of formalization in two ways. It is costly: constraint satisfaction is NP-complete (Cook, 1971), and solving in tokens grows with the instance: on Meeting Planning, solver-like tokens nearly triple from the smallest to the largest problems, though the program usually searches anyway. And it can silently void the solver's guarantee: a program that prints the answer from the trace, i.e. inherits it, passes output-based evaluation while also inheriting the trace's errors, so where outputs are not independently validated, a formalization that looks correct may be no more verifiable than chain-of-thought.

We study SLB in three reasoning models on four constraint satisfaction datasets, each formalized in a declarative formal language (Z3 or PDDL) and an imperative one (Python). We define an ontology over the trace, the program and its output (Figure 2), label 2,000 generations with LLM judges that agree with blind human labels on 94% of paragraphs, and test four hypotheses (§5). (H1) SLB is

¹Our code is available at https://github.com/rikhil-amonkar/solver-like-behavior-in-llms.

Figure

Figure 1: Overview on a calendar scheduling problem (1). An LLM as formalizer writes a reasoning trace (2) and then a program (3), which is run and scored. The middle paragraph is solver-like: it solves the problem in the trace, finding first the common free intervals and then the meeting time, which is the solver's job; in real traces such a passage runs to hundreds or thousands of tokens. Our ontology (§3) labels every generation (4): whether the reasoning trace is solver-like (A), how much of the reasoning answer the program inherits (B), and whether the program's output matches the reasoning answer, which is checked for correctness (C). Here the program searches independently, so the solver-like behavior, 45% of the trace, was wasted.

common and redundant: 85% of traces contain it, yet the program usually recomputes the answer. (H2) Its forms differ in harm: the 9% of programs that inherit the reasoning answer also inherit its errors, and pass output-based evaluation whenever that answer is correct; hardcoding is rare and mostly comes from one model on one dataset. (H3) Its amount is not associated with accuracy on the same problem. (H4) The formal language matters most: Python draws more SLB than Z3 or PDDL in every dataset. Cautionary prompts cut SLB by about a quarter, while hiding the problem's values behind placeholders that the program receives at run time removes 97% of it without loss of accuracy (§6). SLB is thus pervasive and mostly redundant, and occasionally voids the solver's guarantee.