Abstract
The overarching goal of Explainable AI is to develop systems that not only exhibit intelligent behaviours, but also are able to explain their rationale and reveal insights. In explainable machine learning, methods that produce a high level of prediction accuracy as well as transparent explanations are valuable. In this work, we present an explainable classification method. Our method works by first constructing a symbolic Knowledge Base from the training data, and then performing probabilistic inferences on such Knowledge Base with linear programming. Our approach achieves a level of learning performance comparable to that of traditional classifiers such as random forests, support vector machines and neural networks. It identifies decisive features that are responsible for a classification as explanations and produces results similar to the ones found by SHAP, a state of the art Shapley Value based method. Our algorithms perform well on a range of synthetic and non-synthetic data sets.
Introduction
In artificial intelligence, a persistent trade-off exists between predictive performance and model interpretability. While deep neural networks and ensemble methods like random forests provide high accuracy, they often function as "black boxes." Conversely, inherently interpretable models like shallow decision trees frequently lack the capacity for complex tasks. Furthermore, post-hoc explanation methods such as SHAP or LIME are model-agnostic and may not faithfully represent the internal logic of the model they attempt to explain. This research proposes a classification framework where prediction and explanation are intrinsically linked through probabilistic logic inference, ensuring that explanations are a direct reflection of the model's decision-making process.
Methodology
The proposed method follows a three-stage pipeline:
- Knowledge Base Construction: Training data is converted into a symbolic Knowledge Base (KB) consisting of probabilistic disjunctive clauses. For instance, a rule might state that if a sample possesses specific features, it belongs to a certain class with probability $p$. These rules can be extracted from decision tree paths or mined directly from feature combinations.
- Inference via Linear Programming: To determine the probability of an instance belonging to a class, the query is formulated as a Linear Programming (LP) optimization problem. This avoids the NP-hardness typically associated with probabilistic logic frameworks like Nilsson’s, providing a computationally efficient solution that is robust to inconsistent or noisy logic.
- Decisive Feature Explanation: Explanations are generated by identifying a subset of input features (a "sub-query") that most significantly influences the classification. For positive predictions, the algorithm seeks features that maximize the probability; for negative ones, it identifies those that minimize it.
Experimental Results
The framework was evaluated on real-world datasets (e.g., Titanic, Mushroom, HIV-1 protease) and synthetic benchmarks designed with known ground-truth explanations.
Performance and Scalability
The "Direct" version of the algorithm achieved F1 scores comparable to Random Forests and SVMs, reaching 0.99 on the Mushroom and Nursery datasets. Crucially, the LP formulation demonstrates excellent scalability.
As shown in the runtime analysis, the system handles KBs with up to 10,000 variables and clauses within seconds, making it suitable for practical applications.
Explanation Quality and SHAP Alignment
On synthetic data, the method consistently outperformed SHAP in identifying "true" decisive features. On real-world data like the Titanic dataset, the explanations showed significant overlap with SHAP's feature importance rankings.
The high degree of alignment with SHAP suggests that the logic-based approach captures essential feature importances while maintaining the transparency of a symbolic system.
Conclusion
This work demonstrates that symbolic logic can be integrated into high-performance classification tasks without sacrificing robustness or scalability. By treating prediction as probabilistic inference, the model provides "faithful" explanations by design. Future work will explore multi-class generalizations, handling of continuous features, and human-centric user studies to evaluate the practical utility of these logic-based explanations.
Summary updated