arXiv:2602.02029cs.AIcs.SE2026-02被引 2

用中间表示提升大模型生成复杂优化问题代码的准确性

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

  • 引入标准中间表示CIR,分离规则逻辑与数学表达
  • 在新基准上达到47.2%准确率,接近商用模型性能
  • 多智能体框架+反思机制,适合复杂运营建模场景

从自然语言自动构建优化模型是运筹学中的热点,但现有大模型方法难以处理复杂操作规则带来的复合约束和建模范式。为此,我们提出规范中间表示(CIR):一种大模型在问题描述与优化模型之间显式生成的结构化知识。CIR通过约束原型和候选建模范式编码操作规则语义,实现规则逻辑与数学实现的解耦。基于新生成的CIR知识库,我们构建了规则到约束(R2C)框架——一个由多智能体组成的流水线,可解析问题文本、检索领域知识生成CIR,并实例化优化模型。为系统评估推理能力,我们在包含丰富操作规则的新基准及已有基准上测试,结果表明:在新基准上R2C取得47.2%的准确率,达到当前最优;在既有基准上表现媲美专有模型(如GPT-5);引入反思机制后进一步提升,在部分基准上创出新纪录。

原文摘要 · Abstract (English)

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.

优化建模大模型中间表示代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。