Attention-Guided Hybrid CNN–Vision Transformer Framework for Explainable Skin Cancer Classification
DOI:
https://doi.org/10.66021/Abstract
Skin cancer is one of the most deadly types of cancer in the world, and it is crucial to diagnose it in the early stages to improve survival rates. Deep learning models have demonstrated high accuracy in skin lesion classification but most of the existing models are lacking of interpretability and clinical trustworthiness. This study introduces a hybrid deep learning system of EfficientNet-B4 and Vision Transformer (ViT) with an attention-guided fusion mechanism to achieve accurate and interpretable skin cancer classification. A total of 10,015 dermoscopic images of seven different lesion classes were evaluated in the HAM10000 dataset. To enhance the model performance, image preprocessing, data augmentation, class balancing using SMOTE, and optimization of weighted loss were used. For greater transparency, Explainable Artificial Intelligence methods such as Grad-CAM, SHAP and LIME were incorporated in the framework. Further, Monte Carlo Dropout was used for predictive uncertainty estimation, and Explanation Intersection over Union (E-IoU) for faithfulness of explanations. The experimental results demonstrated that the proposed framework achieved 89.4% classification accuracy and 0.95 AUC-ROC, which were higher than the baseline CNN and transformer models. Multi-scale Grad-CAM also achieved the best explanation quality and clinician agreement. The results show that applying hybrid deep learning and explainable and uncertainty-aware AI can enhance the classification accuracy and explainability of AI diagnosis for skin cancer.