Abstract
Explainable AI (XAI) methods are increasingly critical for high-stakes machine learning applications, yet the field lacks a deep theoretical understanding of what constitutes a "good" explanation. This paper introduces a novel framework using spectral analysis—specifically Singular Value Decomposition (SVD)—to evaluate XAI quality. By analyzing the redistribution matrix that maps model outputs to input attributions, we identify two fundamental, competing properties: stability (robustness to noise) and target sensitivity (class specificity). We propose the Stability-Sensitivity Metric (SSM), a unified measure that explains the behavior of popular empirical metrics and provides a principled approach to hyperparameter tuning.
Introduction
As machine learning models are deployed in high-stakes domains, XAI methods—such as heatmaps identifying influential pixels—have become essential tools for transparency. While numerous empirical evaluation metrics (e.g., pixel-flipping, Shannon entropy) exist, there is a significant gap in understanding the mathematical properties these metrics reward. This research addresses this gap by moving beyond empirical "unit tests" toward a structural understanding of explanation quality through a formal, mathematically grounded framework.
Methodology: Spectral Analysis of Explanations
The core of our approach is the analysis of the explanation process through the lens of spectral analysis. We formulate attribution-based explanations as a redistribution matrix ($R$) that maps the network's outputs back to its input features. By applying Singular Value Decomposition (SVD) to this matrix, we extract its singular values ($\sigma_1, \sigma_2, \dots, \sigma_K$).
From these singular values, we derive two key properties:
- Stability: Defined as proportional to $1/\sigma_1$, where $\sigma_1$ is the largest singular value representing the maximum amplification of noise. High stability prevents the "shattered gradient" problem.
- Sensitivity: Measured by the L2 norm of all singular values, representing the explanation's ability to distinguish between different output classes.
These two factors are combined into the Stability-Sensitivity Metric (SSM), which identifies the optimal balance for explanation quality. Furthermore, we provide theoretical proofs linking these spectral properties to XAI hyperparameters, such as the $\gamma$ parameter in Layer-wise Relevance Propagation (LRP).
The Stability-Sensitivity Trade-off
A central insight of this work is the fundamental trade-off between stability and sensitivity. If an explanation is heavily smoothed, it becomes highly stable but loses sensitivity, appearing identical regardless of the target class. Conversely, an unsmoothed explanation may be highly sensitive but unstable, dominated by high-frequency noise.
Hyperparameters like $\gamma$ in LRP or noise variance in SmoothGrad act as control dials for this trade-off. Our spectral analysis also reveals that Shannon entropy, often used to penalize "noisy" heatmaps, is a holistic metric that penalizes both instability and insensitivity.
Experimental Results
The framework was evaluated on MNIST (using a custom 11-layer CNN) and ImageNet (using a pre-trained VGG-16). Key findings include:
- Optimal Hyperparameters: The SSM metric identified a "sweet spot" for LRP ($\gamma \approx 0.04$) on both datasets, balancing noise reduction with class specificity.
- Metric Alignment: SSM correlates strongly with established empirical metrics like Pixel-Flipping AUC (PF-AUC) and Shannon Entropy.
- Analytical Bounds: We derived a closed-form mathematical bound showing that the L1 operator norm of LRP decreases monotonically as $\gamma$ increases, formally explaining why higher $\gamma$ values yield smoother heatmaps.
Conclusion and Future Work
While the SSM metric provides a robust theoretical foundation, some disagreement remains between different evaluation metrics regarding exact optimal values. Additionally, the computational complexity of SVD on the redistribution matrix remains a challenge for large-scale applications. However, this spectral framework offers a principled basis for developing more reliable techniques for both generating and evaluating explanations in the future.
Summary updated