cs.LGSep 26, 2025

OptiMind: Improving Small Language Models for Optimization Modeling through Formulation Guidance and Multi-Turn Learning

Authors: Xinzhi Zhang, Zeyi Chen, Humishka Zope, Hugo Barbalho, Konstantina Mellou, Marco Molinaro, Janardhan Kulkarni, Ishai Menache, 

Organizations: University of Washington · Stanford University · Microsoft Research

Abstract

Mathematical optimization drives decisions in supply chains, logistics, energy, and scheduling, but translating natural-language problems into solver-executable formulations remains a bottleneck. While frontier models show promise for this task, many deployments require small language models (SLMs) that run locally under privacy, latency, and cost constraints. Existing SLMs are limited by noisy data, ambiguous benchmarks, and one-shot inference that ignores the iterative, feedback-driven nature of optimization modeling. To address these challenges, we introduce OptiMind, a system that combines data cleaning and class-specific hints with training using solver feedback. OptiMind distills recurring formulation errors into class-specific hints that guide the repair of ambiguous problems and the regeneration of solution trajectories. This process provides reliable training data, which is then used for multi-turn RL to teach models to revise their formulations in response to solver feedback. At inference time, the same hint library guides further refinement as models revise their solutions over successive turns. To support reliable evaluation, we clean three challenging benchmarks from the literature. On these cleaned benchmarks, our 20B OptiMind-RL model outperforms strong open-source baselines and reaches frontier-model performance under the same protocol. The full hint library, cleaned test data, cleaning logs, and evaluation code are publicly available on Github (https://github.com/microsoft/OptiGuide/tree/main/optimind), and our trained OptiMind-RL model is available on Hugging Face (https://huggingface.co/microsoft/OptiMind-RL).

Figures & tables

Appendix figures & tables32 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. PEARL: Solver-in-the-Loop Interactive Optimization Modeling from Natural Language

    May 14, 2026Hongliang Lu, Zhong Li, Yuxuan Chen +3Natural Language to Optimization ModelingLarge Language Model-Guided Optimization

  2. Harnessing Language Models as Optimization Modeling Agents

    Oct 22, 2026Yunxiang Luo, Xin Xu, Tianhao Chen +7Large Language Model-Guided OptimizationNatural Language to Optimization Modeling

  3. OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale

    Jul 29, 2024Ali AhmadiTeshnizi, Wenzhi Gao, Herman Brunborg +3Mixed-Integer Linear ProgrammingLarge Language Model-Guided Optimization