arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.02029cs.AIcs.SE
收藏

基于LLM的优化问题建模与代码生成的规范中间表示

Canonical Intermediate Representation for LLM-based optimization problem formulation and code generation

The Hong Kong Polytechnic University, Hong Kong, China(香港理工大学)

Zhongyuan Lyu, Shuoyu Hu, Lujie Liu, Hongxia Yang, Ming LI

AI总结:

本研究提出规范中间表示(CIR)以提升LLM在复杂运营规则下的优化问题建模与代码生成能力,通过多智能体框架实现高精度建模。

摘要:

自动从自然语言描述中构建优化模型是运筹学研究中的一个新兴焦点,但当前基于LLM的方法在处理复杂的运营规则所需的复合约束和适当建模范式方面存在困难。为此,我们引入了规范中间表示(CIR):一种LLM在问题描述和优化模型之间显式生成的模式。CIR通过约束范式和候选建模范式编码运营规则的语义,从而将规则逻辑与其数学实现解耦。在新生成的CIR知识库基础上,我们开发了规则到约束(R2C)框架,这是一个多智能体流水线,用于解析问题文本、通过检索领域知识合成CIR实现,并实例化优化模型。为了系统评估规则到约束推理,我们在新构建的包含丰富运营规则的基准以及先前工作的基准上测试R2C。广泛的实验表明,R2C在所提出的基准上实现了最先进的准确性(47.2%的准确率)。在文献中的已建立基准上,R2C表现出高度竞争性的结果,接近专有模型(例如GPT-5)的性能。此外,通过反思机制,R2C在某些基准上实现了进一步的提升,并在一些基准上设定了新的最佳报告结果。

英文摘要:

Automatically formulating optimization models from natural language descriptions is a growing focus in operations research, yet current LLM-based approaches struggle with the composite constraints and appropriate modeling paradigms required by complex operational rules. To address this, we introduce the Canonical Intermediate Representation (CIR): a schema that LLMs explicitly generate between problem descriptions and optimization models. CIR encodes the semantics of operational rules through constraint archetypes and candidate modeling paradigms, thereby decoupling rule logic from its mathematical instantiation. Upon a newly generated CIR knowledge base, we develop the rule-to-constraint (R2C) framework, a multi-agent pipeline that parses problem texts, synthesizes CIR implementations by retrieving domain knowledge, and instantiates optimization models. To systematically evaluate rule-to-constraint reasoning, we test R2C on our newly constructed benchmark featuring rich operational rules, and benchmarks from prior work. Extensive experiments show that R2C achieves state-of-the-art accuracy on the proposed benchmark (47.2% Accuracy Rate). On established benchmarks from the literature, R2C delivers highly competitive results, approaching the performance of proprietary models (e.g., GPT-5). Moreover, with a reflection mechanism, R2C achieves further gains and sets new best-reported results on some benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