超越目标等价性:基于LLM的车辆路径问题优化建模的约束注入
Beyond Objective Equivalence: Constraint Injection for LLM-Based Optimization Modeling on Vehicle Routing Problems
AI总结:
针对LLM在约束密集的运筹问题中可能添加虚假约束或遗漏必要约束的问题,提出约束注入方法,结合差分测试形成双重验证器,并在车辆路径问题上验证其有效性。
摘要:
大型语言模型(LLM)越来越多地将自然语言优化问题转化为可执行的求解器代码。然而,对于约束密集的运筹学(OR)问题,现有的数据过滤和训练流程主要依赖于目标等价性信号,如差分测试和答案一致性,这些信号允许程序在测试实例上添加虚假约束或静默省略必要约束,只要这些约束在测试实例上非绑定。我们提出约束注入,利用可行探针暴露虚假过度约束,利用单约束违反探针揭示静默约束遗漏。结合差分测试,它形成一个双重验证器。我们在车辆路径问题(VRPs)上实例化并评估该方法,VRPs是代表性的约束密集组合优化测试平台,具有耦合的操作约束。我们开发了VRPCoder,一个8B端到端模型,将自然语言VRP场景转化为Gurobi脚本,并附带一个专家验证的VRP基准套件,涵盖21种变体。该验证器在数据合成期间用作拒绝采样过滤器,在组相对策略优化(GRPO)中用作每次rollout的奖励。在四个VRP基准上,VRPCoder-GRPO达到93%的平均Pass@1,在三个基准上优于Gemini-3.1-Pro Preview,超过Claude-Sonnet-4.5平均28个百分点,并超过先前的OR-LLM平均78个百分点。
英文摘要:
Large language models (LLMs) can generate executable solver code from natural-language descriptions of optimization problems. However, existing verification signals focus on whether the generated formulation produces the correct objective value. Such signals can overlook constraint-level errors: incorrect formulations may still produce the same optimum when extra or missing constraints do not affect the tested instance. We propose constraint injection, a verification method that directly tests whether the generated code implements the intended constraints. We use feasible solutions to detect incorrectly added constraints and one-constraint-violating solutions to detect omissions. Together with the optimal value check, these tests verify both the objective and the constraint set. We evaluate this approach on vehicle routing problems (VRPs), which provide a challenging testbed with diverse, tightly coupled operational constraints. We develop VRPCoder, an 8B model for generating Gurobi code from natural-language VRP descriptions, and VRPBench, an expert-verified benchmark spanning 21 VRP variants across four subsets. The verifier serves as a rejection-sampling criterion for synthetic data construction and as a rollout-level reward for reinforcement learning (RL). On VRPBench, VRPCoder-RL reaches 93% overall Pass@1, outperforms Gemini-3.1-Pro Preview on three subsets, exceeds Claude-Sonnet-4.5 by 28 percentage points, and exceeds the strongest prior OR-LLM by 78 percentage points.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。