Explainable Deep Learning for Diabetic Retinopathy Detection: A Quantitatively Validated Framework

Authors

  • Tinashe Ngwazi National University of Science and Technology
  • Belinda Ndlovu National University of Science and Technology
  • Kudakwashe Maguraushe University of South Africa

DOI:

https://doi.org/10.30871/jaic.v10i3.12687

Keywords:

Diabetic Retinopathy Detection, Explainable Artificial Intelligence (XAI), Explainable Deep Learning, Medical Image Classification, Convolutional Neural Networks (CNNs), MobileNetV2, Model Interpretability, Reproducible Machine Learning, Quantitative Explainability, Clinical Decision Support Systems

Abstract

Diabetic retinopathy (DR) is a leading cause of preventable blindness, where early and accurate detection is critical for effective intervention. While deep learning models have demonstrated strong performance in DR classification, their limited interpretability and inconsistent evaluation practices hinder clinical trust and deployment. This study proposes an explainable deep learning framework for DR detection based on MobileNetV2, complemented by Integrated Gradients for feature attribution. A curated dataset of 4,464 retinal images was constructed from publicly available sources through systematic preprocessing, including quality filtering, deduplication, and class balancing across five DR stages. To ensure robust evaluation, a multi-level validation strategy was employed, incorporating stratified train–validation–test splits and k-fold cross-validation. The proposed framework achieved 87.0% accuracy and an F1-score of 0.868, outperforming baseline models including EfficientNet-B0, DenseNet121, and VGG16. Beyond predictive performance, explainability was quantitatively evaluated using deletion and insertion metrics, demonstrating that Integrated Gradients provides more faithful feature attribution compared to Grad-CAM and LIME. Error analysis further reveals that misclassifications are concentrated between adjacent DR stages, reflecting the inherent difficulty of fine-grained disease progression modelling. The findings highlight that combining rigorous validation with quantitative explainability evaluation can improve the reliability and transparency of deep learning models for medical imaging. While results are promising, the framework is validated on publicly available datasets and requires further external clinical validation before real-world deployment.

Downloads

Download data is not yet available.

References

[1] D. Bruen, C. Delaney, L. Florea, and D. Diamond, “Glucose sensing for diabetes monitoring: Recent developments,” Sensors (Switzerland), vol. 17, no. 8. MDPI AG, Aug. 2017, doi: 10.3390/s17081866.

[2] D. S. Fong et al., “Retinopathy in Diabetes,” Diabetes Care, vol. 27, no. SUPPL. 1, 2004, doi: 10.2337/diacare.27.2007.s84.

[3] R. J. Burns, K. Ford, G. C. Forget, K. Fardfini-Ruginets, and R. Ward, “Courses of depressive symptoms and diabetes incidence among middle-aged and older adults: A prospective study,” PLoS One, vol. 20, no. 4 April, pp. 1–10, 2025, doi: 10.1371/journal.pone.0321712.

[4] N. Laiteerapong et al., “Correlates of quality of life in older adults with diabetes: The diabetes & aging study,” Diabetes Care, vol. 34, no. 8, pp. 1749–1753, 2011, doi: 10.2337/dc10-2424.

[5] M. Kropp et al., “Diabetic retinopathy as the leading cause of blindness and early predictor of cascading complications—risks and mitigation,” EPMA J., vol. 14, no. 1, pp. 21–42, 2023, doi: 10.1007/s13167-023-00314-8.

[6] P. Vashist, S. Singh, N. Gupta, and R. Saxena, “Role of early screening for diabetic retinopathy in patients with diabetes mellitus: An overview,” Indian J. Community Med., vol. 36, no. 4, pp. 247–252, 2011, doi: 10.4103/0970-0218.91324.

[7] R. K. Chopra, “Automating the eye examination using optical coherence tomography,” no. January, 2022.

[8] J. Grauslund, “Diabetic retinopathy screening in the emerging era of artificial intelligence,” Diabetologia, vol. 65, no. 9, pp. 1415–1423, 2022, doi: 10.1007/s00125-022-05727-0.

[9] S. Natarajan, A. Jain, R. Krishnan, A. Rogye, and S. Sivaprasad, “Diagnostic Accuracy of Community-Based Diabetic Retinopathy Screening with an Offline Artificial Intelligence System on a Smartphone,” JAMA Ophthalmol., vol. 137, no. 10, pp. 1182–1188, 2019, doi: 10.1001/jamaophthalmol.2019.2923.

