arXiv(opens in a new tab)cs.CLAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.23353

FormuEvo: LLM-Guided Evolution for Discovering Solver-Efficient Mixed-Integer Programming Formulations

Haofeng Yuan, Jianing Peng, Jieyi Bi, Ni Zhang, Shiji Song, Zhiguang Cao

Abstract

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×5.5\times, with distilled knowledge transferring effectively across problems and model scales.

1 Introduction

Mixed-integer programming (MIP) plays a fundamental role in decision-making across domains such as manufacturing, transportation, and management (Bixby, 2012; Wolsey, 2020; Clautiaux

Figure

(a) Human Expert

(b) Fine-tuned LLM

(c) FormuEvo: LLM-Guided Evolution of MIP Formulations

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.

and Ljubić, 2025). The practical success of MIP has been largely driven by decades of advances in powerful solvers such as Gurobi (Gurobi, 2026) and COPT (Ge et al., 2022), which integrate sophisticated algorithmic components including branch-and-bound, cutting planes, and various heuristics to solve problems of growing scale and complexity.

A well-established principle in mathematical programming is that a single optimization problem may admit multiple mathematically equivalent MIP formulations, which guarantee the same optimal solution but can differ by orders of magnitude in computational efficiency (Wolsey, 2020). Consequently, the practical tractability of MIP depends not only on constructing a mathematically correct formulation, but also on designing one that is computationally strong, namely, whose structural properties enable MIP solvers to operate efficiently.

Despite its fundamental importance, discovering

†^{\dagger}Corresponding author.

Code: https://github.com/Xyz-yuanhf/formuevo solver-efficient MIP formulations has long been regarded as one of the most challenging and expertise-intensive problems in operations research (Vielma, 2015). Even experienced experts require substantial domain knowledge and structural insights to craft a strong formulation (Fig. 1(a)). This challenge is further complicated by the fact that modeling intuitions can become outdated: with the development of modern MIP solvers, classical modeling strategies once regarded as “best practices”, such as certain strengthening constraints or symmetry-breaking rules, can inadvertently interfere with the advanced presolving procedures, cut generation, and heuristic routines, leading to counter-intuitive performance degradation (Achterberg and Wunderling, 2013; Salvagnin, 2018). This motivates a new automated approach capable of discovering solver-efficient MIP formulations and adaptable to the advancing algorithmic internals of modern solvers.

Large language models (LLMs) have recently demonstrated remarkable promise in automating MIP modeling from natural language (Wang et al., 2025; Qian et al., 2025; Zhou et al., 2026). By fine-tuning based on curated formulation datasets, they have effectively bridged the gap between natural language problem descriptions and executable MIP modeling programs via end-to-end generation (Fig. 1(b)). However, their objective is correctness and executability, namely, producing a formulation that accurately encodes the target problem and can be successfully solved by a downstream solver. As a result, the formulations they generate, though correct, are often computationally naive, falling far short of strong formulations required for large-scale real-world optimization.

To address this gap, we propose FormuEvo, a novel LLM-guided evolutionary framework for automated discovery of solver-efficient MIP formulations. Rather than treating formulation design as single-pass generation, FormuEvo reframes it as evolutionary optimization over the symbolic space of MIP formulations, which are represented as executable modeling programs. Given a natural language problem description and a formulation template, FormuEvo maintains a population of candidate formulations, iteratively applying LLM-driven crossover, mutation, and repair operations guided directly by the solver performance, progressively evolving toward solver-efficient formulations (Fig. 1(c)). To move beyond blind exploration, FormuEvo introduces two key mechanisms: 1) a solver-informed diagnosis mechanism, where a diagnostic LLM converts fine-grained solver statistics into interpretable verbal gradients, guiding evolution toward targeted refinement, and 2) a structured memory, which abstracts prior experience into reusable modeling strategies, avoiding redundant exploration while further enabling zero-shot transfer to unseen problems and bootstrapping smaller LLMs by distilling a generalizable knowledge base. Our main contributions are as follows:

• We propose FormuEvo, an LLM-guided evolutionary framework for automated discovery of solver-efficient MIP formulations.

• We introduce a solver-informed diagnosis mechanism that leverages fine-grained solver statistics for targeted, solver-aware evolution.

• We develop a structured memory that distills reusable knowledge, enabling efficient search and transfer across problem and model scales.

• FormuEvo discovers non-obvious MIP formulations that outperform the state-of-the-art baselines, accelerating MIP solvers by up to 5.5×5.5\times.

