Performance assessment of the developed classification framework is based on traditional evaluation measures stemming from the confusion matrix. A confusion matrix allows for obtaining a complete understanding of classifier performance through the representation of the number of right and wrong classifications made for each class defined. In this way, all types of errors can be analyzed. For example, both false positives and false negatives are especially important in the diagnosis of diseases. High values of false positives may show a classifier’s high sensitivity, but at the same time, large quantities of false negatives indicate its low sensitivity and pose potential health risks. The following performance metrics are utilized in this paper. These are accuracy, precision, recall, F1-score, specificity, true positive rate (TPR), and false positive rate (FPR). The formulas of these metrics are listed below:
Accuracy=(TP+TN)/(TP+TN+FP+FN) (3)
Precision = TP/(TP+FP) (4)
(5)
(6)
(7)
(8)
In this case, TP shows the number of malignant skin cancers detected by the framework, while TN indicates number of benign lesions. In turn, FP demonstrates a number of wrong decisions when lesions are classified as malignant even though they actually are benign. FN reflects number of wrongly recognized benign samples. With regards to skin cancer classification, minimizing false negatives is extremely important due to potential adverse effects resulting from it.
Performance of baseline models
All computational experiments were conducted in the cloud-based environment of Google Colab. It is worth noting that this platform allows running virtual machine instances using a predefined Ubuntu 20.04 as their operating system. To train baseline models, Python version 3.9 and PyTorch framework version 2.3.1 were used. Additionally, all the computing nodes had identical specifications, namely, an Intel Xeon CPU with a frequency of 2.2 GHz, NVIDIA Tesla T4 GPU, 16 GB RAM, and a storage capacity of 70 GB. Thus, such an experimental setting allowed reducing the variability introduced by different hardware platforms and increasing the reliability and reproducibility of results. A complete summary of the experimental environment can be found in Table 3.
Figure 4 shows learning curves corresponding to 100 epochs of training for the ResNet-50 architecture. Training was performed based on a dataset containing 2,110 images, while the size of the validation dataset was equal to 660 images. As one can see, during training, accuracy constantly increased up to almost 90.0%. At the same time, improvement in accuracy was observed for the first 50 epochs; after this point, the accuracy became almost constant, which can be viewed as a sign of convergence of the model. For validation, the model demonstrated an AUC value equal to 86.0%, thus demonstrating reasonable discriminative properties.
The confusion matrix presented in Figure 5 characterizes the performance of the ResNet-50 model in terms of classification accuracy in the case of a test set with 660 images. During evaluation, the model correctly recognized 310 out of 360 benign samples and 239 out of 300 malignant samples. However, a relatively high number of malignant samples were classified incorrectly, which led to a relatively large value of false negatives. This result should be considered in more detail due to the serious implications of this type of mistake when using the classifier in practice. In total, the model reached an accuracy of 83.0%, with a precision of 83.3%, a recall of 83.3%, and an F1-score of 83.3%.
Table 4 contains a detailed description of performance characteristics for the ResNet-50 model in terms of both classes. The classifier showed relatively balanced behavior in terms of precision, for benign samples, its value was equal to 83.0%, while malignant samples yielded a precision of 84.0%. Similarly, recall values reached 88.0% for benign lesions and 78.0% for malignant ones. Support in the table represents the number of samples corresponding to each class.
Proposed EDLF-SLC model
Figure 6 illustrates the training and validation AUC of the proposed model over 300 epochs. The AUC metric reflects the model’s ability to distinguish between benign and malignant classes, with higher values indicating better discriminative performance. As observed, the training AUC increases steadily throughout the training process, reaching a maximum value of 1.00 at approximately epoch 200. The validation AUC also improves progressively during the initial training stages; however, it begins to plateau after approximately 150 epochs, suggesting convergence of the model. The final validation AUC of 0.95 demonstrates strong generalization capability and effective class separability.
The confusion matrix of the proposed model, presented in Figure 7, shows that the model correctly classified 299 benign samples and 272 malignant samples, while misclassifying 28 benign cases as malignant and 61 malignant cases as benign. In total, the model achieved 571 correct predictions and 89 misclassifications. Notably, the higher number of false negatives (malignant cases misclassified as benign) highlights a critical limitation, as such errors may have significant clinical implications. Nevertheless, the overall classification performance remains robust. Unlike feature-selection approaches that intentionally remove dimensions before classification, the proposed framework preserves the complete fused deep representation generated by multiple heterogeneous CNN architectures. This design was adopted because each backbone extracts complementary lesion characteristics, and retaining the complete representation allows the SVM classifier to exploit the combined discriminative information without excluding potentially informative features. Consequently, the adopted feature fusion strategy prioritizes complementary representation learning while maintaining computational feasibility.
Figure 8 presents representative examples of classification outcomes produced by the proposed model. The results demonstrate that the model assigns high confidence scores to correctly classified instances. Specifically, benign cases exhibit high predicted probabilities (e.g., 99.84% and 99.85%), while malignant cases also show strong confidence levels (e.g., 99.98% and 99.96%). These findings indicate that the model can effectively differentiate between benign and malignant lesions, even in visually challenging scenarios. To enhance interpretability, the LIME framework is employed to generate localized explanations for model predictions, as shown in Figure 9A–D. LIME approximates the complex decision boundary of the model using a locally interpretable linear model. For each input image, the method generates perturbed samples by selectively masking superpixels and evaluating the corresponding predictions. A weighted linear model is then fitted to these samples, where weights are determined based on proximity to the original input using a radial basis function kernel. The resulting coefficients represent the contribution of each superpixel to the final prediction and are defined as:
(9)
where Xj ∈ {0, 1} denotes the presence or absence of the j-th superpixel, Bj represents the corresponding contribution weight, and B0 is the baseline prediction. Positive coefficients (Bj > 0) indicate regions contributing to the malignant class, whereas negative coefficients (Bj < 0) correspond to benign features. The LIME-based visualizations, shown in Figure 9B, D, highlight the most influential regions contributing to each classification decision. For benign lesions, the model emphasizes regions characterized by uniform pigmentation and well-defined borders. In contrast, for malignant cases, the highlighted regions correspond to clinically significant features such as irregular borders, color heterogeneity, and atypical textures. The intensity of the highlighted regions reflects the magnitude of the corresponding coefficients Bj.
These results demonstrate that the EDLF-SLC model focuses on clinically meaningful features that align with established dermatological criteria, such as the ABCD rule. This alignment enhances the interpretability and trustworthiness of the model, making it more suitable for clinical decision support. Furthermore, Figure 10 presents comparative visualization results obtained using additional explainability techniques, including Grad-CAM, HiResCAM, GradCAM++, XGradCAM, LayerCAM, EigenGradCAM, and EigenCAM, further validating the consistency of the identified salient regions across different methods. With respect to the performance of the proposed EDLF-SLC model and seven baseline models post-training for 100 epochs, a comparison can be seen in Table 5. EDLF-SLC obtained a competitive performance of 0.88 on each metric evaluated compared with the baseline architectures evaluated based on the experimental context. EfficientNetB0 and ResNet50 had good results as well, with accuracies of 0.85 and 0.83, respectively. Conversely, Inception-ResNetV2 had the worst classification performance of the evaluated models. On the other hand, despite relatively lower classification accuracy, its computational efficiency was still comparable to that of the baseline models. The proposed EDLF-SLC model demonstrated a competitive performance relative to the evaluated baseline models under the adopted experimental conditions.
To assess the performance of the proposed framework relative to existing approaches, Table 6 presents a comparison with representative state-of-the-art methods for skin lesion classification. For instance47, reported an accuracy of 0.86, while48 employed an ensemble-based model that achieved similar accuracy but lower precision, recall, and F1-score. Recent studies based on ensemble learning and multiple CNN architectures25,49 reported accuracies of up to 0.87. Under the adopted experimental conditions, the proposed EDLF-SLC framework achieved an accuracy of 0.88 while using a unified explainable architecture without requiring additional components such as lesion segmentation models.
DATA AVAILABILITY
The data that support the findings of this study are openly available in Kaggle at https://www.kaggle.com/datasets/fanconic/skin-cancer-malignant-vs-benign.