[10] B. Ndlovu, “A Personalised Generative AI Model for Diabetes Drug Discovery: Integrating Molecular and Clinical Data Using Variational Autoencoders (VAE),” Indones. J. Comput. Sci., vol. 15, no. 1, pp. 79–100, 2026.

[11] J. H. Wu, T. Y. A. Liu, W. T. Hsu, J. H. C. Ho, and C. C. Lee, “Performance and limitation of machine learning algorithms for diabetic retinopathy screening: Meta-analysis,” Journal of Medical Internet Research, vol. 23, no. 7. JMIR Publications Inc., 2021, doi: 10.2196/23863.

[12] M. L. Ferm, D. J. DeSalvo, L. M. Prichett, J. K. Sickler, R. M. Wolf, and R. Channa, “Clinical and Demographic Factors Associated With Diabetic Retinopathy Among Young Patients With Diabetes,” JAMA Netw. Open, vol. 4, no. 9, p. e2126126, 2021, doi: 10.1001/jamanetworkopen.2021.26126.

[13] A. Bilal et al., “Improved Support Vector Machine based on CNN-SVD for vision-threatening diabetic retinopathy detection and classification,” PLoS One, vol. 19, no. 1 January, 2024, doi: 10.1371/journal.pone.0295951.

[14] M. M. I. Abdalla and J. Mohanraj, “Revolutionising diabetic retinopathy screening and management: The role of artificial intelligence and machine learning.,” World journal of clinical cases, vol. 13, no. 5. United States, p. 101306, Feb. 2025, doi: 10.12998/wjcc.v13.i5.101306.

[15] J. Wojtusiak, “Reproducibility, transparency and evaluation of machine learning in health applications,” Heal. 2021 - 14th Int. Conf. Heal. Informatics; Part 14th Int. Jt. Conf. Biomed. Eng. Syst. Technol. BIOSTEC 2021, vol. 5, no. Biostec, pp. 685–692, 2021, doi: 10.5220/0010348306850692.

[16] W. Samek, T. Wiegand, and K.-R. Müller, “Explainable Artificial Intelligence: Understanding, Visualising and Interpreting Deep Learning Models,” 2017.

[17] E. Standl, K. Khunti, T. B. Hansen, and O. Schnell, “The global epidemics of diabetes in the 21st century: Current situation and perspectives,” Eur. J. Prev. Cardiol., vol. 26, no. 2_suppl, pp. 7–14, 2019, doi: 10.1177/2047487319881021.

[18] B. Mutunhu, B. Chipangura, and H. Twinomurinzi, “Internet of Things in the Monitoring of Diabetes,” Int. J. Heal. Syst. Transl. Med., vol. 2, no. 1, pp. 1–20, 2022, doi: 10.4018/ijhstm.300336.

[19] B. M. Ndlovu, B. Chipangura, and S. Singh, “The readiness to use quantified self-technology : A case of diabetic patients from a hospital in Bulawayo , Zimbabwe,” Digit. Heal., vol. 11, pp. 1–13, 2025, doi: 10.1177/20552076251376286.

[20] B. Mutunhu, B. Chipangura, and S. Singh, “Towards a quantified-self technology conceptual framework for monitoring diabetes,” South African J. Sci. Technol., vol. 43, no. 1, pp. 69–84, 2024, doi: 10.36303/SATNT.2024.43.1.970.

[21] T. E. Tan and T. Y. Wong, “Diabetic retinopathy: Looking forward to 2030,” Front. Endocrinol. (Lausanne)., vol. 13, no. January, pp. 1–8, 2023, doi: 10.3389/fendo.2022.1077669.

[22] R. Simó and C. Hernández, “What else can we do to prevent diabetic retinopathy?,” Diabetologia, vol. 66, no. 9, pp. 1614–1621, Sep. 2023, doi: 10.1007/s00125-023-05940-5.

[23] R. Raman, L. Gella, S. Srinivasan, and T. Sharma, “Diabetic retinopathy: An epidemic at home and around the world,” Indian J. Ophthalmol., vol. 64, no. 1, pp. 69–75, 2016, doi: 10.4103/0301-4738.178150.

[24] P. I. Burgess, G. Msukwa, and N. A. V. Beare, “Diabetic retinopathy in sub-Saharan Africa: Meeting the challenges of an emerging epidemic,” BMC Med., vol. 11, no. 1, 2013, doi: 10.1186/1741-7015-11-157.

