Introduction
In high-stakes domains such as finance and medicine, understanding the rationale behind an AI's decision is critical. However, simple feature importance often falls short of providing actionable guidance. Users frequently ask: "What is the minimum change I need to make to flip this outcome?" This question defines the search for counterfactual explanations. While many existing methods rely on heuristics or model-agnostic approximations, this paper proposes a rigorous symbolic framework that treats classifier logic as a formal mathematical object.
Methodology
The proposed approach transforms the search for counterfactuals into a logic-based optimization problem through a three-step pipeline:
- Symbolic Compilation: The classifier's decision function is compiled into an Ordered Binary Decision Diagram (OBDD). This representation captures the model's logic in a tractable format.
- CNF Encoding: The OBDD is translated into Conjunctive Normal Form (CNF) using a "No-Cut" method. This ensures the resulting Boolean formula focuses strictly on input variables, maintaining actionability.
- MCS Mapping: The core innovation lies in modeling the specific data instance as "soft constraints" and the classifier's logic as "hard constraints." When a prediction is undesirable, the combined formula is unsatisfiable. The authors utilize Minimal Correction Subsets (MCS) algorithms to identify the smallest set of feature flips required to restore consistency and change the prediction.
Experimental Evaluation
The framework was evaluated using synthetic Binary Naive Bayes Classifiers (BNCs) with feature counts ranging from 5 to 25. For each configuration, results were averaged across multiple networks to assess scalability and performance.
Results and Discussion
The experiments demonstrate that while the symbolic representation size grows with the number of features, the approach remains computationally feasible. As shown in the performance data, a 25-variable classifier—resulting in an OBDD with over 8,600 nodes—could generate hundreds of counterfactual explanations in roughly 109 seconds.
The key insight is viewing explainability as "logic repair." By framing the desire for a different outcome as fixing an inconsistent knowledge base, the authors leverage decades of progress in automated reasoning and Max-SAT solving. This ensures that the resulting explanations are directly tied to input features, making them inherently actionable.
Conclusion
This symbolic approach provides formal guarantees and actionable insights by avoiding auxiliary variables in the logic encoding. While the initial compilation step remains a potential bottleneck for high-dimensional models like deep neural networks, the framework offers a powerful path forward for rigorous, logic-based AI interpretability. Future work will focus on scaling compilation techniques and extending the method to non-binary feature sets.
Summary updated