Figure 1: Representative dermoscopic images from the ISIC dataset illustrating the two diagnostic classes used in this study. Samples are labeled as benign (0) and malignant (1), highlighting the variability in lesion morphology, color, and texture across the dataset. Please click here to view a larger version of this figure.

Figure 2: Complete workflow of the proposed EDLF-SLC framework. The protocol begins with ISIC 2020 image acquisition, followed by preprocessing, data augmentation, dataset partitioning, deep feature extraction using four pretrained CNN architectures, feature fusion, SVM classification, performance evaluation, and LIME-based explanation generation. Please click here to view a larger version of this figure.

Figure 3: Examples of augmented skin lesion images generated using data augmentation techniques. This includes horizontal and vertical flipping, rotation, scaling, and brightness adjustment. These transformations increase dataset diversity, improve model robustness, and reduce the risk of overfitting during training. Please click here to view a larger version of this figure.

Figure 4: Training and validation receiver operating characteristic area under the curve (ROC-AUC) of the ResNet-50 model over 100 training epochs. The blue curve represents the training AUC, whereas the orange curve represents the validation AUC. The curves demonstrate rapid convergence during the initial training epochs, followed by stable optimization with consistently high validation performance, indicating effective learning and satisfactory generalization on the validation dataset. Please click here to view a larger version of this figure.

