The XAISuite framework and the implications of explanatory system dissonance

Shreyan Mitra, Leilani GilpinarXiv 2023

Abstract: Explanatory systems make machine learning models more transparent. However, they are often inconsistent. In order to quantify and isolate possible scenarios leading to this discrepancy, this paper compares two explanatory systems, SHAP and LIME, based on the correlation of their respective importance scores using 14 machine learning models (7 regression and 7 classification) and 4 tabular datasets (2 regression and 2 classification). We make two novel findings. Firstly, the magnitude of importance is not significant in explanation consistency. The correlations between SHAP and LIME importance scores for the most important features may or may not be more variable than the correlation between SHAP and LIME importance scores averaged across all features. Secondly, the similarity between SHAP and LIME importance scores cannot predict model accuracy. In the process of our research, we construct an open-source library, XAISuite, that unifies the process of training and explaining models. Finally, this paper contributes a generalized framework to better explain machine learning models and optimize their performance.

The Problem: Explanatory System Dissonance

As machine learning models become pervasive in high-stakes fields like criminal justice and autonomous driving, their "black box" nature becomes a liability. We use explanatory systems like SHAP and LIME to peek inside, but these systems often suffer from explanatory system dissonance—they provide different justifications for the same prediction.

This research addresses the "disagreement problem": if two state-of-the-art explainers cannot agree on which features are important, how can a human user trust either? Specifically, the study investigates whether the similarity (correlation) between these explanations can serve as a proxy for model accuracy or trustworthiness.

The XAISuite Framework

To systematically study this dissonance, the authors introduced XAISuite, a unified framework built on top of the OmniXAI library. The framework streamlines the workflow into three distinct stages:

  1. Data Loader: Handles retrieval, preprocessing, and editing via templates.
  2. Model Training and Explanation: Trains models (using libraries like scikit-learn) and generates explanations through multiple systems simultaneously.
  3. Analyzer: Compares importance scores across different explainers to generate correlations and graphics.
The XAISuite architecture, showing the data loading, model training/explanation, and analysis pipeline.

Experimental Design

The study utilized four tabular datasets to cover a range of complexities:

  • Regression: Diabetes (scikit-learn) and Energy Efficiency (UC Irvine).
  • Classification: Iris (scikit-learn) and Digits (scikit-learn).

To test the relationship between explanation consistency and model performance, a "Second-Level Model" approach was employed. After training a primary model (First-Level) and calculating the correlation between its SHAP and LIME importance scores, a second model was trained to attempt to predict the first model's accuracy based solely on those correlation scores.

Key Insights: The Trust Paradox

1. Consensus Does Not Equal Accuracy

A primary finding is that high agreement between explainers does not necessarily indicate a high-performing model. For the Diabetes regression task, the R² values for predicting accuracy from explanation correlation were negative (ranging from -0.904 to -1.212), indicating no learnable relationship. In the Digits dataset, the average correlation between SHAP and LIME was remarkably low (often below 0.5), yet the models maintained high accuracy (up to 97.5%).

2. The "Maximum Importance" Fallacy

It is often assumed that focusing on the most important features yields more consistent results. However, the authors found that correlations for top-ranked features were often more variable than the average correlation across all features.

A comparison of SHAP and LIME importance scores for the Glazing Area feature, illustrating the frequent dissonance between the two systems.

3. Undefined Correlations

The researchers noted cases where correlation was mathematically undefined. This occurs when one system (like SHAP) decides a feature has exactly zero importance, while the other (LIME) assigns it a value. This highlights a fundamental difference in how these algorithms perceive "irrelevance."

Conclusion

The study formalizes two propositions: (1) model accuracy cannot be inferred based on the correlation between different explainers, and (2) using only maximum importance scores does not provide a more consistent comparison than using all scores.

While limited by a small sample size for second-level models, this work highlights the critical need for better mathematical foundations in XAI. Future work will expand XAISuite to non-tabular data (images, text) and increase the number of first-level models to provide a more robust dataset for analysis.

Summary updated

BibTeX
@misc{mitra2023xaisuite,
  author = {Shreyan Mitra and Leilani Gilpin},
  title = {{The XAISuite framework and the implications of explanatory system dissonance}},
  year = {2023},
  eprint = {2304.08499},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.08499},
}
Figure