NTH

FLARE: Verifying MILP Reformulations with LLM-Based Theorem Proving

AuthorsHenry Robbins, Connor Lawless, Madeleine Udell, Ellen Vitercik

August 29, 2026 2 min read
Watch on YouTube
The one-line take

FLARE uses LLMs and Lean proofs to reliably check whether automatically generated optimization formulations are mathematically correct.

Key results

20
FormulationBench problems

Benchmark size in optimization problems.

109
FormulationBench formulations

Total MILP formulations in the benchmark.

100%
FLARE NP-hard accuracy

Accuracy on the 54-pair NP-hard subset.

30x
FLARE-NL speedup

FLARE-NL is faster than certificate-producing FLARE.

25x
FLARE-NL cost reduction

FLARE-NL is cheaper than FLARE.

5
Invalid EvoCut cutting planes

Invalid cutting planes identified through formal verification.

What the paper found

FLARE addresses a central reliability problem in LLM-generated mixed-integer linear programming: numerical checks on one instance can miss reformulation errors on unseen instances. It introduces a constructive definition requiring explicit parameter, forward, backward, and strictly monotone objective mappings that preserve feasibility and objective values for every instance. An LLM agent translates both formulations into Lean, then uses the Lean-LSP-MCP and automated theorem proving to construct a certificate that compiles without sorry or new axioms. On FormulationBench, containing 20 problems and 109 formulations, FLARE achieved 100% accuracy on the 54-pair NP-hard subset and generated a machine-checkable certificate for every accepted reformulation. The benchmark exposed 5 invalid cutting planes from EvoCut and 4 invalid reformulations from prior LLM-based modeling work. For lower-stakes screening, FLARE-NL prompts a reasoning model with the formal definition and explicit assumptions; it also achieved 100% accuracy, while being 30x faster and 25x cheaper than FLARE. The main implementation used Anthropic’s Claude Code with Opus 5, while comparisons included OpenAI’s GPT-5.6 Sol and DeepSeek V4 Pro, showing that theorem-proving reliability depends strongly on the agent and proof-search capability. FLARE’s guarantee remains conditional on faithful formalization and proves validity, not invalidity, but it establishes a practical route from automated optimization modeling to formally certified reformulations.

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 (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.

Read the original paper

More in AI Reasoning

Browse all 39 papers →
02Reasoning

On Language Drift during RLVR Post-Training

Michael Sullivan, Alexander Koller

RLVR can make reasoning models increasingly use strange internal languages, and preventing that drift may require sacrificing some performance.

Read analysis