Figure 5: Confusion matrix of the ResNet-50 model on the test dataset. Rows represent the true class labels (0 = benign, 1 = malignant), whereas columns represent the predicted class labels. The diagonal elements indicate correctly classified samples (310 benign and 239 malignant), while the off-diagonal elements represent misclassified samples, including 50 false positives and 61 false negatives. Please click here to view a larger version of this figure.

Figure 6: Training and validation receiver operating characteristic area under the curve (ROC-AUC) of the proposed EDLF-SLC model over 300 training epochs. The blue curve represents the training AUC, whereas the orange curve represents the validation AUC. The model exhibits rapid convergence during the initial training epochs, followed by stable optimization with consistently high training and validation AUC values throughout the remaining epochs. The sustained validation performance demonstrates good generalization capability and stable learning behavior of the proposed EDLF-SLC framework on the validation dataset. Please click here to view a larger version of this figure.

Figure 7: Confusion matrix of the proposed EDLF-SLC model on the test dataset. Rows represent the true class labels (0 = benign, 1 = malignant), whereas columns represent the predicted class labels. The diagonal elements indicate correctly classified samples (299 benign and 272 malignant), while the off-diagonal elements correspond to misclassified samples, including 61 false positives and 28 false negatives. Please click here to view a larger version of this figure.

Figure 8: Sample predictions generated by the proposed EDLF-SLC model. This figure illustrates classification confidence levels for benign and malignant lesions and demonstrates the model’s discriminative capability. Please click here to view a larger version of this figure.

Figure 9: LIME-based local explanations of the proposed EDLF-SLC model. The figure highlights the most influential superpixel regions contributing to the model's classification decisions. (A) Original dermoscopic image of a benign skin lesion. (B) LIME explanation for the benign lesion, with highlighted superpixels indicating the regions that contributed most to the benign prediction. (C) Original dermoscopic image of a malignant skin lesion. (D) LIME explanation for the malignant lesion, showing the discriminative superpixel regions that predominantly influenced the malignant classification. Yellow boundaries delineate the influential superpixels identified by LIME, while gray regions represent areas with minimal contribution to the prediction. Please click here to view a larger version of this figure.

