A novel uncertainty-aware deep learning technique with an application on skin cancer diagnosis

Afshar Shamsi Jokandan, Hamzeh Asgharnezhad, Ziba Bouchani, Khadijeh Jahanian, Morteza Saberi, Xianzhi Wang, Imran Razzak, Roohallah Alizadehsani, Arash Mohammadi, Hamid Alinejad-Rokny

Abstract

In high-stakes medical diagnostics, the overconfidence of deep learning models poses a significant risk to patient safety. This paper introduces a novel uncertainty-aware framework designed to quantify predictive doubt in skin cancer diagnosis. By combining a multi-objective entropy-based loss function with Bayesian Optimization (BO) for hyperparameter tuning, the proposed "MCD+Entropy BO" method ensures that models assign high uncertainty to incorrect predictions. Experimental results on the HAM-10000 dataset demonstrate that this approach achieves superior calibration and uncertainty accuracy compared to traditional Monte Carlo Dropout (MCD) and ensemble techniques, providing a more reliable tool for clinical decision support.

Introduction

Deep Neural Networks (DNNs) have achieved remarkable success in identifying patterns within medical imagery. However, their deterministic nature often leads to overconfident predictions, even when faced with out-of-distribution or ambiguous data. In the context of skin cancer diagnosis, a model misclassifying a malignant lesion as benign with high confidence can have catastrophic consequences. To address this, researchers are developing methods to allow AI to signal when it is uncertain, effectively providing a mechanism for the model to say "I don't know."

Methods

The proposed framework enhances the standard Monte Carlo Dropout (MCD) technique through two primary innovations:

  1. Entropy-Aware Loss Function: A novel loss function was developed that incorporates Predictive Entropy (PE) alongside standard binary cross-entropy. This objective function is designed to minimize entropy for correct classifications while maximizing it for incorrect ones, thereby creating a clear separation between the confidence levels of right and wrong answers.
  2. Bayesian Optimization (BO): Recognizing that uncertainty estimation is highly sensitive to model architecture and dropout rates, the authors employed BO to automatically discover the optimal configuration. This process prioritizes maximizing Uncertainty Accuracy (UA) and minimizing Expected Calibration Error (ECE).
Predictive entropy distribution for correct vs. incorrect predictions.

The core architecture utilizes a pre-trained DenseNet121 for feature extraction, followed by dense layers optimized via the MCD+Entropy BO framework. The goal of the entropy-aware loss is to "push" the distributions of correct (blue) and incorrect (red) predictions apart, as illustrated in the figure above.

Results and Discussion

The model was evaluated using the HAM-10000 dataset, containing over 10,000 dermoscopy images of various skin lesions. The MCD+Entropy BO method demonstrated significant improvements over baseline models across several key metrics:

  • Prediction Accuracy: 85.65% ± 0.18
  • Uncertainty Accuracy (UA): 83.03% ± 0.25 (compared to 70.42% for vanilla MCD)
  • Expected Calibration Error (ECE): 1.93 ± 0.3 (compared to 6.97 for vanilla MCD)
Uncertainty Accuracy (UA) across all six cross-validation folds.

Cross-validation results across six folds confirm that the proposed method consistently maintains higher UA across various thresholds compared to MCD and standard ensembles. This robustness suggests that automated tuning via BO is essential for reliable uncertainty quantification in diverse clinical scenarios. A well-calibrated model ensures that a high confidence score corresponds to a high likelihood of correctness, which is vital for clinical trust.

Conclusion

This research provides a robust framework for making medical AI more transparent and reliable. By explicitly training for uncertainty and automating hyperparameter selection, the MCD+Entropy BO method offers a significant step toward integrating AI into real-time clinical workflows. Future research will focus on expanding this framework to multi-modal datasets and exploring alternative optimization heuristics to further refine diagnostic accuracy and safety.

Summary updated

BibTeX
@article{jokandan2023novel,
  author = {Afshar Shamsi Jokandan and Hamzeh Asgharnezhad and Ziba Bouchani and Khadijeh Jahanian and Morteza Saberi and Xianzhi Wang and Imran Razzak and Roohallah Alizadehsani and Arash Mohammadi and Hamid Alinejad-Rokny},
  title = {{A novel uncertainty-aware deep learning technique with an application on skin cancer diagnosis}},
  journal = {Neural Computing and Applications},
  year = {2023},
  doi = {10.1007/s00521-023-08930-1},
}
Figure