用大模型自动优化约束求解模型,显著提升求解速度。
Improving Constraint Models with LLM Agents
- 大模型代理通过试错迭代改进约束模型,不依赖预设规则。
- 在27个测试实例中,新模型在21个上表现更优,最快提速超100倍。
- 适合想提升约束求解效率的研究者与工程师使用。
约束规划求解器的运行时间对建模选择极为敏感,如对称性破缺、隐含约束、全局约束、约束重写和变量表示等。传统优化需人工专家经验,现有自动化系统受限于预定义的手工转换规则库。本文提出一种智能体框架,从开放空间中重构约束模型,并通过实证验证正确性而非构造保证:一个大型语言模型代理,在给定原始模型和三个训练实例后,生成替代方案,将解回注入原模型验证,诊断并修复失败,最终在约十五分钟内返回最优变体。模型以CPMpy库表达,每个候选在三个更大测试实例上评估。在九类组合优化问题中,新模型在27个测试实例中有21个优于原模型,部分问题求解速度提升超过两个数量级。与仅使用相同验证工具的非智能体基线对比表明,性能提升源于智能体的迭代诊断与修复,而非简单采样。结果证明自主智能体方法可有效支持约束模型优化。
原文摘要 · Abstract (English)
The runtime of Constraint Programming (CP) solvers is highly sensitive to modeling choices, such as symmetry breaking, implied constraints, global constraints, constraint reformulation, and variable representation. Improving these constraint models has traditionally required human expertise, and existing automated reformulation systems are restricted to a predefined library of hand-crafted transformation rules. We introduce an agentic framework that instead reformulates a constraint model from an open-ended space and establishes correctness empirically rather than by construction: a Large Language Model (LLM) agent, given a model and three training instances, proposes alternative formulations, validates each by injecting its solution back into the original model, and diagnoses and repairs failures, returning the best variant it finds in a median of about fifteen minutes. The models are expressed in the CPMpy modeling library, and each proposed model is evaluated on three larger test instances. Across nine combinatorial optimization problems, the generated models outperform the originals on 21 of 27 test instances, and on some problems solve more than two orders of magnitude faster. A comparison against non-agentic baselines that reuse the same validation and selection tools indicates that the gains stem from the agent's iterative diagnosis and repair, not merely from sampling several candidates. These results demonstrate that autonomous agentic methods can support the improvement of constraint models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。