References (34)

  • Dongdong Ge, Qi Huangfu, Zizhuo Wang, Jian Wu, and Yinyu Ye. 2022. Cardinal optimizer (COPT) user guide. arXiv preprint arXiv:2208.14314. (opens arXiv in a new tab)
  • Milad Yazdani, Mahdi Mostajabdaveh, Samin Aref, and Zirui Zhou. 2025. EvoCut: Strengthening integer programs via evolution-guided language models. arXiv preprint arXiv:2508.11850. (opens arXiv in a new tab)
  • Detailed instance splits in the experiments are shown in Table 5
  • >TSP</td><td>Easy</td><td>30 cities</td></tr><tr><td>Medium</td><td>50 cities</td></tr><tr><td>Hard</td><td>100 cities</td></tr><tr><td rowspan=
  • The problem is defined on a complete graph where each pair of cities $(i,j)$ is associated with a travel distance (or cost) $c_{ij}$
  • For each machine $k$, consider the operations processed on $k$ and sort them lexicographically by $(\underline{s}_{ij} + p_{ij}, \bar{s}_{ij})$
  • The state set $\mathcal{S}$ is generated by subset-sum reachability over the scaled item sizes
  • Each facility i incurs a fixed opening cost $f_i$ and has a maximum supply capacity $C_i$
  • Cross-block consistency is enforced by anchor-slice coupling, and symmetry is broken via cumulative prefix inequalities
  • This problem can be modeled as an MIP. The objective is to minimize the total number of rectangles used
  • Strong aggregated cuts enforce exact cover by projecting onto rows, columns, and the total area
  • The reconstruction of $c_{ij}$ follows the standard 2D difference-array scheme: each rectangle variable $y_{i_1i_2ab}$ induces a unit increment over its support via corner updates +1 at $(i_1, a)$, -1 at $(i_1, b+1)$, -1 at $(i_2+1, a)$, and +1 at $(i_2+1, b+1)$
  • You specialize in translating the problem description and its preliminary Gurobi models into mathematically correct, high-efficiency, and numerically stable Gurobi models implemented in Python using ‘gurobipy’
  • A concise but technically clear idea of key modeling improvements and any non-trivial reformulations
  • Your role is to examine the solver performance profile of a given formulation and produce a concise, actionable diagnostic report that will guide a downstream mutation agent in evolving this formulation into a computationally superior variant
  • Here we present the prompt of general mutation, and other operators are similar in structure, available in our code repository
  • You specialize in evolving a baseline formulation through rigorous mathematical refinement, polyhedral lifting, and innovative paradigm shifts, transforming it into a mathematically correct and substantially more efficient model implemented in Python using ‘gurobipy’
  • Explain the specific local structural improvements and why they reduce solving time
  • Your role is to distill actionable, transferable insights and knowledge from MIP formulation evolutions by analyzing parent-offspring relationships and extracting concise experience triplets
  • Your role is to distill multiple memory libraries (may be problem-specific) into a single, unified, general-purpose knowledge base of MIP formulation principles that are transferable to any new optimization problem
  • Each library contains experience triplets with Condition, Strategy, and Effect
  • If so, split into two entries with refined, non-overlapping Conditions
  • For most problems such as TSP, CFLP, and the NNV and IMO tasks, FormuEvo achieves statistically significant improvements ($p < 0.01$) across all categories
  • floor effect
  • COPT (Ge et al., 2022) and SCIP (Hojny et al., 2025), and rerun the evolution process under each solver
  • Meanwhile, we observe substantial variation in the relative performance of different formulations across solvers (e.g., MTZ and MCF-RLT, FormuEvo and FormuEvo-G)
  • For TSP, we test on the 200-city instances from the Solomon benchmark suite (Solomon, 1987)
  • As shown in Table 9, FormuEvo achieves the best overall performance with $\rho = 0.3$ and $\gamma = 0.7$, which is selected as our default setting
  • >Param.</td><td>Easy</td><td>Medium</td><td>Hard</td></tr><tr><td rowspan=
  • Existing LLM-based modeling approaches primarily focus on semantic correctness and syntactical executability through supervised and reinforcement fine-tuning
  • Instead of relying solely on the static capability of pre-
  • As shown in our results and Fig
  • Existing fine-tuned modeling approaches rely on extensive curated datasets, long training times, and substantial GPU resources
  • Existing fine-tuned modeling approaches are typically specialized to particular modeling languages, prompting formats, and solver interfaces seen during training, making them extremely sensitive to distribution shifts and implementation-specific overfitting