Improving Constraint Models with LLM Agents

📅 2026-08-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work proposes a novel approach to automatically restructure constraint programming models by leveraging a large language model (LLM)-based autonomous agent operating in an open-ended space. Unlike traditional rule-based reformulation methods, which are constrained by predefined heuristics, the proposed agent iteratively generates, validates, diagnoses, and refines candidate models on training instances, enabling experience-driven, flexible optimization. Integrated with the CPMpy modeling framework and a solution-reinjection validation mechanism, the method demonstrates significant performance gains: across 27 test instances spanning nine combinatorial optimization problems, it outperforms the original formulations on 21 instances, with speedups exceeding two orders of magnitude on certain problems. These results substantially surpass the limitations inherent in conventional rule-driven reformulation techniques.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Constraint Programming
Model Reformulation
Combinatorial Optimization
Automated Modeling
Symmetry Breaking
Innovation

Methods, ideas, or system contributions that make the work stand out.

LLM agent
constraint modeling
automated reformulation
empirical validation
combinatorial optimization
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.