OptiVer: Unleashing the Power of LLMs for Optimization Modeling via Dual-Side Verification

Haoyang Liu, Jie Wang, Boxuan Niu, Xiongwei Han, Mingxuan Ye, Zijie Geng, Fangzhou Zhu, Jianye HaoOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

Large Language Models (LLMs) are surprisingly good at writing code for optimization problems, but they often miss the underlying mathematical logic. OptiVer is a new framework that fixes this by using "Dual-Side Verification"—checking both the structural consistency of the model and the logical validity of the resulting solution—boosting modeling accuracy by over 20% compared to standard methods.

What Problem Does This Paper Address?

In Operations Research (OR), translating a real-world problem described in natural language (e.g., "optimize this canal network's water flow") into a formal mathematical model is a high-stakes task. While LLMs have become the go-to tool for automating this, they suffer from a "silent failure" mode: the code they generate might run perfectly in a solver like Gurobi, but the underlying math is fundamentally flawed.

The authors identify two main gaps:

  1. Missing Implicit Constraints: LLMs often overlook constraints that humans take for granted, such as flow-balance (what goes in must come out).
  2. Surface-Level Debugging: Existing self-correction strategies usually only trigger when the code throws an error. If the code runs but produces a nonsensical answer, the system assumes success.

Methods

The authors introduce OptiVer, a multi-agent framework that treats optimization modeling as a "coarse-to-fine" process. Its architecture consists of three main pillars:

  • Structure-Augmented Modeling: Instead of jumping straight to math, the system first distills a "Multi-Level Structure" (High-level problem type, Medium-level variant, and Low-level specific constraints). This acts as a template to ensure the LLM "recalls" standard OR principles before writing a single line of code.
  • Structure-Side Verification: This uses a "back-translation" approach. One agent takes the generated mathematical model and translates it back into an abstract natural language structure. A second agent compares this "back-translation" to the original problem description to spot omissions or mismatches.
  • Solution-Side Verification: This is the "common sense" check. After the solver produces a numerical answer, an agent interprets those numbers in the context of the real-world problem. Another agent then critiques that interpretation to see if it violates basic logic (e.g., "Wait, you're shipping more fish than the trucks can hold").
  • Refinement Agent: If either verification step fails, a refinement agent uses the specific feedback to iterate on the model.

Datasets

The framework was evaluated across five diverse and popular OR benchmarks:

  • NL4Opt: Elementary linear programming problems.
  • Mamo ComplexLP: A mathematical modeling benchmark with solvers.
  • ComplexOR: A dataset focused on linear and mixed-integer programming.
  • IndustryOR: 100 challenging problems from various industrial scenarios (categorized into Easy, Medium, and Hard).
  • OptMATH: A scalable bidirectional data synthesis framework for modeling.

Key Insights and Ideas

  • The "Back-Translation" Breakthrough: Borrowing from machine translation, the authors prove that a correct model must be "invertible." If you can't reconstruct the problem's requirements from the math model, the model is likely wrong.
  • Common Sense as a Debugger: Numerical solutions are a "richer source for identifying errors" than code execution logs. A successful execution doesn't mean a correct answer; a logical interpretation of the result often reveals the hidden math bugs.
  • Multi-Level Templates Matter: Breaking down problem structures into High (e.g., Max Flow), Medium (e.g., Multi-commodity), and Low (e.g., fluctuating capacities) levels provides the necessary flexibility to handle unique real-world cases without forcing them into rigid, predefined categories.

Key Results

  • Superior Accuracy: OptiVer achieved an average improvement of ~20% in solving accuracy (SA) over standard prompting methods.
  • Beating the Giants: Remarkably, OptiVer (using GPT-4o-mini as a base) outperformed state-of-the-art reasoning models like DeepSeek-R1 and OpenAI-o1 on several benchmarks.
  • Efficiency Gains: Compared to other multi-agent frameworks like OptiMUS, OptiVer has a simpler workflow, leading to shorter inference times and lower token usage (reducing costs by roughly 10-20%).
  • Generalization: The system showed strong performance even on "Hard" problems in the IndustryOR dataset that don't fit into conventional problem classifications.

Limitations and Future Work

  • Manual Labeling Hurdles: The authors noted that evaluating "Hard" problems was labor-intensive because datasets like IndustryOR lack step-by-step ground-truth labels for verification analysis.
  • LLM Interpretation Limits: The solution-side verification relies on the LLM's ability to reason about "common sense." While effective, it is still bounded by the underlying model's reasoning capabilities.
  • Future Directions: The authors suggest exploring more automated ways to generate ground-truth structures for complex, non-standard problems to further scale the verification process.

Summary updated

BibTeX
@misc{liu2026optiver,
  author = {Haoyang Liu and Jie Wang and Boxuan Niu and Xiongwei Han and Mingxuan Ye and Zijie Geng and Fangzhou Zhu and Jianye HAO},
  title = {{OptiVer: Unleashing the Power of LLMs for Optimization Modeling via Dual-Side Verification}},
  year = {2026},
  url = {https://openreview.net/forum?id=w696Vhv5B2},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure