Toward a Trustworthy Optimization Modeling Agent via Verifiable Synthetic Data Generation

Vinícius Lima, Dzung T. Phan, Jayant Kalagnanam, Dhaval Patel, Nianjun ZhouarXiv 2025 · DOI

Introduction

Optimization is a cornerstone of modern industrial operations, powering everything from logistics and supply chains to energy grid management. However, a significant "modeling bottleneck" exists: translating complex, real-world business requirements described in natural language into rigorous mathematical models, such as Mixed-Integer Linear Programs (MILP), requires specialized expertise that is in short supply.

While Large Language Models (LLMs) offer a potential solution for automating this "Natural Language to Optimization" (NL2Opt) task, they are currently hindered by three primary challenges: the difficulty of verifying model correctness, a scarcity of high-quality annotated datasets, and the reasoning complexity required to avoid cascading errors during multi-stage translation.

The OptiTrust Framework

To address these hurdles, researchers have introduced OptiTrust, a modular LLM agent designed to bridge the gap between text and executable code through a specialized, multi-agent architecture and a novel data generation strategy.

Modular Agent Architecture

OptiTrust decomposes the modeling task into three distinct stages, each handled by a specialized sub-agent:

  1. Decomposition Agent: Extracts variables, objectives, and constraints from the raw problem description.
  2. Formulation Agent: Converts these extracted components into formal mathematical notation (LaTeX).
  3. Code Agent: Translates the mathematical formulation into executable code using libraries like Pyomo or Gurobipy.
The OptiTrust Agent architecture consists of three specialized modules: Decomposition, Formulation, and Code Agents, each with internal validation loops.

A key innovation in the Code Agent is the use of multi-language redundancy. By generating solutions in five different modeling languages simultaneously and applying a majority-vote consistency check, the system can identify and filter out logic errors that might occur in a single code version.

Verifiable Synthetic Data Generation (SDG)

To overcome data scarcity, the team developed a "backward" pipeline. Instead of labeling existing text, the pipeline starts with a symbolic representation where the optimal solution is already known. A "teacher" LLM then generates the corresponding natural language description and math. Because the ground truth is established at the start, the pipeline can automatically verify the generated training examples, resulting in a 100% verifiable dataset of 15,000 samples used to fine-tune an IBM Granite 3.2 8B model.

Experimental Results

OptiTrust was evaluated against seven major public benchmarks: NL4Opt, EasyLP, NLP4LP, ReSocratic, ComplexOR, IndustryOR, and ComplexLP. Notably, the researchers used OptiTrust to audit these benchmarks, discovering and correcting error rates in the original "ground truth" labels of up to 11%.

Performance comparison of OptiTrust against GPT-4 and other state-of-the-art methods across seven optimization benchmarks.

As shown in the results, OptiTrust established a new state-of-the-art (SOTA) by achieving the highest accuracy on 6 out of 7 benchmarks. It demonstrated significant performance leaps, particularly on the NL4Opt (91.6%) and NLP4LP (94.4%) datasets, frequently outperforming much larger proprietary models like GPT-4 by substantial margins.

Conclusion and Future Work

OptiTrust demonstrates that high-quality, reasoning-heavy synthetic data allows relatively small open-source models to outperform massive general-purpose LLMs on specialized domain tasks. While the system excels at linear and mixed-integer problems, challenges remain for highly complex, lengthy industrial descriptions. Future research will focus on extending this verifiable pipeline to non-linear optimization and improving the agent's ability to infer missing constraints in under-specified real-world problems.

Summary updated

BibTeX
@misc{lima2025toward,
  author = {Vinícius Lima and Dzung T. Phan and Jayant Kalagnanam and Dhaval Patel and Nianjun Zhou},
  title = {{Toward a Trustworthy Optimization Modeling Agent via Verifiable Synthetic Data Generation}},
  year = {2025},
  eprint = {2508.03117},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.03117},
}
Figure