FormuEvo: LLM-Guided Evolution for Discovering Solver-Efficient Mixed-Integer Programming Formulations
Authors: Haofeng Yuan, Jianing Peng, Jieyi Bi, Ni Zhang, Shiji Song, Zhiguang Cao
Organizations: Department of Automation, BNRist, Tsinghua University · College of Computing and Data Science, Nanyang Technological University · School of Computing and Information Systems, Singapore Management University
Mixed-integer programming (MIP) lies at the core of operations research and industrial optimization. While large language models (LLMs) have recently shown promise in automated MIP modeling from natural language, they prioritize semantic correctness but overlook formulation strength, severely bottlenecking the efficiency of downstream solvers. We propose FormuEvo, an LLM-guided evolutionary framework for automated discovery of solver-efficient MIP formulations. FormuEvo frames MIP formulation design as evolutionary optimization over the symbolic space of MIP formulations, represented as executable modeling programs, by iteratively generating, evaluating, and selecting stronger candidates via LLM-driven crossover, mutation, and repair operations. To move beyond blind exploration, FormuEvo introduces a solver-informed diagnosis mechanism that exploits fine-grained solver statistics as verbal gradients for targeted refinement. Additionally, a structured memory abstracts prior experience into reusable modeling strategies, avoiding redundant exploration while enabling zero-shot transfer to unseen problems and bootstrapping smaller LLMs. Experiments across diverse linear and non-linear problems demonstrate that FormuEvo discovers formulations that significantly outperform both expert-designed formulations and existing LLM-based approaches, accelerating solvers by up to 5.5×, with distilled knowledge transferring effectively across problems and model scales.
Figures & tables
Figure 1: MIP formulation design via (a) human experts, (b) LLM fine-tuning with end-to-end generation, and (c) the LLM-guided evolution framework of FormuEvo.
Figure 2: The overview of FormuEvo. FormuEvo iteratively evolves formulations through LLM-driven crossover, mutation, and repair toward better solver efficiency, guided by solver-informed diagnosis and structured memory.
Figure 3: Example of a structured memory entry.
Easy
Medium
Hard
Formulation
Time ↓
Wins ↑
Time ↓
Wins ↑
Time ↓
Wins ↑
Solved ↑
TSP
MTZ Miller et al. (1960)
0.9578
0/100
6.1826
5/100
95.1315
0/100
62/100
SCF Gavish and Graves (1978)
0.3079
3/100
1.0065
10/100
8.3315
3/100
100/100
MCF-RLT Balma et al. (2018)
3.2729
0/100
84.1649
0/100
600.0570
0/100
0/100
ORLM Huang et al. (2025)
0.9575
2/100
6.3270
0/100
92.5953
0/100
62/100
StepORLM Zhou et al. (2026)
1.7667
0/100
17.0081
0/100
173.8792
0/100
64/100
Table 1: Performance on classical MILP and MINLP problems.
Formulation
Time ↓
Wins ↑
Solved ↑
NNV
Std. Formu. Tjeng et al. (2019)
69.5200
9/100
71/100
ORLM / StepORLM
-
-
-
EvoCut Yazdani et al. (2025)
67.6093
13/100
73/100
FormuEvo (Ours)
21.4139 (+68.3%)
78/100
86/100
IMO
Std. Formu. Art of Problem Solving Wiki (2025)
114.0912
0/4
3/4
ORLM / StepORLM
-
-
-
Table 2: Performance on two novel MIP problems.
Method
Easy
Medium
Hard
TSP
Best Baseline
0.3079
1.0065
8.3315
FormuEvo
0.1410
0.5640
3.9469
w/o Memory
0.1776
0.6102
4.6649
w/o Diagnosis
0.2308
0.7350
6.5207
JSSP
Best Baseline
0.3005
1.7270
17.6653
FormuEvo
0.2781
1.5316
15.4237
Table 3: Ablation study of FormuEvo components.
Figure 4: Transfer performance on smaller LLMs.
Method
Cost
Easy
Medium
Hard
TSP
Best Baseline
-
0.3079
1.0065
8.3315
GPT-5.4-mini
∼\mathdollar 2
0.1410
0.5640
3.9469
Claude-Sonnet-4.6
∼\mathdollar 10
0.1017
0.4777
4.0148
DeepSeek-V4-Flash
∼\mathdollar 0.5
0.1498
0.6283
5.3068
JSSP
Best Baseline
-
0.3005
1.7270
17.6653
GPT-5.4-mini
∼\mathdollar 3
0.2781
1.5316
15.4237
Table 4: Impact of different backbone LLMs.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Problem
Category
Configuration
TSP
Easy
30 cities
Medium
50 cities
Hard
100 cities
JSSP
Easy
8 jobs, 8 machines
Medium
10 jobs, 10 machines
Hard
12 jobs, 12 machines
Appendix
Table 5: Instance splits for experiments.
Problem
Easy
Medium
Hard
TSP
1.88E-17
2.79E-13
4.13E-18
JSSP
7.83E-02
1.13E-03
2.44E-02
BPP
2.82E-01
9.29E-02
2.50E-02
CFLP
4.98E-13
3.03E-10
2.20E-08
QAP
4.44E-01
7.93E-02
3.05E-02
NNV
-
-
1.42E-14
Appendix
Table 6: Wilcoxon signed-rank test p -values.
Easy
Medium
Hard
Formulation
Time ↓
Wins ↑
Time ↓
Wins ↑
Time ↓
Wins ↑
Solved ↑
TSP
MTZ Miller et al. (1960)
5.5116
0/100
79.9319
0/100
517.6449
0/100
8/100
SCF Gavish and Graves (1978)
0.8488
12/100
5.6820
15/100
129.9687
16/100
95/100
MCF-RLT Balma et al. (2018)
3.8573
0/100
56.2487
0/100
626.8963
0/100
1/100
ORLM Huang et al. (2025)
5.5235
0/100
80.0451
0/100
517.7556
0/100
8/100
StepORLM Zhou et al. (2026)
4.4893
0/100
66.7571
0/100
479.0096
0/100
13/100
Appendix
Table 7: Performance based on COPT solver.
Easy
Medium
Hard
Formulation
Time ↓
Wins ↑
Time ↓
Wins ↑
Time ↓
Wins ↑ *
Solved ↑
TSP
MTZ Miller et al. (1960)
4.7167
0/100
62.3060
1/100
563.1162
12/100
11/100
SCF Gavish and Graves (1978)
4.4918
1/100
44.2718
4/100
600.0065
0/100
0/100
MCF-RLT Balma et al. (2018)
67.1733
0/100
600.0136
0/100
600.2085
0/100
0/100
ORLM Huang et al. (2025)
4.7421
2/100
62.0028
3/100
563.5875
12/100
11/100
StepORLM Zhou et al. (2026)
5.4227
3/100
84.3814
2/100
591.2279
13/100
3/100
Appendix
Table 8: Performance based on SCIP solver.
Figure 5: Performance comparisons on public benchmark instances. Left: Solomon benchmark of TSP Solomon (1987) . Right: Taillard benchmark of JSSP Taillard (1993) .
Param.
Easy
Medium
Hard
ρ
0.0
0.1579
0.6128
4.1886
0.3
0.1410
0.5640
3.9469
0.5
0.1903
0.6451
4.3993
0.7
0.1862
0.6472
4.4488
1.0
0.1456
0.5719
3.9436
γ
0.0
0.1776
0.6102
4.6649
Appendix
Table 9: Analysis of evolutionary hyperparameters.
Figure 6: An illustration of the evolutionary process of FormuEvo (on TSP).
Mixed-Integer Linear Programming (MILP) is a fundamental tool for combinatorial optimization with extensive real-world applications. A central challenge is designing computationally efficient MILP formulations. Large Language Models (LLMs) offer new opportunities to automate the modeling process, from deriving formulations to strengthening them. Reliable automation requires robust methods for verifying that proposed formulations preserve the underlying optimization problem. However, existing approaches evaluate formulations numerically and fail to reason about general problem instances. We resolve this limitation by introducing a constructive definition of MILP reformulation that can be formalized in Lean and machine-checked. We develop FLARE (Formulation-Level Automated Reformulation Evaluation), a method that uses an LLM-based agent and the Lean proof assistant to verify proposed reformulations against a reference formulation. To evaluate our approach, we introduce FormulationBench, a challenging dataset of 20 problems and 109 formulations. FLARE outperforms existing methods, with 100% accuracy on the NP-hard subset of FormulationBench. Furthermore, FLARE produces a machine-checkable certificate for every reformulation it accepts. For cases where formal guarantees are not necessary, we introduce FLARE-NL, a fast and cheap LLM proxy that matches FLARE's accuracy but produces no certificate. These methods enable reliable verification in automated optimization modeling.
Configuring the hyperparameters of Mixed-integer programming (MIP) solvers is a high-dimensional, instance-dependent optimization problem where suboptimal settings can degrade solving time by orders of magnitude. Default configurations are often suboptimal, while traditional tuning methods either suffer from the ``cold-start'' problem and inefficient search or heavily rely on expert experience. This paper introduces GRIMIP (General Reasoning for Instance-specific MIP configuration), a novel hybrid intelligence framework that synergistically integrates the semantic reasoning capabilities of Large Language Models (LLMs) with the sample-efficient search of Bayesian Optimization (BO). GRIMIP enables the LLM to function as a complete probabilistic surrogate within the BO loop, significantly improving performance and reducing sampling and evaluation costs. On seven benchmarks including MIPLIB, GRIMIP achieves over 40% reduction in Primal-Dual Integral on hard instances, outperforming SMAC and other LLM-assisted BO methods. By granting LLMs sufficient autonomy, GRIMIP combines the expert-level reasoning of LLMs with the efficient search of BO, achieving state-of-the-art performance.
Yidong Luo, Xuemin Chen, Chenguang Wang +3
School of Data Science, The Chinese University of Hong Kong, Shenzhen · School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen · Noah’s Ark Lab, Huawei
Combinatorial problems appear in numerous industrial applications. A common approach is to formulate these problems as declarative constraint models that can subsequently be compiled to and solved by a range of back-end solvers. Recent work shows that Large Language Models (LLMs) can produce correct models from natural language, but even a correct model can be expensive to solve because performance remains sensitive to modelling choices. In this work, we investigate whether LLMs can automate performance-oriented model reformulation. Inspired by Automatic Heuristic Design (AHD), we use an evolutionary framework in which an LLM proposes candidate reformulations that are verified and benchmarked against the user-defined baseline model. We compare AHD-adapted search strategies that control which prior attempts, instructions, and measured feedback enter each prompt. Existing retention strategies prioritize recency or performance, but do not explicitly diversify the context. To cover this gap, we introduce Profile-Diverse Retention (PDR), which applies Maximal Marginal Relevance (MMR) to instance-level runtime vectors to retain behaviourally diverse attempts. We systematically evaluate the strategies on eight CSPLib problems using validation-based final model selection. The results show that: (i) iterative reformulation can produce substantial held-out speedups; (ii) strategies that keep the retained context diverse outperform those that retain only recent or the fastest attempts; and (iii) validation-based selection improves the held-out speedup of every strategy.
Kostis Michailidis, Dimos Tsouros, Nguyen Dang +1
1DTAI, KU Leuven, Belgium · University of Western Macedonia, Greece · University of St Andrews, United Kingdom