Comparing the Accuracy and Interpretability of CNN, Transformer, and ConvNeXt for Skin Lesion Classification

M. Denny Richardo

Abstract


Early detection of skin cancer plays an important role in improving treatment outcomes, particularly in cases of melanoma. Numerous studies have employed deep learning models for skin lesion classification; however, most have focused on a single architectural paradigm and placed greater emphasis on improving classification accuracy than on model interpretability. This study presents a comparative analysis of three deep learning architectural paradigms: EfficientNet-B4 as a representative Convolutional Neural Network (CNN), Swin Transformer as a representative Vision Transformer (ViT), and ConvNeXt as a representative modernized CNN for the classification of seven types of skin lesions using the HAM10000 dataset. All models were trained using consistent training configurations, with analytical class weighting applied to address class imbalance. Model performance was evaluated using accuracy, precision, recall, Macro F1-score, and confusion matrices, while Explainable AI (XAI) techniques, including Grad-CAM and attention maps, were employed to assess the transparency of the models' decision-making processes. The experimental results show that ConvNeXt achieved the best overall performance, with an accuracy of 91.62% and a Macro F1-score of 0.8897. It also achieved higher recall for the melanoma class than EfficientNet-B4 and Swin Transformer. The XAI visualizations further demonstrate that ConvNeXt was able to focus its attention on lesion regions that were more clinically relevant compared with the other two models.
These findings indicate that ConvNeXt provides a better balance between classification performance and model interpretability, suggesting its potential as a reliable approach for supporting artificial intelligence-based skin lesion diagnosis systems.

Keywords


ConvNeXt; Explainable AI; Grad-CAM; skin cancer; swin transformer

Full Text:

PDF

References


Tschandl, P., Rosendahl, C. & Kittler, H. The HAM10000 Dataset, a Large Collection of Multi-Source Dermatoscopic Images of Common Pigmented Skin Lesions. SCI Data 5, 180161 (2018). https://doi.org/10.1038/sdata.2018.161

M. S. Islam, A. C. Chamgoué, and G. P. Dubb, “Benchmarking State-of-the-Art Vision Transformer Architectures for the Automated Classification of Pigmented Skin Lesions,” Computers and Electronics in Medicine, Vol. 3, No. 1, pp. 42–47, Jan. 2026, DOI: 10.69882/adba.cem.2026015.

C. Supriyanto et al., “A Bibliometric Review of Deep Learning Approaches in Skin Cancer Research,” Mar. 01, 2025, Multidisciplinary Digital Publishing Institute (MDPI). DOI: 10.3390/computation13030078.

X. Yu and X. Lei, “Application of the Multi-Omics Liquid Biopsy Method M2P-HCC in Early Liver Cancer Screening for High-Risk Individuals with Hepatitis B-Related Liver Cancer,” Diagnostics, Vol. 13, No. 15, Aug. 2023, DOI: 10.3390/diagnostics13152484.

S. Reddy, A. Shaheed, and R. Patel, “Artificial Intelligence in Dermoscopy: Enhancing Diagnosis to Distinguish Benign and Malignant Skin Lesions,” Cureus, Feb. 2024, DOI: 10.7759/cureus.54656.

Q. Su, H. N. A. Hamed, M. A. Isa, X. Hao, and X. Dai, “A GAN-based Data Augmentation Method for Imbalanced Multi-Class Skin Lesion Classification,” IEEE Access, Vol. 12, pp. 16498–16513, 2024, DOI: 10.1109/ACCESS.2024.3360215.

K. Ali, Z. A. Shaikh, A. A. Khan, and A. A. Laghari, “Multiclass Skin Cancer Classification using EfficientNets – a First Step Towards Preventing Skin Cancer,” Dec. 01, 2022, Elsevier Masson s.r.l. DOI: 10.1016/j.neuri.2021.100034.

I. A. Pardosi, R. Yunis, and A. Halim, “Skin Lesion Diagnosis through Deep Learning and Hybrid Texture Feature Augmentation,” Teknika, Vol. 14, No. 2, pp. 264–269, Jul. 2025, DOI: 10.34148/teknika.v14i2.1253.

