Explainable Artificial Intelligence in Medical Imaging: A Case Study on Enhancing Lung Cancer Detection through CT Images


  • Teuku Rizky Noviandy Interdisciplinary Innovation Research Unit, Graha Primera Saintifika, Aceh Besar 23771, Indonesia
  • Aga Maulana Department of Informatics, Faculty of Mathematics and Natural Sciences, Universitas Syiah Kuala, Banda Aceh 23111, Indonesia
  • Teuku Zulfikar Department of Pulmonology and Respiratory Medicines, Faculty of Syiah Kuala, Universitas Syiah Kuala/Zainoel Abidin Hospital, Banda Aceh, Indonesia
  • Asep Rusyana Department of Statistics, Faculty of Mathematics and Natural Sciences, Universitas Syiah Kuala, Banda Aceh 23111, Indonesia
  • Seyi Samson Enitan Department of Medical Laboratory Science, Babcock University, Ilishan-Remo, Nigeria
  • Rinaldi Idroes School of Mathematics and Applied Sciences, Universitas Syiah Kuala, Banda Aceh 23111, Indonesia




Deep learning, ResNet50, Grad-CAM, Computer-aided detection, XAI


This study tackles the pressing challenge of lung cancer detection, the foremost cause of cancer-related mortality worldwide, hindered by late detection and diagnostic limitations. Aiming to improve early detection rates and diagnostic reliability, we propose an approach integrating Deep Convolutional Neural Networks (DCNN) with Explainable Artificial Intelligence (XAI) techniques, specifically focusing on the Residual Network (ResNet) architecture and Gradient-weighted Class Activation Mapping (Grad-CAM). Utilizing a dataset of 1,000 CT scans, categorized into normal, non-cancerous, and three types of lung cancer images, we adapted the ResNet50 model through transfer learning and fine-tuning for enhanced specificity in lung cancer subtype detection. Our methodology demonstrated the modified ResNet50 model's effectiveness, significantly outperforming the original architecture in accuracy (91.11%), precision (91.66%), sensitivity (91.11%), specificity (96.63%), and F1-score (91.10%). The inclusion of Grad-CAM provided insightful visual explanations for the model's predictions, fostering transparency and trust in computer-assisted diagnostics. The study highlights the potential of combining DCNN with XAI to advance lung cancer detection, suggesting future research should expand dataset diversity and explore multimodal data integration for broader applicability and improved diagnostic capabilities.


