# Integrating Explanations into CNNs by Adopting Spiking Attention Block for Skin Cancer Detection
## 4 Experimental Results
### Classification Results  
Table 1 presents the precision of all the models on the HAM10000 dataset. The abbreviation \"+SAB\" in this table represents models that include SAB. InRe represents InceptionResNetV2, Xe is short for Xception, and De represents DenseNet201. By examining the table, it is evident that when InRe is combined with SAB, there are notable enhancements in the results. The precision of this combination is 94%, which is also the highest score compared to all other models. In addition, it is evident that SAB enhances the precision of the InRe model by 5% compared to the baseline InRe model. This trend is also applicable to the Xe and De models as well. For example, SAB enhances the accuracy of DenseNet201, ResNet34, ResNet50, and VGG16 by 0.5%, 0.8%, 1.2%, and 2%, respectively. When the  
SA block is incorporated into the networks, we observe a comparable pattern in the AUC scores. Specifically, the performance of Xe increased by 5%, and the performance of De increased by 9%.  
While InRe + SAB achieves the highest weighted average performance, a detailed analysis reveals that SAB significantly improves the efficiency of the original InRe algorithm for classifying the akiec, bcc, bkl, df, nv and mel classes. Specifically, SAB increases precision by 6% for akiec, 8% for bcc, 6% for bkl, 7% for df, 11% for nv, 7% for mel, and 4% for vasc.  
From Figure 14, it is evident that the inclusion of SAB generally enhances the precision of the models across all classes, with several intriguing observations. Notably, the Xception (Xe) model shows substantial improvements when augmented with SAB, particularly for the dermatofibroma (df) and actinic keratosis and intraepithelial carcinoma (akiec) classes, suggesting that this model benefits significantly from attention mechanisms in handling the complex textural and morphological features of these skin conditions. InceptionResNetV2 (InRe) and DenseNet201 (De) also display notable precision gains with SAB, especially for melanoma (mel) and vascular lesions (vasc), indicating their effectiveness in leveraging temporal-spatial information for these highly varied and nuanced classifications. The uniformly positive increments across models and classes, especially in challenging classes such as melanoma and basal cell carcinoma, underscore the robustness and utility of adding SAB to these architectures, potentially due to better feature isolation and prioritization during model training.  
The performance of InRe + SAB as an explainer is also illustrated in Figure 15, where the proposed SAB has clearly enabled the CNN model to provide accurate attentions for its decisions.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Class**} & \multicolumn{6}{c}{**Precision**} \\ \cline{2-7}  & **InRe** & **InRe + SAB** & **Xe** & **Xe + SAB** & **De** & **De + SAB** \\ \hline
**akiec** & 0.94 & 1.00 & 0.62 & 0.75 & 0.63 & 0.78 \\ \hline
**bcc** & 0.87 & 0.95 & 0.59 & 0.70 & 0.69 & 0.81 \\ \hline
**bkl** & 0.86 & 0.92 & 0.53 & 0.65 & 0.58 & 0.70 \\ \hline
**df** & 0.93 & 1.00 & 0.72 & 0.89 & 0.73 & 0.86 \\ \hline
**nv** & 0.78 & 0.89 & 0.51 & 0.64 & 0.49 & 0.60 \\ \hline
**mel** & 0.90 & 0.97 & 0.70 & 0.74 & 0.80 & 0.91 \\ \hline
**vasc** & 0.96 & 1.00 & 0.88 & 0.93 & 0.81 & 0.90 \\ \hline
**Macro average** & 0.81 & 0.89 & 0.65 & 0.75 & 0.67 & 0.79 \\ \hline
**Weighted average** & 0.89 & 0.96 & 0.71 & 0.76 & 0.73 & 0.82 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of selected pretrained CNN models with and without SAB on HAM10000.  
Figure 14: Performance increase using models that include the soft attention block.