Abstract
In many modern image-classification applications, understanding the cause of model's prediction can be as critical as the prediction's accuracy itself. Various feature-based local explanations generation methods have been designed to give us more insights on the decision of complex classifiers. Nevertheless, there is no consensus on evaluating the quality of different explanations. In response to this lack of comprehensive evaluation, we introduce the c-Eval metric and its corresponding framework to quantify the feature-based local explanation's quality. Given a classifier's prediction and the corresponding explanation on that prediction, c-Eval is the minimum-distortion perturbation that successfully alters the prediction while keeping the explanation's features unchanged. We then demonstrate how c-Eval can be computed using some modifications on existing adversarial generation libraries. To show that c-Eval captures the importance of input's features, we establish the connection between c-Eval and the features returned by explainers in affine and nearly-affine classifiers. We then introduce the c-Eval plot, which not only displays a strong connection between c-Eval and explainers' quality, but also helps automatically determine explainer's parameters. Since the generation of c-Eval relies on adversarial generation, we provide a demo of c-Eval on adversarial-robust models and show that the metric is applicable in those models. Finally, extensive experiments of explainers on different datasets are conducted to support the adoption of c-Eval in evaluating explainers' performance.
Introduction
As deep learning models are increasingly deployed in high-stakes fields like medicine and autonomous driving, understanding the rationale behind specific decisions is paramount. This necessity has spurred the development of "local explainers"—tools like LIME, SHAP, and Grad-CAM that highlight the input features (e.g., pixels) responsible for a classification. However, evaluating these explainers presents a significant challenge. There is often no ground truth for what a "perfect" explanation should be for a black-box model. Furthermore, explainers produce outputs in diverse formats—ranging from image segments to heatmaps—making direct comparison difficult. Finally, human intuition can be misleading, as what appears relevant to a person may not align with the features the model actually prioritized.
To address this, we introduce c-Eval, a unified, objective metric for evaluating how effectively explainers identify critical features. c-Eval provides a deterministic way to rank explanation quality without relying on human-labeled ground truth.
Methodology: The c-Eval Metric
The core intuition behind c-Eval is rooted in adversarial perturbation. If an explanation $e_x$ successfully captures the most important features for a prediction, the remaining features should be relatively inconsequential. Consequently, if one is restricted from altering the features identified in the explanation, a significant amount of distortion must be applied to the "unimportant" parts of the image to force the model to change its prediction.
Definition: c-Eval is the minimum $L_2$ distortion required to alter a model's prediction while keeping the explanatory features fixed. A higher c-Eval score indicates a superior explanation.
Computation and Scalability
We adapt the Carlini-Wagner (CW) attack to find this minimum perturbation. While CW is computationally intensive, we demonstrate that faster gradient-based methods, such as the Gradient-Sign-Attack (GSA) and Iterative-Gradient Attack (IGA), produce highly correlated results, making c-Eval practical for large-scale datasets. We also introduce the c-Eval plot, which tracks the metric as the explanation size (number of features, $k$) increases, revealing the point of diminishing returns for an explainer.
Experimental Setup
We validated c-Eval across three diverse image datasets: MNIST (grayscale digits), CIFAR10 (low-resolution color), and Caltech101 (high-resolution color). We evaluated several popular explainers, including SHAP, LIME, Grad-CAM (GCam), DeepLIFT, Integrated Gradients, and Layerwise Relevance Propagation (LRP).
Key Insights and Results
Ranking Explainers
On MNIST, SHAP and LIME consistently outperformed back-propagation methods like DeepLIFT. On larger images (Caltech101), LIME and SHAP remained superior, while Grad-CAM’s performance varied significantly depending on the underlying model architecture.
Model-Centric Logic vs. Human Intuition
A key finding was SHAP’s performance on MNIST. While SHAP often highlights "background" pixels that appear as noise to humans, c-Eval assigned it high scores. This suggests that these background pixels are essential to the model's logic; for instance, changing black background pixels to white might cause the model to misclassify a '4' as a '0'. c-Eval successfully captures this model-centric logic that human intuition often misses.
Decision Boundary Analysis
Our analysis shows that for many state-of-the-art classifiers (e.g., Inception-v3, ResNet50), decision boundaries are "nearly-affine" (locally linear). In this context, c-Eval essentially measures the distance from a data point to the nearest decision hyperplane within a specific subspace defined by the explanation.
Conclusion and Future Work
c-Eval offers a robust, deterministic framework for evaluating feature-based local explanations. While currently focused on the $L_2$ norm in image classification, future work could explore other norms (like $L_\infty$) more aligned with human perception. Additionally, extending c-Eval to other domains such as Natural Language Processing (NLP) or tabular data remains a promising avenue for research. Despite the computational overhead of optimization loops, the scalability provided by GSA/IGA approximations makes c-Eval a viable tool for the rigorous evaluation of machine learning explainability.
Summary updated