Figure 10: Comparison of class activation mapping (CAM)-based explainability methods applied to the proposed EDLF-SLC model. The figure compares the localization maps generated by GradCAM, HiResCAM, GradCAM++, XGradCAM, LayerCAM, EigenGradCAM, and EigenCAM for the same dermoscopic image. The first panel shows the original input image, followed by the corresponding raw activation maps and heatmap overlays produced by each explainability method. The visualizations illustrate the differences in spatial localization and highlight the image regions that contribute most strongly to the classification decision of the proposed EDLF-SLC framework. Please click here to view a larger version of this figure.
| Ref. | Year | Dataset | Data size | Feature extraction | Method | Accuracy |
| 9 | 2022 | HAM10000 dataset | 10015 skin lesion images | Color and shape features | ML algorithms and Convolutional NN models | 95.1% |
| 19 | 2023 | PH2 dataset | 200 annotated images | Asymmetrical, Streaks, Dots/Globules, Regression areas features | ML models | 94.0% |
| 30 | 2024 | HAM10000 dataset | 10000 images | Color and shape features | S-MobileNet | 97.7% |
| 28 | 2025 | ISIC2020 and HAM10000 datasets | ISIC2020 (12,670 images) and HAM10000 (10,015 images) | Color and shape | Residual network-Long Short-Term Memory (R-LSTM50) | 95.7% (ISIC2020); 94.2% (HAM10000) |
| 32 | 2026 | Monkeypox Skin Lesion Dataset (MSLD) | 770 images | Context and texture | DenseNet121, Xception, InceptionV3 and CBAM | 88% (DenseNet121) |
| 39 | 2025 | HAM10000 | 38,569 images | Context and texture | MobileNet, ResNet50, InceptionV3, and EfficientNet | 93.6% (MobileNet) |
| 40 | 2025 | ISIC 2019 | 2357 images | Context and Spatial | CNN-transformer-based multi-modal DL | 98.71% |
| 41 | 2026 | ISIC 2019 | 25,000 images | Context and texture | TransXV2S | 95.26% |
| 42 | 2025 | HAM10000 | 10,015 images | Color and shape | ViT with YOLOv8 | 93% |
Table 1: Literature comparison. Summary of some recently published work utilizing deep learning algorithms for Skin lesion classification.
| Dataset | Benign | Malignant | Total |
| Train data | 1440 | 1197 | 2637 |
| Test data | 360 | 300 | 660 |
| Total data | 1800 | 1497 | 3297 |
Table 2: Dataset distribution. Distribution of benign and malignant samples in the ISIC 2020 dataset, including training and testing splits.
| Component | Specification |
| Operating System | Ubuntu 20.04 |
| Programming Language | Python 3.9 |
| DL Framework | PyTorch 2.3.1 |
| Optimizer | Adam |
| Learning rate scheduling | 1e−3 |
| Number of epochs | 100/300 |
| CPU | 2 vCPU 2.2 GHz |
| GPU | Tesla T4 (16 GB) × 1 |
| RAM | 16 GB |
| Trainable Parameters | 2,430,353 (9.27 MB) |
| Non-trainable Parameters | 133,434,397 (509.01 MB) |
Table 3: System specifications. Detailed specifications of the computational environment, including software frameworks and hardware resources utilized for model training and evaluation.
| Class | Precision | Recall | F1-score | Support |
| Benign class | 0.83 | 0.88 | 0.85 | 360 |
| Malignant class | 0.84 | 0.78 | 0.81 | 300 |
| Accuracy | - | - | 0.832 | 660 |
| Macro avg | 0.84 | 0.83 | 0.83 | 660 |
| Weighted avg | 0.84 | 0.83 | 0.83 | 660 |
Table 4: Classification report. Classification performance of the ResNet-50 model on the test dataset, including precision, recall, F1-score, and support for each class.
| Model | Accuracy | Precision | Recall | F1 Score | Time (s) |
| NASNetLarge | 0.77 | 0.76 | 0.77 | 0.76 | 2002.47 |
| EfficientNetB0 | 0.85 | 0.85 | 0.85 | 0.85 | 734.8 |
| Xception | 0.8 | 0.81 | 0.8 | 0.8 | 732.23 |
| ResNetV2 | 0.63 | 0.64 | 0.63 | 0.611 | 1072.34 |
| MobileNet | 0.79 | 0.8 | 0.79 | 0.79 | 629.29 |
| MobileNetV2 | 0.77 | 0.79 | 0.77 | 0.77 | 660.5 |
| ResNet50 | 0.83 | 0.83 | 0.83 | 0.83 | 749.77 |
| EDLF-SLC | 0.88 | 0.89 | 0.87 | 0.88 | 3279.77 |
Table 5: Model performance comparison. Comparative performance of the proposed EDLF-SLC model and baseline deep learning models across accuracy, precision, recall, F1-score, and computational time.
| Model | Accuracy | Precision | Recall | F1-Score |
| ResNet-18 [25] | 0.85 | 0.85 | 0.85 | 0.85 |
| ResNet-50 with SVM [50] | 0.87 | 0.88 | 0.98 | 0.93 |
| Hybrid DL models + SVM [48] | 0.86 | 0.84 | 0.8 | 0.84 |
| Hybrid DL models + SVM [49] | 0.86 | 0.8 | 0.6 | 0.68 |
| Proposed EDLF-SLC | 0.88 | 0.89 | 0.87 | 0.88 |
Table 6: Model comparison metrics. Performance comparison between the proposed EDLF-SLC framework and recent state-of-the-art approaches for skin lesion classification.
Supplementary File 1: Algorithm 1. Workflow of the proposed EDLF-SLC framework, outlining data preprocessing, deep feature extraction using multiple CNN architectures, SVM-based classification, and LIME-based explainability for skin lesion prediction. Please click here to download this file.
Supplementary File 2: Algorithm 2. Workflow of the LIME-based local explanation process, illustrating superpixel generation, perturbation sampling, surrogate model construction, and visualization of the image regions contributing most to the classification decision. Please click here to download this file.