# Robustness, Stability, and Fidelity of Explanations for a Deep Skin Cancer Classification Model
## 2 Material and Methods
### Methods
#### 2.2.2 Explanation Techniques
They can be either based on examples (e.g., [41; 42; 43]), counterfactuals (e.g., [44]), hidden semantics (e.g., [45]), rules (e.g., [46; 47; 48]), or features/attributions/saliency (e.g., [49; 50; 51; 52]). The most common explanation for classification models are the latter, that is, feature importances [22]. Feature importances rely on feature scoring and ranking to quantify and improve the understandability of a model, and thereby explain its behaviour [53]. If the model is trained on images (i.e., features refer to (super-)pixels of the images), one also speaks about \"saliency maps\" or \"pixel attribution\" explanation methods. Saliency of features to rank their explanatory power is applicable in both feature selection and as a post hoc explainability approach [16; 54]. Both XAI/IML methods we use in this work, that is, integrated gradients by [PERSON] et al. [20] and local model-agnostic explanations (LIME) by [PERSON] et al. [21], provide explanations as feature importances. Moreover, they are both post hoc methods that are applied after model training. However, LIME is model-agnostic and can be applied to any model, while integrated gradients can only be applied to any differentiable model. Moreover, LIME is perturbation-based and integrated gradients is gradient-based. For neural networks, one measure of feature importance/saliency is the input sensitivity, that is, the partial derivative of the network's output with respect to its input. For shallow networks, feature assessment originating from this idea was proposed by [PERSON] et al. [55]. Use of a partial derivative method was rediscovered within the context of deep neural networks by [PERSON] et al. [56], where it was used to generate an image-specific saliency map for visual interpretation of a CNN classifier. However, these early gradient-based techniques suffer from the saturation problem [20; 57]. Meaning that the more a model learns the relationship between the range of an individual feature and the prediction, the gradient for this feature will become increasingly small and even go to zero. To solve this saturation problem, the integrated gradients technique by [PERSON] et al. [20] accumulates gradients along a path from a baseline instance \(x^{\prime}\) to the specific instance of interest. The integrated gradient for a particular instance \(x\) is defined as  
\[(x_{i}-x^{\prime}_{i})\times\int_{\alpha=0}^{1}\frac{\delta F(x^{\prime}+ \alpha\times(x-x^{\prime}))}{\delta x_{i}}d\alpha \tag{2}\]  
where \(i\) is a feature (pixel), and \(\frac{\delta F(x)}{\delta x_{i}}\) is the gradient of \(F(x)\) along the \(i\)th feature. LIME is perturbation-based and does not need access to any model internals. It works for tabular, text, and image data. It takes the instance \(x\) for which the prediction should be explained and permutes depending on the data type, either its feature values (for tabular and text data) or its superpixels (i.e., interconnected pixels with similar colour) for image data. These permuted instances are then weighted by their distance to \(x\), the model \(f\) is used to predict the permuted instances, and a new surrogate model \(g\) is trained. Optimization is used to find a local surrogate model with low complexity but high agreement with the prediction of the original model. In short, LIME is defined as follows:  
\[\xi=\operatorname*{arg\,min}_{g\in G}\mathcal{L}(f,g,\pi_{x})+\Omega(g), \tag{3}\]  
where \(\pi_{x}\) is the proximity measure to define locality around \(x\), and \(\Omega(g)\) is the complexity of \(g\).