NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explanation-Based Weighted Degree

Emmanuel Hebrard, Mohamed Siala

TL;DR

This paper introduces "Explanation-Based Weighted Degree" (e-wdeg), a novel heuristic for constraint satisfaction problems (CSPs). By focusing the "weight" of constraint failures on variables involved in a minimal "explanation" of that failure, rather than all variables in the constraint, e-wdeg significantly improves the performance of the standard Weighted Degree heuristic, especially on complex problems.

What Problem Does This Paper Address?

Constraint satisfaction problems (CSPs) are a fundamental area of artificial intelligence, dealing with finding assignments of values to variables that satisfy a set of constraints. A common technique for solving CSPs is backtracking search, which relies heavily on heuristics to guide the search process. The "Weighted Degree" (wdeg) heuristic is a popular, generic strategy that assigns weights to constraints based on how often they have caused failures. The idea is that constraints that frequently lead to failures are more likely to cause future failures, so variables involved in these constraints should be prioritized.

However, wdeg has a significant drawback: for constraints with many variables (high arity), its effectiveness diminishes. A failure on a large constraint might not provide much useful information if it involves many variables, making it hard to discriminate which variable is truly problematic. This paper addresses this limitation by proposing a more refined approach to weighting.

Methods

The core innovation is the "Explanation-Based Weighted Degree" (e-wdeg) heuristic. Instead of attributing the weight of a failed constraint equally to all variables within its scope, e-wdeg attributes the weight only to the variables that are part of a minimal "explanation" for that failure. An explanation, in this context, is a subset of variables whose domains, when restricted, are sufficient to demonstrate the constraint's failure.

The authors implemented this for three common global constraints: AllDifferent, Linear Inequality, and Element. For each, they developed specific, efficient algorithms to compute these explanations. The paper then integrates this e-wdeg heuristic into a standard backtracking solver, comparing its performance against other state-of-the-art heuristics.

Datasets

The paper evaluates its approach using instances from the MiniZinc Challenge, specifically data from 2012 to 2015. This dataset comprises 399 instances: 323 optimization problems and 76 satisfaction problems. The instances include a variety of global constraints, such as AllDifferent, Element, and Linear Inequality, making it a representative benchmark for evaluating CSP solvers.

Key Insights and Ideas

  • Focusing blame is better than spreading it: The fundamental insight is that not all variables in a failing constraint are equally responsible. Identifying the "culprit" variables through explanations leads to more informed search decisions.
  • Explanations are powerful, even simple ones: The paper demonstrates that even relatively straightforward and computationally inexpensive explanations can significantly boost the performance of the wdeg heuristic.
  • e-wdeg complements other heuristics: While e-wdeg is a direct improvement on wdeg, it also shows benefits when used as a default heuristic for other strategies like Last Conflict (LC) and Conflict Ordering Search (COS), suggesting its applicability across different search paradigms.
  • High-arity constraints are a key target: The improvement is most pronounced on problems with complex, high-arity constraints where standard wdeg struggles to provide discriminative information.

Key Results

The experimental evaluation shows that e-wdeg consistently outperforms the standard wdeg heuristic.

  • Satisfaction Problems: e-wdeg solves 2.9% to 4.5% more instances than wdeg, with the gains becoming more apparent over longer time limits.
  • Optimization Problems: e-wdeg proves optimal solutions for 2.3% more instances than wdeg. Furthermore, when comparing the quality of the best solutions found within a given time, e-wdeg consistently finds better solutions faster than wdeg.
  • Impact on other heuristics: When used as a default heuristic for LC and COS, e-wdeg also shows improvements in both satisfaction and optimization tasks.

Limitations and Future Work

  • Constraint-specific explanations: The current implementation relies on specific explanation algorithms for AllDifferent, Linear Inequality, and Element. Extending this to a wider range of global constraints would be beneficial.
  • Minimality of explanations: The paper notes that explanations don't strictly need to be minimal if extracting them is computationally hard. However, exploring the trade-offs between explanation complexity and heuristic performance could be an area for future work.
  • Branching on auxiliary variables: While the paper briefly touches upon branching on auxiliary variables (variables introduced internally to model expressions), the results were less clear-cut and sometimes detrimental. Further investigation into how e-wdeg interacts with auxiliary variables could be valuable.
  • Generalization: The authors suggest that the core idea of explanation-based weighting could be applied to other search algorithms beyond backtracking, potentially leading to broader performance improvements in AI search.

Summary updated

BibTeX
@inproceedings{hebrard2017explanation,
  author = {Emmanuel Hebrard and Mohamed Siala},
  title = {{Explanation-Based Weighted Degree}},
  booktitle = {CPAIOR},
  year = {2017},
  doi = {10.1007/978-3-319-59776-8\_13},
}

Loading related content...

Figure