Introduction
As machine learning models grow in complexity, the demand for Explainable AI (xAI) has surged. Practitioners increasingly rely on post-hoc algorithms like SHAP and LIME to interpret "black box" decisions. However, the rapid proliferation of these tools has outpaced the development of standardized evaluation metrics. This lack of rigor often leads to the "illusion of explanatory depth"—a cognitive bias where users overestimate their understanding of a system, potentially trusting explanations that are fragile, unstable, or unfaithful to the underlying model. Compare-xAI addresses this gap by introducing an open-source benchmark that subjects xAI algorithms to a suite of functional "unit tests."
The Compare-xAI Framework
The proposed framework treats xAI algorithms as black boxes and evaluates them through a protocol of non-redundant functional tests. These tests are mapped to specific end-user requirements and organized into a hierarchical scoring system designed to serve different stakeholders.
The scoring system operates at three levels:
- Level 1 (The Layman): A single, aggregated Comprehensibility score. This quantifies the "effort" a human would need to put in to get a correct explanation (e.g., if a test fails, the user would have to manually intervene).
- Level 2 (The Practitioner): Five categorical scores: Fidelity (faithfulness to the model), Fragility (susceptibility to attacks), Stability (robustness to data changes), Simplicity (ease of reasoning), and Stress (performance on high-dimensional data).
- Level 3 (The Researcher): Detailed raw scores for each individual unit test.
Experimental Methodology
To rigorously test these algorithms, Compare-xAI utilizes a diverse set of synthetic and real-world datasets designed to reveal algorithmic weaknesses:
- Synthetic "Cough and Fever" Data: Evaluates the detection of symmetry and specific mathematical patterns in a controlled environment.
- MNIST: Serves as a test for the "dummy axiom," verifying if an algorithm correctly identifies that a model ignores constant edge pixels.
- COMPAS Dataset: Used to assess Fragility by attempting to "fool" algorithms into masking biased behavior through adversarial perturbations.
The benchmark evaluated 16 post-hoc algorithms across 22 functional tests, providing a comprehensive look at the current xAI landscape.
Results and Analysis
The benchmarking process revealed several critical insights. Notably, no single algorithm achieved a perfect score across all dimensions, indicating that current methods all involve inherent trade-offs between speed and quality.
Key findings include:
- Performance Plateau: Approximately 50% of the algorithms scored between 0.70 and 0.85 on the Comprehensibility scale, suggesting a performance ceiling for current permutation-based logic.
- The Pareto Front: A clear trade-off exists between computational cost and explanation quality. For instance, while
exact_shapley_valuesoffers high fidelity, it requires over 800 seconds per test. Conversely,tree_shapis nearly instantaneous but restricted to specific model architectures. - Algorithmic Clustering: Many popular tools cluster together in performance due to shared underlying logic, highlighting the need for more diverse explanatory approaches.
Discussion and Future Work
Compare-xAI provides a quantitative foundation for what has largely been a qualitative field. By defining "Comprehensibility" as a function of the manual intervention required to correct failed explanations, the framework offers a practical guide for tool selection.
However, limitations remain. The current benchmark is purely quantitative and lacks subjective human-in-the-loop evaluation. Furthermore, its scope is currently limited to global feature importance and does not yet extend to Reinforcement Learning or Generative models. Future iterations will aim to incorporate complex feature interactions and broader model classes to further mature the field of xAI evaluation.
The benchmark and interactive tool are available at: https://karim-53.github.io/cxai/
Summary updated