Introduction
Explainability in machine learning is often achieved through perturbation-based methods such as SHAP or LIME. These techniques work by systematically modifying or "perturbing" input features—such as blurring image pixels or masking tabular values—to observe the resulting change in model output. However, a fundamental flaw persists: these perturbed inputs are frequently out-of-distribution (OOD) relative to the model's training data. This discrepancy leads to unreliable, miscalibrated probability estimates, where a model's confidence score no longer reflects its true predictive accuracy.
This research demonstrates that calibration error is not merely a secondary concern but a primary driver of poor explanation quality. By theoretically linking calibration to feature importance, the authors introduce ReCalX, a method that recalibrates models specifically for varying levels of perturbation, resulting in more robust and faithful explanations.
The Impact of Miscalibration on XAI
When a model's internal probability for a class drops from 99% to 70% following a perturbation, it is often unclear whether the drop is due to the removal of a critical feature or simply because the model is confused by the unnatural, corrupted input. This "confusion" is formally known as miscalibration.
The authors provide a rigorous mathematical proof showing that the predictive power of a feature subset is directly undermined by the model's calibration error under that specific perturbation level. Essentially, the perceived importance of a feature is the sum of its true informational value and the noise introduced by miscalibration. Consequently, if a model is poorly calibrated on perturbed data, the resulting feature rankings (saliency maps) become noisy and untrustworthy.
ReCalX: Perturbation-Specific Recalibration
To address this, the researchers propose ReCalX, an adaptive recalibration framework. Unlike standard Temperature Scaling, which applies a single global parameter to adjust confidence scores, ReCalX recognizes that miscalibration levels vary depending on how much the input has been altered.
The ReCalX process involves:
- Partitioning: The "perturbation level" (the fraction of features modified) is divided into discrete bins.
- Adaptive Scaling: A specific temperature parameter is learned for each bin using a small, held-out validation set of perturbed samples.
- Dynamic Selection: During the explanation phase, the model automatically applies the appropriate temperature based on the current level of input perturbation.
Crucially, ReCalX is an information-preserving transformation. It adjusts the confidence scores to be more accurate without altering the model’s underlying class predictions or the relative ranking of outcomes.
Experimental Evaluation
The effectiveness of ReCalX was evaluated across diverse datasets, including tabular data (Electricity, Covertype, Credit, Pol) and image data (ImageNet ILSVRC2012), using architectures ranging from Multi-Layer Perceptrons to Vision Transformers (ViT) and SigLIP.
Quantitative Improvements
- Calibration Accuracy: ReCalX reduced maximum calibration error by up to 97% compared to uncalibrated models. It significantly outperformed standard Temperature Scaling, which occasionally exacerbated calibration errors under high perturbation.
- Explanation Fidelity: Using "Remove and Retrain" benchmarks, the researchers found that features identified by ReCalX-enhanced explanations led to a steeper decline in model performance when removed, indicating that the method identifies features truly critical to the model's logic.
- Robustness: The "Sensitivity" metric—measuring how much an explanation changes with minor input variations—improved across all tested image models, suggesting more stable and reliable saliency maps.
Qualitative Insights
Visually, saliency maps generated with ReCalX are notably "cleaner." By removing the noise associated with miscalibration, the explanations focus more tightly on the actual objects of interest (e.g., specific anatomical features of an animal) rather than background artifacts.
Discussion and Limitations
A key insight of this work is that calibration is a prerequisite for explainability. The research reveals that miscalibration does not always increase linearly with perturbation; for some models, error is more pronounced at lower perturbation levels, necessitating the adaptive approach of ReCalX.
However, the method does have limitations. It requires a small validation set to learn the bin-specific temperatures, which may be a constraint in data-scarce environments. Additionally, while the inference is computationally efficient, the initial setup adds a pre-processing step. Future research may extend these principles beyond classification to regression and counterfactual explanations.
Conclusion
By bridging the gap between uncertainty calibration and explainable AI, this research provides both a theoretical foundation and a practical tool for improving model transparency. ReCalX demonstrates that by fixing how a model communicates its uncertainty, we can recover the true feature importance obscured by out-of-distribution noise.
Summary updated