Abstract
Early and accurate detection of melanoma is essential for improving patient outcomes and survival, as delays in diagnosis can be life-threatening. This study presents FairSkinNet, a deep learning framework designed for explainable melanoma detection across diverse skin tones, with an emphasis on uncertainty-aware predictions. FairSkinNet uses dermoscopic and clinical images, along with associated metadata, to improve diagnostic performance while addressing current challenges in skin cancer detection, including dataset imbalance, skin tone bias, model interpretability, and computational cost. Two lightweight convolutional neural networks, MobileNetV2 and EfficientNetB0, were evaluated using five-fold cross-validation. These models were chosen for their efficiency, allowing practical training and deployment without excessive computational resources. Both performed well overall, but EfficientNetB0 achieved higher sensitivity (82.1% ± 6.0%) than MobileNetV2 (75.0% ± 5.1%), making it the preferred backbone for FairSkinNet. High sensitivity is especially important in clinical contexts, where missed melanoma diagnoses can have serious consequences. To improve fairness and robustness, FairSkinNet applies targeted data augmentation and oversampling strategies based on both lesion type and skin tone. This increased melanoma recall for underrepresented groups, particularly darker skin types, while maintaining strong F1-scores and overall accuracy. The framework also integrates uncertainty-aware modeling by flagging low-confidence predictions (probabilities between 0.5–0.7) for expert review, increasing specificity without reducing sensitivity. Fairness evaluation indicated that, although sensitivity remained high across all skin tones, darker skin groups exhibited slightly lower specificity and weighted F1-scores, showing that disparities are still present. Gradient-weighted Class Activation Mapping (Grad-CAM) analysis confirmed that the model primarily focuses on lesion regions but occasionally attends to non-lesion areas, particularly in darker skin cases, highlighting the importance of interpretable results and reducing the “black box” effect of Convolutional Neural Networks (CNNs). In conclusion, FairSkinNet advances melanoma detection by combining lightweight architectures, targeted augmentation, uncertainty-aware filtering, and explainable deep learning. The framework improves diagnostic accuracy and transparency while providing a foundation for fair and clinically deployable AI in dermatology.