LLM-Guided Evolutionary Search for Constraint Model Reformulation to Improve Solver Efficiency explores how to automate the process of refining constraint models to make them solve faster. While Large Language Models (LLMs) can generate correct models from natural language, these models are often inefficient. The authors propose an evolutionary framework where an LLM iteratively proposes and improves model reformulations, using feedback from solver performance to guide future attempts.
Automating Model Reformulation
In constraint programming, the way a problem is modeled—such as the choice of variables, constraints, and encodings—significantly impacts how quickly a solver can find a solution. Traditionally, this is a manual, expert-driven task. The authors introduce an iterative loop where an LLM generates a model, which is then benchmarked against a baseline model on training instances. The system evaluates the model's validity and its solving time, using this performance data to inform the LLM's next attempt.
Profile-Diverse Retention
A key challenge in evolutionary search is deciding which past attempts to show the LLM in its next prompt. The authors introduce "Profile-Diverse Retention" (PDR) to address this. Instead of only keeping the most recent or the fastest models, PDR uses Maximal Marginal Relevance (MMR) to select a set of models that are both fast and behaviorally distinct. By analyzing per-instance runtime vectors, the system ensures the LLM receives a diverse set of examples, which helps it explore different strategies rather than getting stuck on a single approach.
Performance and Selection
The researchers evaluated their framework on eight constraint satisfaction problems from CSPLib. Their findings indicate that iterative reformulation can lead to significant speedups on held-out test instances. The study highlights that strategies maintaining a diverse context for the LLM consistently outperform those that focus only on the fastest or most recent attempts. Additionally, the authors found that performing a final model selection on a separate validation set—a step often omitted in similar automated design pipelines—improves the performance of every strategy tested.
Considerations for Implementation
The framework relies on the ability to verify that a reformulated model is "solution-valid," meaning it produces the same answers as the baseline model. The authors note that verifying equisatisfiability can be computationally difficult, so they use a solution-level validation method where the model's output is checked against the baseline. Because the process involves multiple iterations of model generation and solver benchmarking, the efficiency of the final model depends on the quality of the feedback provided to the LLM and the diversity of the retained history.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!