# Robustness, Stability, and Fidelity of Explanations for a Deep Skin Cancer Classification Model
## 2 Material and Methods
### Methods
#### 2.2.1 Deep Learning  
Deep learning networks are based on artificial neural networks, which are composed of neurons organized in layers [31]. In comparison to traditional or \"shallow\" neural networks, deep networks use multiple layers to progressively extract higher-level features from the raw input [32; 33]. This automatic feature extraction is one of the main advantages of deep learning since not everything needs to be programmed explicitly [34]. It is also one the reasons why deep learning networks have shown exceptional performance, especially  
Figure 1: Example images from the seven different classes of skin lesion. For each class (from top to bottom row: askice, bcc, bkl, df, mel, nv, and vasc), five randomly sampled instances are shown.  
in (medical) image analysis, where manual feature engineering is a time-consuming and error-prone process [4]. However, this advantage comes with the trade-off that deep learning models, with their many kinds of processing layers and multitudes of weights, are also reckoned to be one of the least interpretable machine learning models [18].  
Deep learning models can be categorized into multi-layer neural networks that take non-structured data as input, and CNNs that take structured data as input. For (medical) image analysis, CNNs are the most common choice, because of the structural characteristic of images, that is, the structural information among neighbouring pixels or voxels is another source of information [4; 33; 35]. The core building blocks of a CNN are convolutional layers (giving CNNs their name), pooling layers, and fully connected layers [4; 36]. The convolutional layers produce feature maps by applying convolutional operations to the input. More specifically, the units of the convolution layer \(l\) compute their activations \(\mathbf{A}_{j}^{(l)}\) based only on a spatially contiguous subset of units in the feature maps \(\mathbf{A}_{j}^{(l-1)}\) of the preceding layer \(l-1\) by convolving the kernels \(k_{ij}^{(l)}\) as follows:  
\[\mathbf{A}_{j}^{(l)}=f(\sum_{i=1}^{M^{(l-1)}}\mathbf{A}_{j}^{(l-1)}*k_{ij}^{(l)}+b_{j} ^{(l)}) \tag{1}\]  
with \(M^{(l-1)}\) being the number of feature maps in the \(l-1\) layer, \(*\) being a convolution operator, \(b_{j}^{(l)}\) being a bias parameter, and \(f(\cdot)\) being a non-linear activation function. Pooling layers can be added to down-sample the feature maps of the preceding convolution layer and, through that, \"squeeze\" the amount of information that is passed on to the next layer. Fully connected layers are the ones solving the final classification problem with the data they have from the previous layer [31].  
Table 1 reports the summary and overall architecture of the CNN used in this study. We built our CNN with the Keras Sequential API and trained it by using 150 epochs, a batch size of 10, the Adam optimizer with categorical cross-entropy as the loss function, and 0.0001 as the learning rate. As the non-linear activation function (i.e., \(f(\cdot)\) in Equation (1)) we chose the rectified linear unit (ReLU) activation function.