TL;DR
FormuEvo is an LLM-guided evolutionary framework that automatically discovers computationally efficient Mixed-Integer Programming (MIP) formulations. By converting fine-grained solver logs into "verbal gradients" and utilizing a structured memory library, it optimizes the symbolic structure of optimization models, accelerating downstream solvers by up to 5.5× over expert-designed baselines.
What Problem Does This Paper Address?
Mixed-Integer Programming (MIP) is a mathematical framework used to solve complex decision-making problems in logistics, manufacturing, and management. A fundamental quirk of MIP is that a single problem can be written in many mathematically equivalent ways. While they yield the exact same optimal solution, their execution times on commercial solvers can differ by orders of magnitude based on structural properties like relaxation tightness and symmetry.
Recently, Large Language Models (LLMs) have been used to automate MIP modeling from natural language. However, these models operate in an "open-loop" fashion, prioritizing semantic correctness (getting valid code) while ignoring formulation strength (how fast it runs). As a result, they generate naive textbook formulations that scale poorly. Crafting solver-efficient formulations typically requires rare human expertise, which is increasingly bottlenecked as modern solvers introduce highly complex, opaque internal heuristics.
Methods
FormuEvo reframes formulation design as an evolutionary optimization problem over the symbolic space of executable code (e.g., Python code using the Gurobi library). Instead of relying on blind mutations, it coordinates an evolutionary loop using five specialized LLM modules:
- Generator LLM: Creates the initial population of formulations and performs crossover and mutation operations.
- Diagnostic LLM: Acts as the core innovation. Instead of treating the solver as a black box that only outputs runtime, it analyzes fine-grained solver statistics (e.g., presolve outcomes, root node gap, branch-and-bound node counts) and translates them into actionable "verbal gradients" to guide targeted code refinements.
- Repair LLM: Automatically debugs syntax errors or correctness violations in generated candidates.
- Reflector LLM: Abstracts successful and failed iterations into a structured memory library using three fields: Condition, Strategy, and Effect.
- Distiller LLM: Condenses problem-specific memories into high-level, problem-agnostic optimization principles.
Datasets
The authors evaluated FormuEvo across five classical linear and non-linear optimization benchmarks:
- Traveling Salesman Problem (TSP)
- Job-Shop Scheduling Problem (JSSP)
- Bin Packing Problem (BPP)
- Capacitated Facility Location Problem (CFLP)
- Quadratic Assignment Problem (QAP)
To test the framework's limits beyond well-studied textbook problems, they also introduced two novel, challenging tasks where human-designed priors are scarce: Neural Network Verification (NNV) and a mathematical grid-covering challenge derived from IMO 2025 Problem 6. Models were evolved on "Easy" instances and evaluated on "Medium" and "Hard" instances, alongside large-scale public datasets like the Solomon (TSP) and Taillard (JSSP) benchmarks.
Key Insights and Ideas
- Theoretical Tightness ≠ Solver Efficiency: Human experts often prioritize formulations with the tightest theoretical relaxation bounds (such as the MCF-RLT formulation for TSP). However, FormuEvo demonstrated that heavily extended formulations can introduce too many variables and constraints, overwhelming the solver's internal mechanics. FormuEvo successfully discovered simpler, structurally optimized variants that run much faster.
- Solver Logs as Verbal Gradients: By reading rich internal solver statistics, the Diagnostic LLM can pinpoint exactly why a piece of code is slow (e.g., identifying weak big-M constraints causing excessive branching) and tell the Generator LLM exactly what to fix.
- Bootstrapping Smaller Models: High-level modeling strategies distilled from a powerful model (like GPT-5.4-mini) can be transferred to smaller, cheaper models (like GPT-5.4-nano). This structured domain expertise allows lightweight models to nearly match the evolutionary convergence and performance of their larger counterparts.
Key Results
- Massive Speedups: FormuEvo discovered non-obvious formulations that accelerated modern MIP solvers by up to 5.5× compared to the best human-expert and LLM baselines.
- Superior Generalization: While existing fine-tuned LLM baselines (like ORLM and StepORLM) failed to generate valid formulations for the novel NNV and IMO tasks, FormuEvo successfully optimized them, proving highly adaptable to entirely unseen problem structures.
- Solver Robustness: FormuEvo's evolutionary gains were not locked to a single solver backend; it demonstrated consistent performance improvements when evaluated on alternative solvers like COPT and SCIP.
Limitations and Future Work
Currently, FormuEvo focuses entirely on discovering static MIP formulations that can be solved directly by off-the-shelf solvers. However, massive, industrial-scale problems often rely on dynamic decomposition algorithms (such as Benders decomposition or column generation), where variables and constraints are added iteratively during the solving process. In these scenarios, formulation design and algorithm development are tightly coupled. The authors note that extending FormuEvo to jointly evolve both reformulations and decomposition-based solution algorithms is a highly promising but substantially more challenging future direction.
Summary updated