用领域语言替代硬性建模,让优化问题更灵活准确
Not All Problems Are Best Modeled as MILP: A DSL-Centric Framework for Flexible and Accurate Optimization Modeling

- 用领域专用语言(DSL)代替固定线性规划建模
- 在44类组合优化问题上提升51.66%建模准确率
- 适合需快速适配新问题的工程与科研人员
求解组合优化问题不仅需要高效算法,还需精心设计的数学模型。尽管近期研究利用大模型自动化建模,但现有框架仍主要依赖僵化的混合整数线性规划(MILP)范式。本文认为,并非所有问题都适合用MILP建模,将复杂领域强行纳入线性约束会带来巨大建模复杂度并严重限制求解器灵活性。为此,我们提出OptiDSL框架,将焦点从刚性的MILP建模转向领域特定语言(DSL)表示。通过大模型将自然语言映射为标准化、领域公认的结构,实现建模与求解的解耦。该范式可无缝集成多种专用求解器,涵盖传统启发式与现代学习型方法。在包含44类组合优化问题的综合性基准测试中,OptiDSL显著优于基于MILP的流水线,建模准确率提升51.66%,建模时间减少91.71%。值得注意的是,其在现有基准上也表现更优,建模准确率高出23.09%。代码已公开于https://anonymous.4open.science/r/OptiDSL。
原文摘要 · Abstract (English)
Solving combinatorial optimization problems (COPs) requires not only efficient algorithms but also carefully crafted formulations. While recent works have leveraged LLMs to automate optimization modeling, current frameworks predominantly rely on a rigid mixed-integer linear programming (MILP) paradigm. In this paper, we argue that not all problems are best modeled as MILP, as forcing complex domains into linear constraints can induce prohibitive modeling complexity and severely restrict solver flexibility. To address this, we propose OptiDSL, a framework that shifts the focus from rigid MILP formulations to domain-specific language (DSL) representations. By utilizing LLMs to map natural language onto standardized, domain-accepted structures, OptiDSL decouples problem formulation from execution. This paradigm enables seamless integration with a diverse library of specialized solvers, ranging from traditional heuristics to modern learning-based methods. Experimental results on the comprehensive benchmark of 44 COP types show that OptiDSL significantly surpasses MILP-based pipelines, yielding a 51.66% gain in formulation accuracy and a 91.71% decrease in modeling time. Notably, it also outperforms MILP-based pipelines on the existing benchmark, achieving a 23.09% higher formulation accuracy. Our code is available at https://anonymous.4open.science/r/OptiDSL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。