Introduction
As machine learning (ML) models are increasingly deployed in high-stakes scenarios, the need for formal explainability has become critical. Users often require two types of answers: Abductive Explanations (AXp), which identify a minimal set of features sufficient for a prediction ("Why Class A?"), and Contrastive Explanations (CXp), which identify features that, if changed, would alter the prediction ("Why not Class B?").
While heuristic explainers like LIME or SHAP are popular for their speed, they lack formal guarantees of correctness or minimality. Conversely, non-heuristic methods are often computationally prohibitive. This research identifies a "sweet spot" by demonstrating that for classifiers represented in specific efficient logic formats—most notably deterministic Decomposable Negation Normal Form (d-DNNF) and Sentential Decision Diagrams (SDD)—rigorous explanations can be computed in polynomial time.
Methods: The Tractability Recipe
The authors leverage Knowledge Compilation to transform complex logical formulas into tractable target languages. They identify that any propositional language supporting three specific operations in polynomial time can generate formal explanations efficiently:
- Consistency (CO): Determining if a formula is satisfiable.
- Validity (VA): Determining if a formula is always true.
- Conditioning (CD): Fixing certain variables to specific values.
Key Algorithms
To generate explanations, the authors employ a Greedy Extraction approach. Since d-DNNFs support the necessary operations, a "drop-one" strategy is used to find subset-minimal explanations. For finding all possible explanations, they adapt the MARCO algorithm, which uses a SAT solver as an oracle to identify new "seeds" that are then refined into minimal explanations. Additionally, the paper introduces optimizations for SDDs, which allow for constant-time validity checks in practice.
Experimental Evaluation
The framework was evaluated on 19 binary classification datasets from the Penn Machine Learning Benchmarks (PMLB) and the UCI Repository, including benchmarks like chess, compas, and monk's problems. Categorical features were binarized via one-hot encoding before being compiled into d-DNNFs and SDDs.
Key Results and Insights
The experimental results demonstrate that formal rigor does not have to come at the cost of speed. For all tested d-DNNF classifiers, enumerating all explanations took less than 1.0 second, while SDDs were even faster, often requiring less than 0.2 seconds.
When compared against Anchor, a popular heuristic explainer, the proposed rigorous method was often several orders of magnitude faster while providing stronger mathematical guarantees. The explanations generated are Prime Implicants, meaning they are guaranteed to be sufficient to force the model's decision. Furthermore, the "tractable" nature of the underlying d-DNNF meant that the SAT solver used in enumeration was rarely a bottleneck.
Discussion and Future Work
A significant insight of this work is that the requirements for efficient explanations are lighter than previously thought (CO, VA, and CD), potentially opening the door for a wider range of model types. However, challenges remain:
- The Compilation Bottleneck: While explaining is fast, compiling a standard ML model (like a deep neural network) into a d-DNNF can be computationally expensive and result in large file sizes.
- Continuous Features: The current framework is optimized for discrete/Boolean features. Handling high-precision continuous real-valued features directly is a target for future research.
- Multi-class Scaling: Scaling the approach to problems with hundreds of classes will likely require further algorithmic refinements.
Despite these limitations, this work provides a robust framework for generating formally guaranteed explanations at speeds that rival or exceed existing heuristic tools.
Summary updated