Using Certifying Constraint Solvers for Generating Step-wise Explanations

Ignace Bleukx, Maarten Flippo, Bart Bogaerts, Emir Demirovic, Tias Guns

TL;DR

This paper introduces a method to generate human-interpretable, step-by-step explanations for why a constraint problem has no solution by repurposing the "proof logs" already generated by modern solvers. By transforming machine-verifiable proofs into simplified explanation sequences, the authors achieve up to a 100x speedup over current state-of-the-art explanation methods while maintaining high explanation quality.

What Problem Does This Paper Address?

In constraint programming, users often face "unsatisfiable" problems—scenarios where no solution exists (e.g., a scheduling conflict or an impossible Sudoku). While solvers are great at finding this out, they are terrible at explaining why to a human.

The current gold standard for explanation is the step-wise explanation: a sequence of simple logical deductions that lead to a contradiction. However, generating these from scratch is computationally brutal. Existing algorithms rely on repeated calls to an NP-oracle (a very expensive computational check) to find the "simplest" next step, making them too slow for complex real-world problems.

Meanwhile, modern "certifying" solvers already produce proof logs (like DRCP) to verify their own correctness. These logs contain all the necessary reasoning but are designed for machines, not humans—they are filled with solver-specific jargon, auxiliary variables, and redundant steps.

Methods

The authors propose a framework of Abstract Proofs to bridge the gap between machine-heavy proof logs and human-friendly explanations. They developed a multi-stage pipeline to "distill" a solver's proof:

  1. Simplification over Auxiliary Variables: Solvers often create "hidden" variables to handle complex math. This step removes any reasoning involving variables the user didn't define.
  2. User-level Inference Mapping: Replaces solver-specific internal constraints with the original constraints the user actually wrote.
  3. Trimming: Removes any steps in the proof that don't actually contribute to the final conclusion.
  4. Domain Reduction Simplification: Filters the proof to focus on "simple facts," such as "variable X cannot be 5," which are easier for humans to digest than complex logical clauses.
  5. Reason Minimization (Local vs. Global): An optimization step that ensures each explanation step uses the smallest possible number of constraints to justify its conclusion.

Datasets

The researchers evaluated their approach on three distinct benchmark families:

  • Sudoku: 100 "expert" level 9x9 Sudoku instances, modified to be unsatisfiable by introducing a "user mistake."
  • Job-shop Scheduling: 100 instances of scheduling tasks on machines with a limited timeframe, forced into unsatisfiability.
  • Modeling Examples: 102 diverse models from the CPMpy and CSP-lib repositories, intentionally altered with common modeling errors (like off-by-one errors).

Key Insights and Ideas

  • The "Proof as a Map" Insight: Instead of searching the entire space of possible explanations (which is what makes current methods slow), we can treat the solver's proof log as a "rough draft" or a map that already contains the winning logic.
  • Machine vs. Human Gap: The core challenge isn't finding the logic; it's filtering it. A machine proof is valid if it's logically sound; a human explanation is only "valid" if it's simple enough to understand.
  • Global vs. Local Trade-offs: The authors found that "Global Minimization" (looking at all possible constraints for a step) produces higher-quality explanations but is slower, whereas "Local Minimization" (only looking at what the solver used) is much faster but occasionally less "elegant."

Key Results

  • Massive Speedups: The proposed Trim method (the fastest variant) generated explanations roughly 100 times faster than the previous state-of-the-art (SimplifyGreedy).
  • Scalability: In the "Modeling Examples" benchmark, the previous state-of-the-art failed to solve 29% of instances due to timeouts or memory issues. The new method solved 100% of them in a fraction of the time.
  • Quality Parity: Despite the speedup, the "Max Stepsize" (a proxy for how hard a single step is to understand) remained very low. For Job-shop problems, the method consistently found steps involving only a single constraint.

Limitations and Future Work

  • Instance Size: While much faster, the method is still currently limited to "smaller" instances of problems compared to what raw solvers can handle without explanation.
  • Auxiliary Variable Dilemma: Currently, the pipeline simply deletes auxiliary variables. However, the authors suggest that some solver-generated variables might actually make explanations shorter or more intuitive if presented correctly.
  • Proof Optimization: The quality of the explanation is currently tethered to the quality of the solver's proof. Future work could involve "tuning" solvers to produce proofs that are inherently more "human-like" from the start.

Summary updated

BibTeX
@inproceedings{bleukx2026using,
  author = {Ignace Bleukx and Maarten Flippo and Bart Bogaerts and Emir Demirovic and Tias Guns},
  title = {{Using Certifying Constraint Solvers for Generating Step-wise Explanations}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i17.38432},
}
Figure