Introduction
As machine learning models are increasingly deployed in high-stakes environments such as medicine and law, the demand for explainable AI (XAI) has grown. Current approaches generally fall into two categories: heuristic methods, which are fast but lack formal guarantees, and formal methods, which provide mathematical rigor but are often computationally expensive (NP-hard). This research explores how Knowledge Compilation (KC) can bridge this gap, enabling the computation of rigorous explanations in polynomial time.
The Knowledge Compilation Approach
Knowledge Compilation involves pre-processing a complex model into a structured, tractable representation. The authors specifically focus on d-DNNF (deterministic Decomposable Negation Normal Form) and its descendants, such as OBDDs (Ordered Binary Decision Diagrams) and SDDs (Sentential Decision Diagrams). These languages serve as a "sweet spot" for XAI because they support specific logical operations efficiently.
By representing models in these formats, the task of finding Abductive Explanations (AXps)—the minimal set of features sufficient for a prediction—and Contrastive Explanations (CXps)—the minimal changes needed to flip a prediction—becomes tractable.
Algorithmic Framework
The core contribution of this work is a set of algorithms that prove that if a KC language supports three operations in polynomial time—Conditioning (CD), Consistency (CO), and Validity (VA)—then finding an explanation is also polynomial.
The algorithms utilize the hitting set duality between AXps and CXps, allowing a unified framework for both "Why?" and "Why not?" questions. The process involves iteratively testing feature subsets to determine their necessity for the model's output.
As shown in the trace above, the algorithm systematically evaluates feature assignments (s) to decide whether to "Drop" or "Keep" specific variables based on their impact on the model's consistency with the target prediction.
Experimental Results
The researchers evaluated their approach using 11 binary datasets from the Penn Machine Learning Benchmarks (PMLB) and OpenML. Models were trained as Read-Once Decision Trees (RODTs) and then compiled into d-DNNF and SDD representations.
Key findings include:
- Guaranteed Efficiency: Finding a single AXp or CXp is mathematically proven to be a polynomial-time task for d-DNNF and its relatives.
- Real-time Performance: In practice, the time required to list all possible minimal explanations for any given instance was less than 0.2 seconds.
- SDD Superiority: Explaining models represented as SDDs was, on average, six times faster than d-DNNF representations. This is attributed to the "canonicity" of SDDs, which allows consistency and validity checks to be performed in constant time ($O(1)$).
- Scalability: The overhead of using a SAT oracle for explanation enumeration was found to be negligible, suggesting the approach scales well for practical applications.
Conclusion and Future Work
This research demonstrates that Knowledge Compilation provides a powerful framework for making formal XAI efficient. By moving from standard neural networks to structured KC languages, we can achieve real-time, mathematically rigorous explanations.
Future work will focus on extending these techniques to continuous feature spaces and addressing the "compilation bottleneck"—the one-time computational cost of converting complex models into tractable KC formats. The authors also aim to explore the exact tractability boundary between d-DNNF and more succinct, but harder-to-process, languages.
Summary updated