Table of Contents
Fetching ...

Hyperparameter Optimization of Constraint Programming Solvers

Hedieh Haddad, Thibault Falque, Pierre Talbot, Pascal Bouvry

TL;DR

Constraint programming solvers are highly sensitive to hyperparameters, making manual tuning costly and instance-dependent. The paper proposes the Probe and Solve Algorithm (PSA), a two-phase, time-budgeted HPO framework integrated into CPMpy, combining a probing phase guided by model-based optimization (e.g., Bayesian optimization) or Hamming distance search with a solving phase that uses the best-found configuration. It integrates the ACE solver into CPMpy and benchmarks on 114 XCSP3 instances, comparing PSA against default configurations. Results show that PSA with Bayesian optimization improves ACE in 25.4% of instances and Choco in 38.6%, while consistently beating Hamming-based tuning; overall, PSA offers a practical, robust, and generalizable approach to automated solver configuration. This work democratizes solver tuning, provides a principled benchmarking framework under fixed budgets, and sets a foundation for adaptive, solver-agnostic automated configuration in constraint programming.

Abstract

The performance of constraint programming solvers is highly sensitive to the choice of their hyperparameters. Manually finding the best solver configuration is a difficult, time-consuming task that typically requires expert knowledge. In this paper, we introduce probe and solve algorithm, a novel two-phase framework for automated hyperparameter optimization integrated into the CPMpy library. This approach partitions the available time budget into two phases: a probing phase that explores different sets of hyperparameters using configurable hyperparameter optimization methods, followed by a solving phase where the best configuration found is used to tackle the problem within the remaining time. We implement and compare two hyperparameter optimization methods within the probe and solve algorithm: Bayesian optimization and Hamming distance search. We evaluate the algorithm on two different constraint programming solvers, ACE and Choco, across 114 combinatorial problem instances, comparing their performance against the solver's default configurations. Results show that using Bayesian optimization, the algorithm outperforms the solver's default configurations, improving solution quality for ACE in 25.4% of instances and matching the default performance in 57.9%, and for Choco, achieving superior results in 38.6% of instances. It also consistently surpasses Hamming distance search within the same framework, confirming the advantage of model-based exploration over simple local search. Overall, the probe and solve algorithm offers a practical, resource-aware approach for tuning constraint solvers that yields robust improvements across diverse problem types.

Hyperparameter Optimization of Constraint Programming Solvers

TL;DR

Constraint programming solvers are highly sensitive to hyperparameters, making manual tuning costly and instance-dependent. The paper proposes the Probe and Solve Algorithm (PSA), a two-phase, time-budgeted HPO framework integrated into CPMpy, combining a probing phase guided by model-based optimization (e.g., Bayesian optimization) or Hamming distance search with a solving phase that uses the best-found configuration. It integrates the ACE solver into CPMpy and benchmarks on 114 XCSP3 instances, comparing PSA against default configurations. Results show that PSA with Bayesian optimization improves ACE in 25.4% of instances and Choco in 38.6%, while consistently beating Hamming-based tuning; overall, PSA offers a practical, robust, and generalizable approach to automated solver configuration. This work democratizes solver tuning, provides a principled benchmarking framework under fixed budgets, and sets a foundation for adaptive, solver-agnostic automated configuration in constraint programming.

Abstract

The performance of constraint programming solvers is highly sensitive to the choice of their hyperparameters. Manually finding the best solver configuration is a difficult, time-consuming task that typically requires expert knowledge. In this paper, we introduce probe and solve algorithm, a novel two-phase framework for automated hyperparameter optimization integrated into the CPMpy library. This approach partitions the available time budget into two phases: a probing phase that explores different sets of hyperparameters using configurable hyperparameter optimization methods, followed by a solving phase where the best configuration found is used to tackle the problem within the remaining time. We implement and compare two hyperparameter optimization methods within the probe and solve algorithm: Bayesian optimization and Hamming distance search. We evaluate the algorithm on two different constraint programming solvers, ACE and Choco, across 114 combinatorial problem instances, comparing their performance against the solver's default configurations. Results show that using Bayesian optimization, the algorithm outperforms the solver's default configurations, improving solution quality for ACE in 25.4% of instances and matching the default performance in 57.9%, and for Choco, achieving superior results in 38.6% of instances. It also consistently surpasses Hamming distance search within the same framework, confirming the advantage of model-based exploration over simple local search. Overall, the probe and solve algorithm offers a practical, resource-aware approach for tuning constraint solvers that yields robust improvements across diverse problem types.
Paper Structure (39 sections, 9 equations, 3 figures, 6 tables, 3 algorithms)

This paper contains 39 sections, 9 equations, 3 figures, 6 tables, 3 algorithms.

Figures (3)

  • Figure 1: PSA two-phase architecture with time allocation. The framework partitions the global time budget $T_g$ into probing time $t_p$ and solving time $t_s$.
  • Figure 2: Pairwise Performance Comparison for Choco Solver Approaches. (a) PSA-BO Choco versus default Choco. (b) PSA-Hamming Choco versus default Choco. (c) PSA-BO Choco versus PSA-Hamming Choco.
  • Figure 3: Pairwise Performance Comparison for ACE Solver Approaches. (a) PSA-BO ACE versus default ACE. (b) PSA-Hamming ACE versus default ACE. (c) PSA-BO ACE versus PSA-Hamming ACE.