[25] S. Poore, A. Foster, M. Zondervan, and K. Blanchet, “Planning and developing services for diabetic retinopathy in Sub-Saharan Africa,” Int. J. Heal. Policy Manag., vol. 4, no. 1, pp. 19–28, 2015, doi: 10.15171/ijhpm.2015.04.

[26] D. M. Mukona, P. Dzingira, M. Mhlanga, and M. Zvinavashe, “Uptake of Screening for Diabetic Retinopathy and Associated Factors among Adults with Diabetes Mellitus Aged 18-65 Years: A Descriptive Cross Sectional Study,” Eur. J. Med. Heal. Sci., vol. 2, no. 4, 2020, doi: 10.24018/ejmed.2020.2.4.247.

[27] M. W. Ulbig and A. N. Kollias, “Diabetische Retinopathie: Frühzeitige Diagnostik und Effiziente Therapie,” Dtsch. Arztebl., vol. 107, no. 5, pp. 75–84, 2010, doi: 10.3238/arztebl.2010.0075.

[28] V. Bellemo et al., “Artificial intelligence using deep learning to screen for referable and vision-threatening diabetic retinopathy in Africa: a clinical validation study,” Lancet Digit. Heal., vol. 1, no. 1, pp. e35–e44, 2019, doi: 10.1016/S2589-7500(19)30004-4.

[29] M. Obayya et al., “Explainable Artificial Intelligence Enabled TeleOphthalmology for Diabetic Retinopathy Grading and Classification,” Appl. Sci., vol. 12, no. 17, 2022, doi: 10.3390/app12178749.

[30] P. Das and R. Nayak, “Explanable CAD System for Early Detection of Diabetic Eye Diseases: A Review,” Lect. Notes Electr. Eng., vol. 1066 LNEE, pp. 645–655, 2023, doi: 10.1007/978-981-99-4634-1_50.

[31] S. Hadebe, B. Ndlovu, and K. Maguraushe, “Managing Diabetes Using Machine Learning and Digital Twins,” Indones. J. Innov. Appl. Sci., vol. 5, no. 2, pp. 145–162, 2025, doi: 10.47540/ijias.v5i2.1981.

[32] G. Rajarajeshwari and G. Chemmalar Selvi, “Application of Artificial Intelligence for Classification, Segmentation, Early Detection, Early Diagnosis, and Grading of Diabetic Retinopathy from Fundus Retinal Images: A Comprehensive Review,” IEEE Access, vol. 12, no. November, pp. 172499–172536, 2024, doi: 10.1109/ACCESS.2024.3494840.

[33] D. Das, S. K. Biswas, and S. Bandyopadhyay, “A critical review on diagnosis of diabetic retinopathy using machine learning and deep learning,” Multimed. Tools Appl., vol. 81, no. 18, pp. 25613–25655, 2022, doi: 10.1007/s11042-022-12642-4.

[34] M. Shaban et al., “A convolutional neural network for the screening and staging of diabetic retinopathy,” PLoS One, vol. 15, no. 6 June, pp. 1–13, 2020, doi: 10.1371/journal.pone.0233514.

[35] A. Deshpande and J. Pardhi, “Automated Detection of Diabetic Retinopathy using VGG-16 Architecture,” Int. Res. J. Eng. Technol., vol. 08, no. 03, pp. 2936–2940, 2021.

[36] M. Vijayan and V. S, “A Regression-Based Approach to Diabetic Retinopathy Diagnosis Using Efficientnet,” Diagnostics, vol. 13, no. 4, 2023, doi: 10.3390/diagnostics13040774.

[37] M. Al-Smadi, M. Hammad, Q. B. Baker, and S. A. Al-Zboon, “A transfer learning with deep neural network approach for diabetic retinopathy classification,” Int. J. Electr. Comput. Eng., vol. 11, no. 4, pp. 3492–3501, 2021, doi: 10.11591/ijece.v11i4.pp3492-3501.

[38] W. Zhang et al., “Automated identification and grading system of diabetic retinopathy using deep neural networks,” Knowledge-Based Syst., vol. 175, pp. 12–25, 2019, doi: 10.1016/j.knosys.2019.03.016.

[39] D. Le et al., “Transfer learning for automated octa detection of diabetic retinopathy,” Transl. Vis. Sci. Technol., vol. 9, no. 2, pp. 1–9, 2020, doi: 10.1167/tvst.9.2.35.