Download data is not yet available.


  1. Barta, J. A., Powell, C. A., and Wisnivesky, J. P. (2019). Global Epidemiology of Lung Cancer, Annals of Global Health, Vol. 85, No. 1. doi:10.5334/aogh.2419.
  2. Schabath, M. B., and Cote, M. L. (2019). Cancer Progress and Priorities: Lung Cancer, Cancer Epidemiology, Biomarkers & Prevention, Vol. 28, No. 10, 1563–1579. doi:10.1158/1055-9965.EPI-19-0221.
  3. Leiter, A., Veluswamy, R. R., and Wisnivesky, J. P. (2023). The Global Burden of Lung Cancer: Current Status and Future Trends, Nature Reviews Clinical Oncology, Vol. 20, No. 9, 624–639. doi:10.1038/s41571-023-00798-3.
  4. Lundin, A., and Driscoll, B. (2013). Lung Cancer Stem Cells: Progress and Prospects, Cancer Letters, Vol. 338, No. 1, 89–93. doi:10.1016/j.canlet.2012.08.014.
  5. Heuvers, M. E., Hegmans, J. P., Stricker, B. H., and Aerts, J. G. (2012). Improving Lung Cancer Survival; Time to Move On, BMC Pulmonary Medicine, Vol. 12, No. 1, 77. doi:10.1186/1471-2466-12-77.
  6. Chaitanya Thandra, K., Barsouk, A., Saginala, K., Sukumar Aluru, J., and Barsouk, A. (2021). Epidemiology of Lung Cancer, Współczesna Onkologia, Vol. 25, No. 1, 45–52. doi:10.5114/wo.2021.103829.
  7. Cani, M., Turco, F., Butticè, S., Vogl, U. M., Buttigliero, C., Novello, S., and Capelletto, E. (2023). How Does Environmental and Occupational Exposure Contribute to Carcinogenesis in Genitourinary and Lung Cancers?, Cancers, Vol. 15, No. 10, 2836. doi:10.3390/cancers15102836.
  8. Xue, Y., Wang, L., Zhang, Y., Zhao, Y., and Liu, Y. (2022). Air Pollution: A Culprit of Lung Cancer, Journal of Hazardous Materials, Vol. 434, 128937. doi:10.1016/j.jhazmat.2022.128937.
  9. S Cheng, E., Weber, M., Steinberg, J., and Qin Yu, X. (2021). Lung Cancer Risk in Never-Smokers: An Overview of Environmental and Genetic Factors, Chinese Journal of Cancer Research, Vol. 33, No. 5, 548–562. doi:10.21147/j.issn.1000-9604.2021.05.02.
  10. Araujo, L. H., Horn, L., Merritt, R. E., Shilo, K., Xu-Welliver, M., and Carbone, D. P. (2020). Cancer of the Lung, Abeloff’s Clinical Oncology, Elsevier, 1108-1158.e16. doi:10.1016/B978-0-323-47674-4.00069-4.
  11. Padinharayil, H., Varghese, J., John, M. C., Rajanikant, G. K., Wilson, C. M., Al-Yozbaki, M., Renu, K., Dewanjee, S., Sanyal, R., Dey, A., Mukherjee, A. G., Wanjari, U. R., Gopalakrishnan, A. V., and George, A. (2023). Non-Small Cell Lung Carcinoma (Nsclc): Implications on Molecular Pathology and Advances in Early Diagnostics and Therapeutics, Genes & Diseases, Vol. 10, No. 3, 960–989. doi:10.1016/j.gendis.2022.07.023.
  12. Qu, Y., Cheng, B., Shao, N., Jia, Y., Song, Q., Tan, B., and Wang, J. (2020). Prognostic Value of Immune-Related Genes in the Tumor Microenvironment of Lung Adenocarcinoma and Lung Squamous Cell Carcinoma, Aging, Vol. 12, No. 6, 4757–4777. doi:10.18632/aging.102871.
  13. Corrales, L., Rosell, R., Cardona, A. F., Martín, C., Zatarain-Barrón, Z. L., and Arrieta, O. (2020). Lung Cancer in Never Smokers: The Role of Different Risk Factors Other Than Tobacco Smoking, Critical Reviews in Oncology/Hematology, Vol. 148, 102895. doi:10.1016/j.critrevonc.2020.102895.
  14. Wang, B.-Y., Huang, J.-Y., Chen, H.-C., Lin, C.-H., Lin, S.-H., Hung, W.-H., and Cheng, Y.-F. (2020). The Comparison between Adenocarcinoma and Squamous Cell Carcinoma in Lung Cancer Patients, Journal of Cancer Research and Clinical Oncology, Vol. 146, No. 1, 43–52. doi:10.1007/s00432-019-03079-8.
  15. Travis, W. D. (2020). Lung Cancer Pathology, Clinics in Chest Medicine, Vol. 41, No. 1, 67–85. doi:10.1016/j.ccm.2019.11.001.
  16. Demirci, N. Y. (2023). Diagnostic Workup for Lung Cancer, C. Cingi; A. Yorgancıoğlu; N. Bayar Muluk; A. A. Cruz (Eds.), , Springer International Publishing, Cham, 1–16. doi:10.1007/978-3-031-22483-6_62-1.
  17. Hyldgaard, C., Trolle, C., Harders, S. M. W., Engberg, H., Rasmussen, T. R., and Møller, H. (2022). Increased Use of Diagnostic Ct Imaging Increases the Detection of Stage IA Lung Cancer: Pathways and Patient Characteristics, BMC Cancer, Vol. 22, No. 1, 464. doi:10.1186/s12885-022-09585-2.
  18. Ciello, A. del, Franchi, P., Contegiacomo, A., Cicchetti, G., Bonomo, L., and Larici, A. R. (2017). Missed Lung Cancer: When, Where, and Why?, Diagnostic and Interventional Radiology, Vol. 23, No. 2, 118–126. doi:10.5152/dir.2016.16187.
  19. Bradley, S. H., Abraham, S., Callister, M. E., Grice, A., Hamilton, W. T., Lopez, R. R., Shinkins, B., and Neal, R. D. (2019). Sensitivity of Chest X-Ray for Detecting Lung Cancer in People Presenting with Symptoms: A Systematic Review, British Journal of General Practice, Vol. 69, No. 689, e827–e835. doi:10.3399/bjgp19X706853.
  20. Loverdos, K., Fotiadis, A., Kontogianni, C., Iliopoulou, M., and Gaga, M. (2019). Lung Nodules: A Comprehensive Review on Current Approach and Management, Annals of Thoracic Medicine, Vol. 14, No. 4, 226. doi:10.4103/atm.ATM_110_19.
  21. Noviandy, T. R., Nainggolan, S. I., Raihan, R., Firmansyah, I., and Idroes, R. (2023). Maternal Health Risk Detection Using Light Gradient Boosting Machine Approach, Infolitika Journal of Data Science, Vol. 1, No. 2, 48–55. doi:10.60084/ijds.v1i2.123.
  22. Maulana, A., Faisal, F. R., Noviandy, T. R., Rizkia, T., Idroes, G. M., Tallei, T. E., El-Shazly, M., and Idroes, R. (2023). Machine Learning Approach for Diabetes Detection Using Fine-Tuned XGBoost Algorithm, Infolitika Journal of Data Science, Vol. 1, No. 1, 1–7. doi:10.60084/ijds.v1i1.72.
  23. Suhendra, R., Suryadi, S., Husdayanti, N., Maulana, A., and Rizky, T. (2023). Evaluation of Gradient Boosted Classifier in Atopic Dermatitis Severity Score Classification, Heca Journal of Applied Sciences, Vol. 1, No. 2, 54–61. doi:10.60084/hjas.v1i2.85.
  24. Tran, K. A., Kondrashova, O., Bradley, A., Williams, E. D., Pearson, J. V., and Waddell, N. (2021). Deep Learning in Cancer Diagnosis, Prognosis and Treatment Selection, Genome Medicine, Vol. 13, No. 1, 152. doi:10.1186/s13073-021-00968-x.
  25. Bakator, M., and Radosav, D. (2018). Deep Learning and Medical Diagnosis: A Review of Literature, Multimodal Technologies and Interaction, Vol. 2, No. 3, 47. doi:10.3390/mti2030047.
  26. Liu, X., Wang, H., Li, Z., and Qin, L. (2021). Deep Learning in Ecg Diagnosis: A Review, Knowledge-Based Systems, Vol. 227, 107187. doi:10.1016/j.knosys.2021.107187.
  27. Maulana, A., Noviandy, T. R., Suhendra, R., Earlia, N., Bulqiah, M., Idroes, G. M., Niode, N. J., Sofyan, H., Subianto, M., and Idroes, R. (2023). Evaluation of Atopic Dermatitis Severity Using Artificial Intelligence, Narra J, Vol. 3, No. 3, e511. doi:10.52225/narra.v3i3.511.
  28. Talukder, M. A., Islam, M. M., Uddin, M. A., Akhter, A., Pramanik, M. A. J., Aryal, S., Almoyad, M. A. A., Hasan, K. F., and Moni, M. A. (2023). An Efficient Deep Learning Model to Categorize Brain Tumor Using Reconstruction and Fine-Tuning. doi:10.48550/arXiv.2305.12844.
  29. Cellina, M., Cacioppa, L. M., Cè, M., Chiarpenello, V., Costa, M., Vincenzo, Z., Pais, D., Bausano, M. V., Rossini, N., Bruno, A., and Floridi, C. (2023). Artificial Intelligence in Lung Cancer Screening: The Future Is Now, Cancers, Vol. 15, No. 17, 4344. doi:10.3390/cancers15174344.
  30. Amann, J., Blasimme, A., Vayena, E., Frey, D., and Madai, V. I. (2020). Explainability for Artificial Intelligence in Healthcare: A Multidisciplinary Perspective, BMC Medical Informatics and Decision Making, Vol. 20, No. 1, 310. doi:10.1186/s12911-020-01332-6.
  31. Noviandy, T. R., Maulana, A., Idroes, G. M., Suhendra, R., Adam, M., Rusyana, A., and Sofyan, H. (2023). Deep Learning-Based Bitcoin Price Forecasting Using Neural Prophet, Ekonomikalia Journal of Economics, Vol. 1, No. 1, 19–25. doi:10.60084/eje.v1i1.51.
  32. Holzinger, A., Biemann, C., Pattichis, C. S., and Kell, D. B. (2017). What Do We Need to Build Explainable AI Systems for the Medical Domain?, ArXiv Preprint ArXiv:1712.09923.
  33. Ali, S., Akhlaq, F., Imran, A. S., Kastrati, Z., Daudpota, S. M., and Moosa, M. (2023). The Enlightening Role of Explainable Artificial Intelligence in Medical & Healthcare Domains: A Systematic Literature Review, Computers in Biology and Medicine, Vol. 166, 107555. doi:10.1016/j.compbiomed.2023.107555.
  34. Hany, M. (2020). Chest CT-Scan Images Dataset, from https://www.kaggle.com/datasets/mohamedhanyyy/chest-ctscan-images/data, accessed 27-11-2023.
  35. He, K., Zhang, X., Ren, S., and Sun, J. (2015). Deep Residual Learning for Image Recognition, Computer Vision and Pattern Recognition.
  36. Idroes, G. M., Maulana, A., Suhendra, R., Lala, A., Karma, T., Kusumo, F., Hewindati, Y. T., and Noviandy, T. R. (2023). TeutongNet: A Fine-Tuned Deep Learning Model for Improved Forest Fire Detection, Leuser Journal of Environmental Studies, Vol. 1, No. 1, 1–8. doi:10.60084/ljes.v1i1.42.
  37. Kingma, D. P., and Ba, J. (2014). Adam: A method for stochastic optimization, ArXiv Preprint ArXiv:1412.6980.
  38. Vasuki, P., Kanimozhi, J., and Devi, M. B. (2017). A Survey on Image Preprocessing Techniques for Diverse Fields of Medical Imagery, 2017 IEEE International Conference on Electrical, Instrumentation and Communication Engineering (ICEICE), IEEE, 1–6. doi:10.1109/ICEICE.2017.8192443.
  39. Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. (2009). Imagenet: A Large-Scale Hierarchical Image Database, 2009 IEEE Conference on Computer Vision and Pattern Recognition, Ieee, 248–255.
  40. Idroes, G. M., Noviandy, T. R., Maulana, A., Zahriah, Z., Suhendrayatna, S., Suhartono, E., Khairan, K., Kusumo, F., Helwani, Z., and Abd Rahman, S. (2023). Urban Air Quality Classification Using Machine Learning Approach to Enhance Environmental Monitoring, Leuser Journal of Environmental Studies, Vol. 1, No. 2, 62–68. doi:10.60084/ljes.v1i2.99.
  41. Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., and Batra, D. (2017). Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization, 2017 IEEE International Conference on Computer Vision (ICCV), IEEE, 618–626. doi:10.1109/ICCV.2017.74.
  42. Noviandy, T. R., Maulana, A., Khowarizmi, F., and Muchtar, K. (2023). Effect of CLAHE-based Enhancement on Bean Leaf Disease Classification through Explainable AI, 2023 IEEE 12th Global Conference on Consumer Electronics (GCCE), IEEE, 515–516. doi:10.1109/GCCE59613.2023.10315394.
  43. Samek, W., Wiegand, T., and Müller, K.-R. (2017). Explainable Artificial Intelligence: Understanding, Visualizing and Interpreting Deep Learning Models, ArXiv Preprint ArXiv:1708.08296.
  44. Willemink, M. J., Koszek, W. A., Hardell, C., Wu, J., Fleischmann, D., Harvey, H., Folio, L. R., Summers, R. M., Rubin, D. L., and Lungren, M. P. (2020). Preparing Medical Imaging Data for Machine Learning, Radiology, Vol. 295, No. 1, 4–15. doi:10.1148/radiol.2020192224.




How to Cite

Noviandy, T. R., Maulana, A., Zulfikar, T., Rusyana, A., Enitan, S. S., & Idroes, R. (2024). Explainable Artificial Intelligence in Medical Imaging: A Case Study on Enhancing Lung Cancer Detection through CT Images. Indonesian Journal of Case Reports, 2(1), 6–14. https://doi.org/10.60084/ijcr.v2i1.150