S. Aburass, O. Dorgham, J. al Shaqsi, M. Abu Rumman, and O. Al-Kadi, “Vision Transformers in Medical Imaging: a Comprehensive Review of Advancements and Applications Across Multiple Diseases,” Dec. 01, 2025, Springer Nature. DOI: 10.1007/s10278-025-01481-y.

A. Kumar and Jyoti, “A Comprehensive Review of Transformer Models in Brain Tumor Analysis,” Expert Syst Appl, Vol. 300, p. 130509, Mar. 2026, DOI: 10.1016/j.eswa.2025.130509.

H. Fang, Y. Sun, S. Zhang, X. Teng, X. Li, and X. Yu, “HSPF-Net: Hybrid CNN-Transformer with Serial-Parallel Fusion for Skin Lesion Segmentation,” Digit Signal Process, Vol. 172, p. 105891, Mar. 2026, DOI: 10.1016/j.dsp.2026.105891.

M. Waqar et al., “Explainable Clinical Diagnosis through Unexploited Yet Optimized Fine-Tuned ConvNeXt Models for Accurate Monkeypox Disease Classification,” SLAS Technol, Vol. 33, Aug. 2025, DOI: 10.1016/j.slast.2025.100336.

Roy, A.L., Al Maruf, A., Sony, R.I. et al. Fostering Trust and Interpretability in Skin Cancer Classification: a Hybrid Framework of Deep Learning and Machine Learning with Explainable AI. J Ambient Intell Human Comput 16, 879–894 (2025). https://doi.org/10.1007/s12652-025-04984-2.

M. M. Islam, N. Akter, M. Assaduzzaman, M. M. H. Shimul, and R. K. R. Sarker, “Explainable AI for Breast Cancer Detection: Biglycan Biomarker Classification with Transfer Learning,” Intell Based Med, Vol. 13, Mar. 2026, DOI: 10.1016/j.ibmed.2025.100340.

I. Pacal, B. Ozdemir, J. Zeynalov, H. Gasimov, and N. Pacal, “A Novel CNN-ViT-based Deep Learning Model for Early Skin Cancer Diagnosis,” Biomed Signal Process Control, Vol. 104, Jun. 2025, DOI: 10.1016/j.bspc.2025.107627.

M. Denny Richardo and H. Satria, “Comparative Analysis of Explainable AI Models for Pneumonia Detection in Chest X-rays using Grad-CAM,” Sistem Informasi dan Komputer), Vol. 14, No. 04, pp. 475–483, Okt. 2025, DOI: 10.32736/sisfokom.v4i4.2450.

Y. Gulzar, B. I. Ya’u, M. Alkanan, and C. W. Onn, “ScNet: a Lightweight CNN with Depthwise and SE Modules for Skin Lesion Classification,” Comput Methods Biomech Biomed Eng Imaging Vis, Vol. 13, No. 1, 2025, DOI: 10.1080/21681163.2025.2576198.

S. Nurmaini et al., “Deep Learning for Improving the Effectiveness of Routine Prenatal Screening for Major Congenital Heart Diseases,” J Clin Med, Vol. 11, No. 21, Nov. 2022, DOI: 10.3390/jcm11216454.

G. H. Dagnaw, M. el Mouhtadi, and M. Mustapha, “Skin Cancer Classification using Vision Transformers and Explainable Artificial Intelligence,” J Med Artif Intell, Vol. 7, No. June, 2024, DOI: 10.21037/jmai-24-6.

S. Cherukuri and S. D. Vara Prasad, “EnsembleSkinNet: a Transfer Learning-based Framework for Efficient Skin Cancer Detection with Explainable AI Integration,” Front Oncol, Vol. 15, 2025, DOI: 10.3389/fonc.2025.1699960.




DOI: https://doi.org/10.32520/stmsi.v15i8.6390

Article Metrics

Abstract view : 1 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.