Implementation Of Attention Mechanism And Explainable Ai For Skin Lesion Classification Using CNN

Authors

  • Ilham Nur Fajri Universitas Telkom, Purwokerto
  • Aditya Dwiputro Wicaksono Universitas Telkom, Purwokerto
  • Lisda Universitas Telkom, Purwokerto

DOI:

https://doi.org/10.30865/jurikom.v13i3.9781

Keywords:

Skin Lesion, CNN, Attention Mechanism, Explainable AI, Grad-CAM

Abstract

Skin lesions are critical dermatological indicators that require early detection to prevent severe outcomes such as melanoma. Traditional Convolutional Neural Network (CNN) architectures employed for categorizing these lesions frequently encounter significant hurdles, notably disproportionate class distributions and a lack of transparency, functioning essentially as opaque "black boxes" during inferential processes. To mitigate these limitations, the current research deploys a ResNet-50 framework augmented by a Convolutional Block Attention Module (CBAM) to refine spatial and channel feature prioritization, alongside the integration of Gradient-Weighted Class Activation Mapping (Grad-CAM) to yield interpretable visualizations. The empirical analysis utilized the HAM10000 repository, incorporating a preprocessing pipeline that encompassed spatial resizing, pixel normalization, and data augmentation, subsequently trained via a bipartite transfer learning methodology. Quantitative metrics reveal that the CBAM-integrated architecture elevates the baseline global accuracy from 82.00% to 86.83%, while simultaneously augmenting the Macro F1-Score from 68.00% to 77.00%.  Qualitative evaluation using Grad-CAM shows sharper and more localized heatmaps, indicating that the attention mechanism successfully guides the model to focus on clinically relevant lesion areas. These findings suggest that combining attention mechanisms with explainable AI not only enhances classification performance but also provides visual transparency, supporting clinical interpretation. This approach is expected to improve trust and reliability in automated skin lesion classification systems

References

[1] World Health Organization, “ Skin diseases as a global public health priority,” 2025.

[2] World Health Organization, “Skin cancer, International Agency for Research on Cancer,” 2022.

[3] American Cancer Society, “Skin cancer,” 2022.

[4] I. Fathurrahman et al, “Pengembangan model CNN untuk klasifikasi penyakit kulit berbasis citra digital,” vol. 8, no. 1, pp. 45–50, 2025.,” Jurnal Infotek, vol. 8, no. 1, pp. 45-50, 2025.

[5] M. A. Richard et al, “Prevalence of most common skin diseases in Europe: A population-based study,” Journal of the European Academy of Dermatology and Venereology, vol. 36, p. 1088–1096, 2022.

[6] K. P. Venkatesh et al, “Deep learning models across the range of skin disease,” npj Digital Medicine, vol. 7, p. 32 , 2024.

[7] H. K. Jeong et al, “Deep learning in dermatology: A systematic review of current approaches, outcomes, and limitations,” Journal of Investigative Dermatology Innovations, vol. 3, no. 1, pp. 100-150, 2023.

[8] E. S. Nugroho et al, “Boosting the performance of pretrained CNN architecture on dermoscopic pigmented skin lesion classification,” Skin Research and Technology, vol. 29, no. 6, 2023.

[9] D. P. Mawardi et al, “Deteksi awal klasifikasi jenis penyakit kanker kulit dengan algoritma CNN berbasis mobile apps,” Jurnal ATASI, vol. 6, no. 2, pp. 55-60, 2023.

[10] R. K. Duanti et al, “Klasifikasi kanker kulit jinak dan ganas menggunakan metode Xception berbasis Raspberry Pi,” Jurnal-PTIIK Universitas Brawijaya, vol. 14, no. 2, pp. 55-63, 2025.

[11] G. M. A. Sihotang and J. Supardi, “Pengembangan model CNN ResNet-18 untuk klasifikasi kondisi gigi berbasis citra RGB sebagai solusi diagnostik digital,” Jurnal Pendidikan dan Teknologi Indonesia, vol. 4, no. 2, pp. 747-758, 2024.

[12] M. Shafiq et al , “A novel skin lesion prediction and classification technique: ViT-GradCAM,” Expert Systems, 2024.

[13] S. N. A. Kadir, E. S. Nugroho, and S. R. Dewi, “Fine-tuning of explainable CNNs for skin lesion classification based on dermatologists' feedback towards increasing trust,” 2023.

[14] D. A. Agustina, “Klasifikasi citra jenis kulit wajah dengan algoritma CNN ResNet-50,” Jurnal Ilmiah Sistem Informasi, vol. 8, no. 1, pp. 10-20, 2024.

[15] S. A. Hakim et al, “Klasifikasi Citra Generasi Artificial Intelligence menggunakan metode fine tuning pada residual network,” Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 11, no. 3, pp. 655-666, 2024.

[16] P. Tschandl, C. Rosendahl, and H. Kittler, “The HAM10000 dataset: A large collection of multi-source dermatoscopic images of common pigmented skin lesions,” Scientific Data, 2018.

[17] Islam, W, Jones, M, Faiz, R dan Sadeghipour, N., Q, “Improving performance of breast lesion classification using a ResNet50 model optimized with a novel attention mechanism.,” Tomography, vol. 8, no. 5, p. 2411–2425, 2022.

[18] Z. D. E. Putra and D. W. Utomo, “Penerapan deep learning dengan mekanisme attention untuk meningkatkan performa segmentasi liver dan tumor pada citra CT menggunakan ResUnet,”,” Jurnal Nasional Teknologi dan Sistem Informasi, vol. 10, no. 3, pp. 231-239, 2024.

Additional Files

Published

2026-06-30

How to Cite

Ilham Nur Fajri, Aditya Dwiputro Wicaksono, & Lisda, L. (2026). Implementation Of Attention Mechanism And Explainable Ai For Skin Lesion Classification Using CNN. JURIKOM (Jurnal Riset Komputer), 13(3), 973–984. https://doi.org/10.30865/jurikom.v13i3.9781

Issue

Section

Articles