[40] M. T. Hagos and S. Kant, “Transfer Learning based Detection of Diabetic Retinopathy from Small Dataset,” 2019.

[41] Z. M. Altukhi, S. Pradhan, and N. Aljohani, “A Systematic Literature Review of the Latest Advancements in XAI,” Technologies, vol. 13, no. 3, 2025, doi: 10.3390/technologies13030093.

[42] N. Ndlovu and B. Ndlovu, “Explainable Artificial Intelligence in Multimodal Malaria Prediction : A Systematic Review and Roadmap Integrating Climate Change , Parasite Genomics , and Public Health Decision Support,” J. Appl. Informatics Comput., vol. 10, no. 2, 2026, doi: 10.30871/jaic.v10i2.12347.

[43] A. Ikram and A. Imran, “ResViT FusionNet Model: An explainable AI-driven approach for automated grading of diabetic retinopathy in retinal images,” Comput. Biol. Med., vol. 186, 2025, doi: 10.1016/j.compbiomed.2025.109656.

[44] F. H. Yagin, C. Colak, A. Algarni, Y. Gormez, E. Guldogan, and L. P. Ardigò, “Hybrid Explainable Artificial Intelligence Models for Targeted Metabolomics Analysis of Diabetic Retinopathy,” Diagnostics, vol. 14, no. 13, 2024, doi: 10.3390/diagnostics14131364.

[45] R. Romero-Oraá, M. Herrero-Tudela, M. I. López, R. Hornero, and M. García, “Attention-based deep learning framework for automatic fundus image processing to aid in diabetic retinopathy grading,” Comput. Methods Programs Biomed., vol. 249, 2024, doi: 10.1016/j.cmpb.2024.108160.

[46] O. Mabikwa, B. Ndlovu, and K. Maguraushe, “A Comparative Analysis of Machine Learning Techniques and Explainable AI on Voice Biomarkers for Effective Parkinson ’ s Disease Prediction,” vol. 7, no. 3, pp. 2196–2228, 2025, doi: 10.51519/journalisi.v7i3.1172.

[47] B. Ndlovu, K. Maguraushe, and O. Mabikwa, “Machine Learning and Explainable AI for Parkinson’s Disease Prediction: A Systematic Review,” Indones. J. Comput. Sci., vol. 14, no. 2, 2025, doi: https://doi.org/10.33022/ijcs.v14i2.4837.

[48] U. P. S. Parmar et al., “Artificial Intelligence (AI) for Early Diagnosis of Retinal Diseases,” Medicina (Lithuania), vol. 60, no. 4. Multidisciplinary Digital Publishing Institute (MDPI), Apr. 2024, doi: 10.3390/medicina60040527.

[49] S. S. Sibanda and B. Ndlovu, “Explainable Transformer and Machine Learning Models in Predicting Tuberculosis Treatment Outcomes . A Systematic Review,” J. Appl. Informatics Comput., vol. 10, no. 1, pp. 150–164, 2026, doi: 10.30871/jaic.v10i1.11846.

[50] A. M. Antoniadi et al., “Current challenges and future opportunities for xai in machine learning-based clinical decision support systems: A systematic review,” Appl. Sci., vol. 11, no. 11, 2021, doi: 10.3390/app11115088.

[51] A. Das and P. Rad, “Opportunities and Challenges in Explainable Artificial Intelligence (XAI): A Survey,” Jun. 2020.

[52] X. Wang, W. Wang, H. Ren, X. Li, and Y. Wen, “Prediction and analysis of risk factors for diabetic retinopathy based on machine learning and interpretable models,” Heliyon, vol. 10, no. 9, pp. e29497–e29497, 2024, doi: 10.1016/J.HELIYON.2024.E29497.

[53] O. T. Chikumo and B. Ndlovu, “Transformer-based Models for Cardiovascular Disease Predictions from Electronic Health Records : A Systematic Review,” J. Appl. Informatics Comput., vol. 10, no. 1, 2026, doi: 10.30871/jaic.v10i1.11899.

Downloads

Published

2026-06-12

How to Cite

[1]
T. Ngwazi, B. Ndlovu, and K. Maguraushe, “Explainable Deep Learning for Diabetic Retinopathy Detection: A Quantitatively Validated Framework”, JAIC, vol. 10, no. 3, pp. 2534–2545, Jun. 2026.

Most read articles by the same author(s)

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.