Efficiently Explaining CSPs with Unsatisfiable Subset Optimization

Emilio Gamba, Bart Bogaerts, Tias Guns

Abstract

Generating human-understandable explanations for Constraint Satisfaction Problems (CSPs) is a computationally intensive task. Traditional methods relying on Minimal Unsatisfiable Subsets (MUS) often produce suboptimal explanations in terms of human readability and suffer from significant performance bottlenecks. This paper introduces the Optimal Constrained Unsatisfiable Subsets (OCUS) framework, which leverages hitting-set duality, structural constraints, and incremental solving to generate the "simplest" explanations efficiently. Our approach reduces explanation generation time from hours to seconds while guaranteeing optimal explanation quality.

Introduction

When automated solvers tackle logic puzzles like Sudoku or the "Zebra Puzzle," they typically use complex backtracking searches that are opaque to humans. To make these solutions interpretable, researchers have proposed explaining them through a sequence of simple inference steps. Each step is derived from a Minimal Unsatisfiable Subset (MUS)—a group of constraints that necessitates a specific conclusion.

However, existing MUS-based methods face two primary challenges:

  1. Quality: They identify any minimal subset, which may not be the most "human-readable" or simplest based on a desired cost metric.
  2. Efficiency: Finding these subsets is computationally expensive, often requiring thousands of solver calls and taking hours for a single puzzle.

The OCUS Framework

We propose the Optimal Constrained Unsatisfiable Subsets (OCUS) problem. OCUS aims to find an unsatisfiable subset that satisfies a specific structural predicate and minimizes a given cost function.

Technical Innovations

  • The OCUS Algorithm: An implicit hitting-set algorithm that alternates between a Mixed-Integer Programming (MIP) solver for candidate generation and a SAT solver for unsatisfiability checking.
  • Structural Constraints: Instead of iterating through every possible conclusion, we use a single OCUS call with a constraint that forces the subset to explain exactly one new fact.
  • Incremental Solving: We "bootstrap" the solver by reusing satisfiable subsets found in previous steps, significantly reducing redundant computation.
  • Domain-Specific GROW: A MaxSAT-based function expands satisfiable subsets quickly, providing stronger constraints to the hitting-set solver and accelerating convergence.

Experimental Evaluation

We evaluated our approach on a benchmark of 10 logic grid puzzles translated into Conjunctive Normal Form (CNF). Cost functions were designed to penalize complex constraints while favoring simple facts.

Explanation Quality

Our results demonstrate that the OCUS approach consistently finds lower-cost, and thus simpler, explanations compared to traditional MUS-based heuristics. As shown in the cost comparison, the standard MUS approach frequently identifies subsets with significantly higher costs than the optimal ones found by OUS.

Comparison of explanation costs: OUS (Optimal) vs. MUS. Points above the diagonal indicate cases where MUS produced more complex explanations than necessary.

Computational Performance

The optimized OCUS approach provides massive speedups. By incorporating incrementality and literal-based hitting sets, we reduced the cumulative explanation time significantly. The OUSb + Lit. Incr. HS variant, in particular, demonstrates the efficiency gains achievable through these optimizations compared to standard baselines.

Average cumulative explanation time across different OCUS variants. The 'OUSb + Lit. Incr. HS' variant shows significant performance gains over the baseline OUSb.

Conclusion

The OCUS framework successfully addresses the trade-off between explanation quality and computational efficiency in CSPs. By formalizing the search for the "simplest" explanation as an optimization problem and applying advanced SAT/MIP techniques, we enable real-time, high-quality explanations for complex logic problems. Future work will explore more sophisticated cognitive models for cost functions and broader applications in system debugging and configuration.

Summary updated

BibTeX
@inproceedings{gamba2021efficiently,
  author = {Emilio Gamba and Bart Bogaerts and Tias Guns},
  title = {{Efficiently Explaining CSPs with Unsatisfiable Subset Optimization}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/191},
}
Figure