FLARE: Verifying MILP Reformulations with LLM-Based Theorem Proving
Henry Robbins, Connor Lawless, Madeleine Udell, Ellen Vitercik
cs.AI
Aug 25, 2026 · v1
cs.LO math.OC
TL;DR
Encodes a constructive definition of MILP reformulation in Lean and uses an LLM agent with ATP to produce machine-checkable reformulation certificates.
Abstract
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.
Problem
Verifying that AI-generated MILP reformulations preserve the underlying optimization problem is hard; existing methods only check equivalence numerically on single instances and cannot reason about all instances in general.
Approach
A constructive, formulation-level definition of MILP reformulation is formalized in Lean, using its Mathlib library and ATP tooling. FLARE uses an LLM-based agent together with the Lean proof assistant to verify a proposed reformulation against a reference by producing a machine-checkable certificate valid over all instances. A lighter FLARE-NL variant uses natural-language LLM reasoning without producing a certificate. FormulationBench, a benchmark of 20 problems and 109 Lean-formalized formulations with ground-truth certificates, is introduced for evaluation.
Results
FLARE achieves 100% accuracy on the NP-hard subset of FormulationBench and produces certificates for accepted reformulations, outperforming instance-level baselines like Execution and EquivaMap. FLARE-NL matches this accuracy at lower cost and time but without certificates. The authors also found several invalid AI-generated cutting planes and reformulations from prior work.
| Method | Cert. | Precision | Recall | Accuracy | Avg. Cost |
|---|
| Execution | ✗ | 85.1% | 95.2% | 83.3% | — |
| EquivaMap (Opus) | ✗ | 88.1% | 88.1% | 81.5% | $0.026 |
| FLARE (Opus) | ✓ | 100% | 100% | 100% | $1.180 |
| FLARE-NL (Opus) | ✗ | 100% | 100% | 100% | $0.048 |
Method comparison on FormulationBench NP-hard subset