Organizations: Key Laboratory of System Software (Chinese Academy of Sciences), Institute of Software, Chinese Academy of Sciences, Beijing, China · University of Chinese Academy of Sciences, Beijing, China · Birkbeck, University of London, United Kingdom · Nanjing Institute of Software Technology, Nanjing, China
Solving constraints involving inductive (aka recursive) definitions is challenging. State-of-the-art SMT/CHC solvers and first-order logic provers provide only limited support for solving such constraints, especially when they involve, e.g., abstract data types. In this work, we leverage structured prompts to elicit Large Language Models (LLMs) to generate auxiliary lemmas that are necessary for reasoning about these inductive definitions. We further propose a neuro-symbolic approach, which synergistically integrates LLMs with constraint solvers: the LLM iteratively generates conjectures, while the solver checks their validity and usefulness for proving the goal. We evaluate our approach on a diverse benchmark suite comprising constraints originating from algebrai data types and recurrence relations. The experimental results show that our approach can improve the state-of-the-art SMT and CHC solvers, solving considerably more (around 25%) proof tasks involving inductive definitions, demonstrating its efficacy.
Figures & tables
Benchmark
Total
LLM4Ind
cvc5
Vampire
Racer
<1200s
<360s
<1200s
<360s
<1200s
<360s
<1200s
<360s
StandardDT
241
212
200
150
150
160
160
N/A
N/A
StandardDTLIA
168
134
127
76
76
58
56
40
40
AutoProofBM
141
65
61
34
34
3
3
N/A
N/A
IndBen
156
114
104
34
34
122
118
N/A
N/A
Total
706
525
492
293
293
343
337
40
40
Table 1: Comparison with baseline SMT solvers
Benchmark
Qwen
DeepSeek
Gemini
GPT-5
LLM4Ind
Naive
LLM4Ind
Naive
LLM4Ind
Naive
LLM4Ind
Naive
StandardDT
212
160
206
153
206
155
212
180
StandardDTLIA
134
88
131
90
119
91
144
106
AutoProofBM
65
42
63
43
68
49
67
46
IndBen
114
89
121
79
126
76
129
118
Total
525
379
521
365
514
371
552
450
Table 2: Results of LLM4Ind using different LLMs and naive prompt strategy
Benchmark
W. filter
W.o. filter
Avg time (s)
R1
R2
R3
Avg
R1
R2
R3
Avg
W. filter
W.o. filter
StandardDT
212
211
207
210
204
203
209
205.3
83.91
67.26
StandardDTLIA
134
137
135
135.3
134
139
134
135.7
97.53
112.05
AutoProofBM
65
61
64
63.3
60
64
64
62.7
99.10
103.61
IndBen
114
111
111
112
113
106
111
110
168.92
178.64
Total
525
520
517
520.7
511
512
518
513.7
107.59
107.37
Table 3: Results of LLM4Ind with and without filter over three runs
Benchmark
T = 0.1
T = 0.5
T = 0.9
T = 1.3
R1
R2
R3
R1
R2
R3
R1
R2
R3
R1
R2
R3
StandardDT
211
206
210
207
209
207
212
211
207
208
209
210
StandardDTLIA
135
139
135
136
138
138
134
137
135
140
136
135
AutoProof
60
62
62
61
62
61
65
61
64
60
60
65
IndBen
114
108
114
110
107
113
114
111
111
119
113
112
Total
520
515
521
514
516
519
525
520
517
527
518
522
Table 4: Results of LLM4Ind with different sampling temperatures
Benchmark
Total
LLM4Ind -V
cvc5
Vampire
Racer
<1200s
<360s
<1200s
<360s
<1200s
<360s
<1200s
<360s
StandardDT
241
214
206
150
150
160
160
N/A
N/A
StandardDTLIA
168
80
73
76
76
58
56
40
40
AutoProofBM
141
19
16
34
34
3
3
N/A
N/A
IndBen
156
140
140
34
34
122
118
N/A
N/A
Total
706
453
435
293
293
343
337
40
40
Table 5: Comparison with baseline SMT solvers (Vampire backend)
Large Language Models (LLMs) struggle to solve complex combinatorial problems through direct reasoning, so recent neuro-symbolic systems increasingly use them to synthesize executable solvers. A central design question is how the LLM should represent the solver, and whether it should also attempt to optimize search. We introduce CP-SynC-XL, a benchmark of 100 combinatorial problems (4,577 instances), and evaluate three solver-construction paradigms: native algorithmic search (Python), constraint modeling through a Python solver API (Python + OR-Tools), and declarative constraint modeling (MiniZinc + OR-Tools). We find a consistent representational divergence: Python + OR-Tools attains the highest correctness across LLMs, while MiniZinc + OR-Tools has lower absolute coverage despite using the same OR-Tools back-end. Native Python is the most likely to return a schema-valid solution that fails verification, whereas solver-backed paths preserve higher conditional fidelity. On the heuristic axis, prompting for search optimization yields only small median speed-ups (1.03-1.12x) and a strongly bimodal effect: many instances slow down, and correctness drops sharply on a long tail of problems. A paired code-level audit traces these regressions to a recurring heuristic trap. Under an efficiency-oriented prompt, the LLM may replace complete search with local approximations (Python), inject unverified bounds (Python + OR-Tools), or add redundant declarative machinery that overwhelms or over-constrains the model (MiniZinc + OR-Tools). These findings support a conservative design principle for LLM-generated combinatorial solvers: use the LLM primarily to formalize variables, constraints, and objectives for verified solvers, and separately check any LLM-authored search optimization before use.
Haoyu Wang, Yuliang Song, Tao Li +5
University of Pennsylvania · University of Toronto · Google DeepMind +1
First-order concept synthesis asks a system to infer one formula that classifies labeled objects consistently across several finite relational structures. Every candidate can be evaluated exactly, but quantified first-order formulas form a vast search space, and LLM outputs are often semantically promising without being fully correct. We introduce Hypothesis Frontier, a verifier-guided neurosymbolic framework that evaluates each LLM formula on every training object, retains the strongest verified hypothesis across rounds, and uses its remaining errors to guide subsequent generation. Symbolic processing repairs invalid formulas while remaining anchored to the LLM-generated hypothesis, and simplifies train-valid formulas without changing any training prediction. Under matched models, problem sets, and LLM-round budgets, Hypothesis Frontier solves substantially more problems than repeated original-prompt generation. After the final formulas are selected, exact simplification shortens many train-valid formulas while preserving every training prediction. Exact symbolic reasoning therefore helps both to solve more induction problems and to compress many of the resulting formulas.
LLMs can solve program synthesis tasks but remain inefficient and unreliable on hard instances requiring large combinatorial search. Given a small set of reasoning traces, we use coding agents to compile them into reusable symbolic program synthesizers over constrained DSLs. The resulting solvers require no LLM calls at test time and are strong standalone systems: symbolic solver ensembles reach 91.3% accuracy on PBEBench-Lite and 84.7% on PBEBench-Hard, outperforming LLMs with test-time scaling for the latter by +16.3 percentage points at zero LLM inference cost. They also complement LLM search, improving PBEBench-Hard accuracy from 68.4% to 85.8% while reducing reported token usage by 78%, and raising SLR-Bench hard-tier accuracy from 34.4% to 58.0% in a neuro-symbolic hybrid setting. Compared to directly using coding agents as per-instance solvers, induced solvers are substantially more Pareto-efficient, amortizing a small one-time construction cost over many zero-token executions. Finally, most solvers transfer zero-shot to a real historical linguistics task - predicting sound changes in natural language data - reaching 80.1% accuracy under ensembling and recovering some plausible linguistic rules. Together, these results show that reasoning traces can be compiled into reusable symbolic solvers that solve many tasks directly, complement LLM inference on hard cases, and provide a scalable route to domain-general solver induction. We release code and data for reproducibility.
Atharva Naik, Yash Mathur, Prakam +2
Carnegie Mellon University · Independent Researcher