Mathematical programming -- the task of expressing operations and decision-making problems in precise mathematical language -- is fundamental across domains, yet remains a skill-intensive process requiring operations research expertise. Recent advances in large language models for complex reasoning have spurred interest in automating this task, translating natural language into executable optimization models. Current approaches, however, achieve limited accuracy, hindered by scarce and noisy training data without leveraging domain knowledge. In this work, we systematically integrate optimization expertise to improve formulation accuracy for mixed-integer linear programming, a key family of mathematical programs. Our OptiMind framework leverages semi-automated, class-based error analysis to guide both training and inference, explicitly preventing common mistakes within each optimization class. Our resulting fine-tuned LLM significantly improves formulation accuracy by 20.7% across multiple optimization benchmarks, with consistent gains under test-time scaling methods such as self-consistency and multi-turn feedback, enabling further progress toward robust LLM-assisted optimization formulation.
翻译:数学规划——将操作和决策问题用精确数学语言表达的任务——是跨领域的基础,但仍然是需要运筹学专业知识的技能密集型过程。用于复杂推理的大型语言模型的最新进展激发了自动化此任务的兴趣,即将自然语言转换为可执行的优化模型。然而,当前方法由于缺乏利用领域知识且训练数据稀缺且嘈杂,实现精度有限。在本工作中,我们系统性地整合优化专业知识以提高混合整数线性规划(一类关键的数学规划)的建模精度。我们的OptiMind框架利用半自动化、基于类别的错误分析来指导训练和推理,明确防止每个优化类别中的常见错误。我们得到的微调后大型语言模型在多个优化基准测试中将建模精度显著提高了20.7%,并在自洽性和多轮反馈等测试时扩展方法下保持一致的性能提升,从而为实现稳健的大型语言模型辅助优化建模进一步推进。