Explainable Deep Learning with Lightweight CNNs for Tuberculosis Classification

Authors

  • Teuku Rizky Noviandy Department of Information Systems, Faculty of Engineering, Universitas Abulyatama, Aceh Besar 23372, Indonesia
  • Ghazi Mauer Idroes Department of Occupational Health and Safety, Faculty of Health Sciences, Universitas Abulyatama, Aceh Besar 23372, Indonesia
  • Teuku Zulfikar Department of Pulmonology and Respiratory Medicine, Faculty of Syiah Kuala, Universitas Syiah Kuala/Zainoel Abidin Hospital, Banda Aceh, Indonesia
  • Rinaldi Idroes School of Mathematics and Applied Sciences, Universitas Syiah Kuala, Banda Aceh 23111, Indonesia

DOI:

https://doi.org/10.60084/ijds.v3i1.305

Keywords:

Chest radiography, Medical image analysis, Model interpretability, Resource-limited settings, Deep feature extraction

Abstract

Tuberculosis (TB) remains a major global health threat, particularly in low-resource settings where timely diagnosis is critical yet often limited by the lack of radiological expertise. Chest X-rays (CXRs) are widely used for TB screening, but manual interpretation is prone to errors and variability. While deep learning has shown promise in automating CXR analysis, most existing models are computationally intensive and lack interpretability, limiting their deployment in real-world clinical environments. To address this gap, we evaluated three lightweight and explainable CNN architectures, ShuffleNetV2, SqueezeNet 1.1, and MobileNetV3, for binary TB classification using a locally sourced dataset of 3,008 CXR images. Using transfer learning and Grad-CAM for visual explanation, we show that MobileNetV3 and ShuffleNetV2 achieved perfect test performance with 100% accuracy, sensitivity, specificity, precision, and F1-score, along with AUC scores of 1.00 and inference times of 94.66 and 103.63 seconds, respectively. SqueezeNet performed moderately, with a lower F1-score of 82.98% and several misclassifications. These results demonstrate that lightweight CNNs can deliver high diagnostic accuracy and transparency, supporting their use in scalable, AI-assisted TB screening systems for underserved healthcare settings.

Downloads

Download data is not yet available.

