Introduction
Mathematical optimization is the backbone of logistics, supply chain management, and energy systems. However, translating a natural language "word problem" into a precise Mixed-Integer Linear Programming (MILP) model is a high-skill task that typically requires years of training in Operations Research (OR). While Large Language Models (LLMs) are proficient at general coding, they often struggle with the nuances of optimization, such as "subtour elimination" in routing problems or sign conventions in flow-conservation constraints. Furthermore, existing benchmarks are often "noisy," containing missing data or incorrect ground-truth answers, which complicates training and evaluation.
Methodology: The OptiMind Framework
OptiMind addresses these challenges by systematically integrating optimization expertise into two stages of the LLM lifecycle: expert-guided data cleaning and hint-augmented inference.
- Expert-Guided Data Cleaning (Training): Instead of training on raw synthetic data, the authors mapped problems into 53 canonical classes (e.g., Bin Packing, Traveling Salesman). Experts identified common failure modes for each class. A strong model (GPT-OSS-120B) then regenerated solutions guided by these hints and "majority voting" to ensure high-quality training labels.
- Hint-Augmented Inference (Test-time): During inference, the system classifies the input problem and retrieves a targeted "hint" (e.g., "When solving TSP, remember to fix one city's position to avoid subtours").
- Test-Time Scaling: The framework employs self-consistency (sampling multiple solutions with majority voting) and multi-turn correction, where generated code is executed in a solver (like Gurobi) and error logs are fed back to the LLM for self-correction.
Datasets and Cleaning Efforts
The study evaluates OptiMind on three challenging benchmarks: IndustryOR, Mamo-Complex, and OptMATH. A significant contribution of this work is the manual re-cleaning of these benchmarks. The authors found that 30–60% of original test instances were incorrect or underspecified. By releasing these cleaned versions, the researchers provide a more reliable foundation for future optimization research.
Key Insights: The Power of the Hint
A core finding is that class-specific hints are highly generalizable. Even for novel problems, knowing the recurrent pitfalls of a specific problem class significantly boosts accuracy.
Expertise, rather than just scale, appears to be the primary bottleneck. By cleaning data and providing structured guidance, a 20B parameter model (GPT-OSS-20B) outperformed much larger open-source models and rivaled proprietary frontier models. Even models like GPT-5 showed accuracy gains when provided with expert hints, suggesting that domain-specific guardrails are universally beneficial.
Results
OptiMind improved absolute formulation accuracy by 13% to 21% over the base GPT-OSS-20B model across all benchmarks. The fine-tuned 20B model achieved a weighted mean accuracy of 81.7%, surpassing all open-source baselines of similar or larger size. Additionally, multi-turn feedback and majority voting provided consistent gains, demonstrating that "thinking longer" (test-time compute) is particularly effective for structured mathematical reasoning.
Limitations and Future Work
Currently, OptiMind focuses strictly on Linear and Mixed-Integer Linear programming. Non-linear problems remain out of scope due to scarce training data. Furthermore, the multi-turn correction relies on solver access (Gurobi). Future work aims to expand these principles to non-linear domains and specialized enterprise-specific scenarios where problem classes are even more specialized.
Summary updated