This paper introduces a machine learning approach to optimize the execution order of propagators in Constraint Programming (CP) solvers. By treating propagator scheduling as a "learning-to-rank" problem, the authors demonstrate that instance-specific priorities can significantly reduce solving time and increase the number of solved instances for difficult combinatorial problems.
TL;DR
The authors develop a self-attention-based model that learns to rank propagator priorities based on static problem features. By replacing fixed, hand-designed heuristics with instance-dependent rankings, they achieved a 27.93% reduction in median solver runtime on a suite of difficult constraint satisfaction problems.
What Problem Does This Paper Address?
Constraint Programming solvers rely on "propagators"—algorithms that prune the search space by removing values from variable domains that cannot be part of a solution. During search, many propagators are scheduled for execution. While the solver eventually reaches a "fixpoint" regardless of the order, the sequence in which these propagators run matters immensely.
A cheap propagator might quickly prune values, saving an expensive one from doing unnecessary work. Conversely, a costly but powerful propagator might prune so much that it eliminates entire branches of the search tree. Traditionally, solvers like Choco use fixed, manually designed priority levels (e.g., "Unary" is higher priority than "Quadratic"). However, these fixed rules don't account for the unique structure of individual problem instances. The challenge is that we cannot directly observe the "optimal" priority for a single propagator; we can only measure the total runtime of a complete priority assignment.
Methods
The authors formulate this as a learning-to-rank task. Their approach involves several novel components:
- Architecture: They use a self-attention-based model (based on the SetRank architecture) that processes the set of propagators present in an instance alongside 77 static instance features (e.g., constraint density, variable types).
- Permutation Equivariance: Because propagators in a model form a set rather than a sequence, the model uses self-attention without positional encodings. This ensures that the score assigned to a propagator depends on its "context" (which other propagators are present) but not on its input order.
- Supervision via Pairwise Preferences: Since "ground truth" priorities don't exist, the authors generated training data by running the Choco solver multiple times on the same instance with randomized priority assignments. They then used the resulting runtimes to create pairwise preferences (i.e., "Ordering A is better than Ordering B because it was faster").
- Objective Function: The model is trained using a Plackett–Luce-based ranking objective, which relates individual propagator scores to the probability of a complete ranking being successful.
At inference time, the model's predicted scores are mapped back to Choco’s seven discrete priority levels before the search begins, requiring no changes to the solver's internal propagation engine.
Datasets
The study uses the XCSP3 instance collection, a standard benchmark for constraint satisfaction.
- Filtering: From over 21,000 instances, they selected 3,941 that were neither "too easy" (solved in <5s) nor "too hard" (timed out in 20m) to ensure a meaningful learning signal.
- Split: They used a difficulty-based split (70% train, 15% validation, 15% test), specifically placing the hardest instances in the test set to evaluate how well the model generalizes from easier to more complex problems.
Key Insights and Ideas
- Propagator ordering is a massive performance lever: The authors found that for over 55% of instances, the slowest random ordering was at least twice as slow as the fastest. In some cases, the difference was over 100x.
- Context Matters: By using self-attention, the model learns that a propagator's ideal priority isn't intrinsic—it depends on what other constraints are active in the problem.
- Problem-Class Sensitivity: The learned model was highly effective for certain problem types (like Crossword or Subisomorphism) but occasionally regressed on others (like Traveling Salesman). This led to the creation of a "gated policy" that chooses between the learned model and the default heuristic based on the problem class.
Key Results
On a test set of 698 difficult instances:
- Solved Instances: The learned model solved 654 instances, compared to 634 using Choco’s default priorities.
- Runtime Reduction: It reduced the median solver runtime by 27.93%.
- Aggregate Performance: The Penalized Average Runtime (PAR1) improved by 12.65%.
- Gated Policy: A simple policy that selects the learned model only for problem classes where it performed well on validation data further increased the solved count to 657.
Limitations and Future Work
- Vocabulary Constraints: The current model is limited to the 62 distinct propagators seen during training. It cannot yet generalize to entirely new types of constraints.
- Static vs. Dynamic: The priorities are set once before the search starts. The authors suggest that "adaptive" scheduling—changing priorities dynamically as the search progresses—could yield even greater gains.
- Feature Engineering: The model relies on 77 manually extracted static features. Future work might explore using Graph Neural Networks (GNNs) to learn features directly from the constraint graph structure.
Summary updated