References

  1. World Health Organization (WHO). (2025). Tuberculosis, World Health Organization, from https://www.who.int/news-room/fact-sheets/detail/tuberculosis, accessed 20-3-2025.
  2. Yousif, D., Mesilhy, R., Aly, R., Hegazi, S., Yousif, Z., Cyprian, F. S., and Abdallah, A. M. (2024). Innovations in Tuberculosis Disease Screening, Surveillance, Prevention, and Control of Infectious Diseases, Springer Nature Switzerland, Cham, 97–113. doi:10.1007/978-3-031-59967-5_5.
  3. Karera, A., Engel-Hills, P., and Davidson, F. (2024). Radiology Image Interpretation Services in a Low-Resource Setting: Medical Doctors’ Experiences and the Potential Role of Radiographers, Radiography, Vol. 30, No. 2, 560–566. doi:10.1016/j.radi.2024.01.009.
  4. Brady, A. P. (2017). Error and Discrepancy in Radiology: Inevitable or Avoidable?, Insights into Imaging, Vol. 8, No. 1, 171–182. doi:10.1007/s13244-016-0534-1.
  5. Suganyadevi, S., Seethalakshmi, V., and Balasamy, K. (2022). A Review on Deep Learning in Medical Image Analysis, International Journal of Multimedia Information Retrieval, Vol. 11, No. 1, 19–38. doi:10.1007/s13735-021-00218-1.
  6. Noviandy, T. R., Maulana, A., Zulfikar, T., Rusyana, A., Enitan, S. S., and 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, Vol. 2, No. 1, 6–14. doi:10.60084/ijcr.v2i1.150.
  7. Al-qaness, M. A. A., Zhu, J., AL-Alimi, D., Dahou, A., Alsamhi, S. H., Abd Elaziz, M., and Ewees, A. A. (2024). Chest X-Ray Images for Lung Disease Detection Using Deep Learning Techniques: A Comprehensive Survey, Archives of Computational Methods in Engineering, Vol. 31, No. 6, 3267–3301. doi:10.1007/s11831-024-10081-y.
  8. Yao, S., Chen, Y., Tian, X., and Jiang, R. (2021). Pneumonia Detection Using an Improved Algorithm Based on Faster R-CNN, Computational and Mathematical Methods in Medicine, Vol. 2021, 1–13. doi:10.1155/2021/8854892.
  9. Mahmood, S. A., and Ahmed, H. A. (2022). An Improved CNN-Based Architecture for Automatic Lung Nodule Classification, Medical & Biological Engineering & Computing, Vol. 60, No. 7, 1977–1986. doi:10.1007/s11517-022-02578-0.
  10. Alawi, A. E. B., Al-basser, A., Sallam, A., Al-sabaeei, A., and Al-khateeb, H. (2021). Convolutional Neural Networks Model for Screening Tuberculosis Disease, 2021 International Conference of Technology, Science and Administration (ICTSA), IEEE, 1–5. doi:10.1109/ICTSA52017.2021.9406520.
  11. Al-Jabbar, M., Alshahrani, M., Senan, E. M., and Ahmed, I. A. (2023). Analyzing Histological Images Using Hybrid Techniques for Early Detection of Multi-Class Breast Cancer Based on Fusion Features of CNN and Handcrafted, Diagnostics, Vol. 13, No. 10, 1753. doi:10.3390/diagnostics13101753.
  12. Ejiyi, C. J., Qin, Z., Nnani, A. O., Deng, F., Ejiyi, T. U., Ejiyi, M. B., Agbesi, V. K., and Bamisile, O. (2024). ResfEANet: ResNet-Fused External Attention Network for Tuberculosis Diagnosis Using Chest X-Ray Images, Computer Methods and Programs in Biomedicine Update, Vol. 5, 100133. doi:10.1016/j.cmpbup.2023.100133.
  13. Huy, V. T. Q., and Lin, C.-M. (2023). An Improved Densenet Deep Neural Network Model for Tuberculosis Detection Using Chest X-Ray Images, IEEE Access, Vol. 11, 42839–42849. doi:10.1109/ACCESS.2023.3270774.
  14. Mohan, R., Kadry, S., Rajinikanth, V., Majumdar, A., and Thinnukool, O. (2022). Automatic Detection of Tuberculosis Using VGG19 with Seagull-Algorithm, Life, Vol. 12, No. 11, 1848. doi:10.3390/life12111848.
  15. Xu, Y., Khan, T. M., Song, Y., and Meijering, E. (2025). Edge Deep Learning in Computer Vision and Medical Diagnostics: A Comprehensive Survey, Artificial Intelligence Review, Vol. 58, No. 3, 93. doi:10.1007/s10462-024-11033-5.
  16. Zhang, Y., Weng, Y., and Lund, J. (2022). Applications of Explainable Artificial Intelligence in Diagnosis and Surgery, Diagnostics, Vol. 12, No. 2, 237. doi:10.3390/diagnostics12020237.
  17. Kotei, E., and Thirunavukarasu, R. (2024). A Comprehensive Review on Advancement in Deep Learning Techniques for Automatic Detection of Tuberculosis from Chest X-Ray Images, Archives of Computational Methods in Engineering, Vol. 31, No. 1, 455–474. doi:10.1007/s11831-023-09987-w.
  18. Muhammad, D., Salman, M., Keles, A., and Bendechache, M. (2025). ALL Diagnosis: Can Efficiency and Transparency Coexist? An Explainble Deep Learning Approach, Scientific Reports, Vol. 15, No. 1, 12812. doi:10.1038/s41598-025-97297-5.
  19. Kiran, S., and Jabeen, D. I. (2024). Dataset of Tuberculosis Chest X-Rays Images, Mendeley Data. doi:10.17632/8j2g3csprk.2.
  20. Nguyen, T. T., and Nguyen, T. P. (2024). Rescaling Large Datasets Based on Validation Outcomes of a Pre-Trained Network, Pattern Recognition Letters, Vol. 185, 73–80. doi:10.1016/j.patrec.2024.07.001.
  21. 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.
  22. 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.
  23. Noviandy, T. R., Idroes, G. M., Purnawarman, A., Imran, I., Lestari, N. D., Hastuti, S., and Idroes, R. (2024). Enhancing Early Detection of Alzheimer’s Disease through MRI Using Explainable Artificial Intelligence, Indonesian Journal of Case Reports, Vol. 2, No. 2, 43–51. doi:10.60084/ijcr.v2i2.255.
  24. Ma, N., Zhang, X., Zheng, H.-T., and Sun, J. (2018). ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design, 122–138. doi:10.1007/978-3-030-01264-9_8.
  25. Iandola, F. N., Han, S., Moskewicz, M. W., Ashraf, K., Dally, W. J., and Keutzer, K. (2016). SqueezeNet: AlexNet-Level Accuracy with 50x Fewer Parameters And< 0.5 MB Model Size, ArXiv Preprint ArXiv:1602.07360.
  26. Howard, A., Sandler, M., Chu, G., Chen, L.-C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., and Vasudevan, V. (2019). Searching for MobileNetV3, Proceedings of the IEEE/CVF International Conference on Computer Vision, 1314–1324.
  27. Idroes, G. M., Noviandy, T. R., Emran, T. Bin, and Idroes, R. (2024). Explainable Deep Learning Approach for Mpox Skin Lesion Detection with Grad-CAM, Heca Journal of Applied Sciences, Vol. 2, No. 2, 54–63. doi:10.60084/hjas.v2i2.216.
  28. Noviandy, T. R., Nisa, K., Idroes, G. M., Hardi, I., and Sasmita, N. R. (2024). Classifying Beta-Secretase 1 Inhibitor Activity for Alzheimer’s Drug Discovery with LightGBM, Journal of Computing Theories and Applications, Vol. 2, No. 2, 138–147. doi:10.62411/jcta.10129.
  29. Noviandy, T. R., Idroes, G. M., and Hardi, I. (2025). Integrating Explainable Artificial Intelligence and Light Gradient Boosting Machine for Glioma Grading, Informatics and Health, Vol. 2, No. 1, 1–8. doi:10.1016/j.infoh.2024.12.001.
  30. Noviandy, T. R., Maulana, A., Emran, T. B., Idroes, G. M., and Idroes, R. (2023). QSAR Classification of Beta-Secretase 1 Inhibitor Activity in Alzheimer’s Disease Using Ensemble Machine Learning Algorithms, Heca Journal of Applied Sciences, Vol. 1, No. 1, 1–7. doi:10.60084/hjas.v1i1.12.
  31. Lundberg, S. M., and Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions, Advances in Neural Information Processing Systems, Vol. 30.
  32. 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.

Downloads

Published

2025-05-26

How to Cite

Noviandy, T. R., Idroes, G. M., Zulfikar, T., & Idroes, R. (2025). Explainable Deep Learning with Lightweight CNNs for Tuberculosis Classification. Infolitika Journal of Data Science, 3(1), 21–30. https://doi.org/10.60084/ijds.v3i1.305

Issue

Section

Articles