arXiv(opens in a new tab)cs.AIAug 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2608.25220

FLARE: Verifying MILP Reformulations with LLM-Based Theorem Proving

Henry Robbins, Connor Lawless, Madeleine Udell, Ellen Vitercik

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 1^{1} (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 2^{2}, 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. 3^{3} These methods enable reliable verification in automated optimization modeling.

Keywords Mixed Integer Linear Programming · Automated Theorem Proving · Large Language Models

1 Introduction

Mixed-Integer Linear Programming (MILP) is a fundamental tool for combinatorial optimization with applications in scheduling [17, 32], planning [48], energy [31, 45], and chip design [53]. A central challenge in MILP is problem formulation: translating a real-world scenario into a concrete mathematical model. Historically, problem formulation has required significant technical expertise. However, recent work has highlighted the ability of LLMs to translate natural-language problem descriptions into MILP formulations [1, 3, 9, 25, 63]. The primary objective is to generate MILP formulations that faithfully represent the underlying optimization problem.

Developing a faithful formulation is just the first stage in the modeling process. The same problem can often be expressed by multiple formulations that can lead to dramatically different solve times. In practice, experts use techniques like reformulation [56], decomposition [61], and cutting planes [43] to obtain efficient MILP formulations. LLMs offer the potential to automate this process [16, 66]. More generally, we can view optimization modeling as a special case of algorithm design, where the chosen model dictates the algorithm’s runtime. In this broader context, LLMs have recently been used to iteratively evolve efficient algorithms through generation and evaluation [41, 47, 52, 67]. This approach has led to advances in mathematical discovery [22], vehicle routing [24, 64], and system design [23].

Key Challenges. A central challenge in automated algorithm design, particularly acute in the context of optimization modeling, is to ensure that an AI-generated formulation faithfully represents the original problem. Existing approaches rely heavily on heuristics, most commonly comparing optimal objective values on a single instance [1, 25, 37]. However,

1^{1}FLARE is implemented in the milp-flare Python package; see https://flare.henryrobbins.com.

2^{2}Download via the formulation-bench Python package; see https://formulation-bench.henryrobbins.com.

3^{3}All experimental code is available at https://github.com/henryrobbins/flare.

A

Figure

B

Figure

Figure 1: The FLARE workflow. (a) An agent is given templated LTEX and Python representations of a pair of MILP formulations and their parameter mapping, and is instructed to formalize them in Lean. Combined with our Lean formalization of MILP reformulation, these outputs yield a formal claim that formulation B is a reformulation of A under the fixed parameter map. (b) The agent then attempts to construct a Lean proof of that claim. The Lean-LSP-MCP allows the agent to obtain detailed feedback from the Lean process as it develops the proof.

such checks are unreliable and can fail under simple transformations such as adding cutting planes or rescaling an objective (see [68] for a discussion).

Inspired by Karp reductions in complexity theory, Zhai et al. [68] introduced EquivaMap, which uses LLMs to discover how solutions map between formulations. However, EquivaMap still operates at the instance level. It validates a reformulation for a specific instance (e.g., a particular set of jobs to schedule) but not in general (e.g., any possible set of jobs to schedule). Such instance-level checks can miss formulation inconsistencies that arise on other problem instances. For example, we identify several cutting planes proposed by an LLM-based modeling framework called EvoCut [66] that pass instance-level validation but remove optimal solutions for some instances. To mitigate this risk, we seek formulation-level guarantees that hold for every problem instance. Such guarantees require reasoning over all instances, rather than computationally evaluating a small subset of instances.

Our Contributions. This paper introduces FLARE, an automated framework for validating reformulations at the formulation level. FLARE uses formal verification to make universal claims over problem instances machine-checkable, leveraging recent advances in automated theorem proving (ATP) to generate reformulation proofs automatically [42].

Classic notions of reformulation require reasoning about optimal solution sets and are not well-suited to ATP. To address this challenge, we introduce and formalize a constructive definition of reformulation that requires explicit mappings between parameter spaces, feasible regions, and objective values. FLARE instantiates this definition with autoformalized MILP formulations to obtain a formal statement that can be certified with ATP. Provided the formalizations are faithful, a certificate proves a reformulation is valid for all problem instances. If ATP fails to produce a certificate, FLARE does not certify the reformulation as valid. FLARE is the first automated approach to produce verifiable reformulation certificates, enabling trustworthy optimization modeling with LLMs.

We also introduce FLARE-NL, a fast and cheap proxy that prompts a frontier reasoning model with the same definition. The two methods serve different regimes. A FLARE certificate on faithful formalizations admits no false positives; this property is critical in settings with zero tolerance for error (e.g., energy [31]). FLARE-NL is faster and cheaper but offers no such guarantee, making it the natural choice in non-critical settings or as a screening heuristic prior to FLARE.

Our contributions can be summarized as follows:

• Constructive definition of MILP reformulation. We introduce a constructive definition of MILP reformulation that is amenable to formal verification and ATP, enabling the first automated method for certifying reformulations at the formulation level.

• AI for formulation verification. We develop FLARE, a framework that combines LLM-based autoformalization with ATP to generate machine-checkable reformulation certificates, and FLARE-NL, an LLM proxy that trades formal guarantees for improved speed and cost.

• Realistic benchmark for reformulation. We introduce FormulationBench, a benchmark dataset of 20 problems and 109 formulations capturing realistic modeling transformations. Empirically, we show both FLARE and FLARE-NL outperform existing methods, achieving 100% accuracy on the NP-hard subset of FormulationBench.

• Demonstrated need for formal proofs. We apply FLARE to prior AI-driven MILP transformations, revealing 5 invalid cutting planes proposed by EvoCut [66] and 4 reformulations proposed in Ferchtandiker et al. [16]: these “equivalent” formulations are wrong or omit necessary assumptions (Appendix F).

References (60)