A Comparative Study of Vision Transformers and Convolutional Neural Networks for Lung Nodule Malignancy Classification in CT Imaging

Authors

  • Aya Ahmed Hashim Alzahraa University for Women
  • Emtiaz Abbas Naji University of Kerbala
  • Estqlal Hammad Dhahi University of Kerbala
  • Shahad Dakhil Khalaf University of Kerbala
  • Zahraa Shams Alden University of Kerbala
  • Ayad Hameed Mousa University of Kerbala

DOI:

https://doi.org/10.12928/biste.v8i4.14422

Keywords:

Vision Transformer (ViT), Lung Nodule Malignancy, Computed Tomography (CT), Transfer Learning, Self-Attention, Deep Learning, Cross Validation, Attention Visualization, Computer Aided Diagnosis (CAD)

Abstract

Accurate and timely malignancy categorization of pulmonary nodules in computed tomography (CT) images is critical for Health Information Technology, directly impacting clinical decision support systems and patient prognosis in lung cancer management and patient prognosis in lung cancer management. Although Convolutional Neural Networks (CNNs) are the standard, their local inductive bias can make them weak with regard to the modelling of the long-range, global contextual dependencies of medical images. While we recognize the natural restriction of evaluating 2D axial slices instead of full 3D volumetric data. This paper evaluates the effectiveness of a pre-trained self-supervised Vision Transformer (ViT) model to classify binary lung nodules, and leveraging the model's global self-attention mechanism to extract complex morphological features. Using a rigorously curated cohort of 2186 pulmonary nodule instances from the public LIDC-IDRI dataset, we preprocessed data via windowing, normalization, and resizing to 224×224 pixels. A ViT-Base model, pre-trained on ImageNet-21k, was fine-tuned and evaluated against a strong CNN baseline (DenseNet-121) using five-fold cross-validation. The ViT model achieved a superior F1-score of 0.891 (±0.018) and a mean AUC-ROC of 0.945 (±0.012) on the held-out test set. The results demonstrate that the Vision Transformer architecture presents a highly effective framework for this diagnostic task within HIT, surpassing traditional CNN-based approaches. Future work will focus on integrating 3D spatial information across multiple CT slices to further enhance model performance and clinical utility.

References

M. Gao, Y. Li, H. Wang, J. Zhang, G. Zhang, and N. Zhang, "From biomarker to clinical utility: translating the advanced lung cancer inflammation index into a machine learning-driven risk stratification tool for colorectal cancer," Journal of Translational Medicine, vol. 24, no. 1, p. 7, 2026, https://doi.org/10.1186/s12967-025-07494-z.

D. Coco and S. Leanza, "State of the art of robotic lobectomy for non–small cell lung cancer: a systematic-style evidence synthesis," Journal of Robotic Surgery,vol. 20, no. 1, p. 108, 2026, https://doi.org/10.1007/s11701-025-03049-y.

N. A. Shah et al., "Comparative analysis of robot-assisted minimally invasive esophagectomy versus conventional minimally invasive esophagectomy, a systematic review and meta-analysis," Journal of Robotic Surgery, vol. 20, no. 1, p. 98, 2026, https://doi.org/10.1007/s11701-025-03068-9.

B. Jyothish and J. Jacob, "Artificial intelligence-driven insights into silver-doped zinc ferrite (SI=25): Advancing biofilm control, drug delivery, and tissue engineering for cancer therapy," Next Nanotechnology, vol. 9, p. 100351, 2026, https://doi.org/10.1016/j.nxnano.2025.100351.

E. M. Qiao et al., "Evaluating the clinical trends and benefits of low-dose computed tomography in lung cancer patients," Cancer Medicine, vol. 10, no. 20, pp. 7289-7297, 2021, https://doi.org/10.1002/cam4.4229.

A. Kirpalani et al., "External validation of an RSNA 2023 Abdominal Trauma AI Challenge high performing machine learning model in the detection and grading of splenic injuries on CT," Abdominal Radiology, vol. 50, no. 11, pp. 5581-5590, 2025, https://doi.org/10.1007/s00261-025-04910-2.

D. Ye, K. Lan, J. Cheng, and X. Jiang, "MFA-Net: multi-scale feature aggregation network with background-aware module for ultrasound segmentation of thyroid nodules," Quantitative Imaging in Medicine and Surgery, vol. 15, no. 12, pp. 12167-12189, 2025, https://doi.org/10.21037/qims-2025-1364.

S. Chauhan, N. Malik, and R. Vig, "AI/ML techniques in servicing LDCT reconstruction: a systematic literature review," Discover Artificial Intelligence, vol. 5, no. 1, p. 229, 2025, https://doi.org/10.1007/s44163-025-00419-1.

C. Auger et al., "Development of a Novel Circulating Autoantibody Biomarker Panel for the Identification of Patients with ‘Actionable’ Pulmonary Nodules," Cancers, vol. 15, no. 8, p. 2259, 2023, https://doi.org/10.3390/cancers15082259.

L. T. Tanoue et al., "Standardizing the Reporting of Incidental, Non-Lung Cancer (Category S) Findings Identified on Lung Cancer Screening Low-Dose CT Imaging," Chest, vol. 161, no. 6, pp. 1697-1706, 2022, https://doi.org/10.1016/j.chest.2021.12.662.

L. Lambert et al., "Early detection of lung cancer in Czech high-risk asymptomatic individuals (ELEGANCE): A study protocol," Medicine (United States), vol. 100, no. 5, p. E23878, 2021, https://doi.org/10.1097/MD.0000000000023878.

C. N. Devi, T. S. Lawrence, and P. R. Subramaniam, "A novel hybrid Res2Net-UNet model for accurate brain tumor segmentation in MRI," International Journal of Cognitive Computing in Engineering, vol. 7, pp. 310-324, 2026, https://doi.org/10.1016/j.ijcce.2025.11.005.

S. V and C. P. Diana Cyril, "Ensemble deep learning model for early diagnosis of oral Squamous cell Carcinoma from histopathology images," Biomedical Signal Processing and Control, vol. 114, p. 109264, 2026, https://doi.org/10.1016/j.bspc.2025.109264.

A. Thaljaoui, S. N. Yousafzai, I. M. Nasir, O. Saidani, E. Fadhal, and T. Saidani, "Explainable skin cancer diagnosis with parallel attention mechanism for segmentation and classification," Biomedical Signal Processing and Control, vol. 113, p. 109159, 2026, https://doi.org/10.1016/j.bspc.2025.109159.

N. Zhao et al., "TFSM: A network for time-frequency synergistic modeling integrating Mamba temporal pathway and spectral features for electricity theft detection," Expert Systems with Applications, vol. 297, p. 129425, 2026, https://doi.org/10.1016/j.eswa.2025.129425.

Y. Wang, "Hybrid model integrating LeViT transformer and distillation techniques for pattern detection and dance classification," Scientific Reports, vol. 16, no. 1, p. 33, 2026, https://doi.org/10.1038/s41598-025-26035-8.

I. Afifi, M. Elgendy, M. Abdelfatah, and S. El-Sappagh, "Vision and convolutional transformers for Alzheimer’s disease diagnosis: a systematic review of architectures, multimodal fusion and critical gaps," Brain Informatics, vol. 13, no. 1, p. 1, 2026, https://doi.org/10.1186/s40708-025-00286-7.

Y.-S. Huang et al., "An improved 3-D attention CNN with hybrid loss and feature fusion for pulmonary nodule classification," vol. 229, p. 107278, 2023, https://doi.org/10.1016/j.cmpb.2022.107278.

I. Marinakis, K. Karampidis, and G. J. B. Papadourakis, "Pulmonary nodule detection, segmentation and classification using deep learning: a comprehensive literature review," vol. 4, no. 3, pp. 2043-2106, 2024, https://doi.org/10.3390/biomedinformatics4030111.

Z. Chen, D. Agarwal, K. Aggarwal, W. Safta, M. M. Balan, and K. Brown, "Masked image modeling advances 3d medical image analysis," in Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 1970-1980, 2023, https://doi.org/10.1109/WACV56688.2023.00201.

S. V. M. Sagheer, M. KH, P. Ameer, M. Parayangat, M. J. C. Abbas, Materials, and Continua, "Transformers for Multi-Modal Image Analysis in Healthcare," vol. 84, no. 3, 2025, https://doi.org/10.32604/cmc.2025.063726.

S. Aburass, O. Dorgham, J. Al Shaqsi, M. Abu Rumman, and O. Al-Kadi, "Vision Transformers in Medical Imaging: a Comprehensive Review of Advancements and Applications Across Multiple Diseases," Journal of Imaging Informatics in Medicine, vol. 38, no. 6, pp. 3928-3971, 2025, https://doi.org/10.1007/s10278-025-01481-y.

N. K. Karthikeyan and S. S. Ali, "Lung Cancer Classification Using CT Scan Images Through Deep Learning And CNN Based Model," in 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS), pp. 01-05, 2024, https://doi.org/10.1109/ADICS58448.2024.10533528.

B. Liu et al., "Evolving the pulmonary nodules diagnosis from classical approaches to deep learning-aided decision support: three decades’ development course and future prospect," vol. 146, no. 1, pp. 153-185, 2020, https://doi.org/10.1007/s00432-019-03098-5.

Z. J. R. M. Zhu, "Advancements in automated classification of chronic obstructive pulmonary disease based on computed tomography imaging features through deep learning approaches," vol. 234, p. 107809, 2024, https://doi.org/10.1016/j.rmed.2024.107809.

X. Cheng, P. Han, G. Li, S. Chen and H. Zhang, "A Novel Channel and Temporal-Wise Attention in Convolutional Networks for Multivariate Time Series Classification," in IEEE Access, vol. 8, pp. 212247-212257, 2020, https://doi.org/10.1109/ACCESS.2020.3040515.

Y. Liao, Y. Gao, and W. J. P. R. Zhang, "Dynamic accumulated attention map for interpreting evolution of decision-making in vision transformer," Pattern Recognition, vol. 165, p. 111607, 2025, https://doi.org/10.1016/j.patcog.2025.111607.

W. Deng, Q. Shi and J. Li, "Attention-Gate-Based Encoder–Decoder Network for Automatical Building Extraction," in IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 14, pp. 2611-2620, 2021, https://doi.org/10.1109/JSTARS.2021.3058097.

Q. Zhang et al., "A Hybrid CNN-Transformer Deep Learning Model for Differentiating Benign and Malignant Breast Tumors Using Multi-View Ultrasound Images," Technology in Cancer Research & Treatment, p. 2025.08. 24.25334030, 2025, https://doi.org/10.1177/15330338261447344/v2/response1.

S. Raminedi, S. Shridevi, and D. J. S. R. Won, "Multi-modal transformer architecture for medical image analysis and automated report generation," vol. 14, no. 1, p. 19281, 2024, https://doi.org/10.1038/s41598-024-69981-5.

S. Takahashi et al., "Comparison of vision transformers and convolutional neural networks in medical image analysis: A systematic review," Journal of Medical Systems, vol. 48, no. 1, p. 84, 2024, https://doi.org/10.1007/s10916-024-02105-8.

J. W. Kim, A. U. Khan, and I. Banerjee, "Systematic review of hybrid vision transformer architectures for radiological image analysis," Journal of Imaging Informatics in Medicine, pp. 1-15, 2025, https://doi.org/10.1101/2024.06.21.24309265.

A. Khan et al., "A Recent Survey of Vision Transformers for Medical Image Segmentation," in IEEE Access, vol. 13, pp. 191824-191849, 2025, https://doi.org/10.1109/ACCESS.2025.3618215.

O. N. Manzari, H. Ahmadabadi, H. Kashiani, S. B. Shokouhi, and A. Ayatollahi, “MedViT: a robust vision transformer for generalized medical image classification," Computers in biology and medicine, vol. 157, p. 106791, 2023, https://doi.org/10.1016/j.compbiomed.2023.106791.

S. Aladhadh, M. Alsanea, M. Aloraini, T. Khan, S. Habib, and M. Islam, "An effective skin cancer classification mechanism via medical vision transformer," Sensors, vol. 22, no. 11, p. 4008, 2022, https://doi.org/10.3390/s22114008.

F. Lezzar and S. E. Mili, "Advanced Deep Learning for Stroke Classification Using Multi-Slice CT Image Analysis," Journal of Electronics, Electromedical Engineering, and Medical Informatics, vol. 7, no. 3, pp. 850-868, 2025, https://doi.org/10.35882/jeeemi.v7i3.947.

C. Krishnan, E. Onuoha, A. Hung, K. Sung, and H. Kim, "A pseudo-3D multi attention mechanism for prostate zonal segmentation," in Medical Imaging 2025: Image Processing, vol. 13406, pp. 605-617, 2025, https://doi.org/10.1117/12.3047318.

F. Zhao, M. Geng, H. Liu, J. Zhang, And J. Yu, "Convolutional neural network and vision transformer-driven cross-layer multi-scale fusion network for hyperspectral image classification," Journal of Electronics and Information Technology, vol. 46, no. 5, pp. 2237-2248, 2024, https://jeit.ac.cn/en/article/doi/10.11999/JEIT231209.

S. P. Fauzya, I. Ardiyanto, and H. A. Nugroho, "A comparative study on lung nodule detection: 3d cnn vs vision transformer," in 2024 8th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE), pp. 417-422, 2024, https://doi.org/10.1109/ICITISEE63424.2024.10729900.

L. Yamazaki, "Investigation of Transformers and Other Machine Learning Techniques for Health Data Classification," Middle Tennessee State University, 2024, https://www.proquest.com/openview/4855db76ba17aa1e4fa8cc8c207a8afd/1?pq-origsite=gscholar&cbl=18750&diss=y.

K. Xia and J. Wang, "Recent advances of transformers in medical image analysis: a comprehensive review," MedComm–Future Medicine, vol. 2, no. 1, p. e38, 2023, https://doi.org/10.1002/mef2.38.

M. Wen et al., "Precise diagnosis and prognosis assessment of malignant lung nodules: a narrative review," Journal of Thoracic Disease, vol. 16, no. 11, p. 7999, 2024, https://doi.org/10.21037/jtd-24-1058.

B. Palanisamy et al., "Transformers for Vision: A Survey on Innovative Methods for Computer Vision," in IEEE Access, vol. 13, pp. 95496-95523, 2025, https://doi.org/10.1109/ACCESS.2025.3571735.

V. Vadori, A. Peruffo, J. -M. Graïc, L. Finos and E. Grisan, "Mind the Gap: Evaluating Patch Embeddings from General-Purpose and Histopathology Foundation Models for Cell Segmentation and Classification," 2025 47th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pp. 1-7, 2025, https://doi.org/10.1109/EMBC58623.2025.11253185.

Z. Li, W. Li, H. Mai, T. Zhang, and Z. Xiong, "Enhancing cell detection in histopathology images: a ViT-based U-Net approach," in International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 150-160, 2023, https://doi.org/10.1007/978-3-031-55088-1_14.

Z. Yang et al., "Embedding Radiomics into Vision Transformers for Multimodal Medical Image Classification," arXiv preprint arXiv:2504.10916, 2025, https://doi.org/10.48550/arXiv.2504.10916.

M.-Q. Le and T.-S. Le, "Global Positional Encoding and Its Application in Medical Image Segmentation," in International Conference on Multi-disciplinary Trends in Artificial Intelligence, pp. 448-459, 2025, https://doi.org/10.1007/978-981-95-4960-3_36.

S. Jelassi, M. Sander, and Y. Li, "Vision transformers provably learn spatial structure," Advances in Neural Information Processing Systems, vol. 35, pp. 37822-37836, 2022, https://doi.org/10.52202/068431-2741.

X. Fu et al., "Crop pest image recognition based on the improved ViT method," Information Processing in Agriculture, vol. 11, no. 2, pp. 249-259, 2024, https://doi.org/10.1016/j.inpa.2023.02.007.

S. Chitta, V. K. Yandrapalli, and S. Sharma, "Deep Learning for Precision Agriculture: Evaluating CNNs and Vision Transformers in Rice Disease Classification," in 2024 OPJU International Technology Conference (OTCON) on Smart Computing for Innovation and Advancement in Industry 4.0, pp. 1-6, 2024, https://doi.org/10.1109/OTCON60325.2024.10687983.

P. Zhang et al., "Multi-scale vision longformer: A new vision transformer for high-resolution image encoding," in Proceedings of the IEEE/CVF international conference on computer vision, pp. 2998-3008, 2021, https://doi.org/10.1109/ICCV48922.2021.00299.

R. Tian, Z. Wu, Q. Dai, H. Hu, Y. Qiao, and Y.-G. Jiang, "Resformer: Scaling vits with multi-resolution training," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22721-22731, 2023, https://doi.org/10.1109/CVPR52729.2023.02176.

I. M. Abdulkareem, F. K. AL-Shammri, N. A. A. Khalid, and N. A. Omran, "A Proposed Approach for Object Detection and Recognition by Deep Learning Models Using Data Augmentation," International Journal of Online & Biomedical Engineering, vol. 20, no. 5, 2024, https://doi.org/10.3991/ijoe.v20i05.47171.

Downloads

Published

2026-07-06

How to Cite

[1]
A. A. Hashim, E. A. Naji, E. H. Dhahi, S. D. Khalaf, Z. S. Alden, and A. H. Mousa, “A Comparative Study of Vision Transformers and Convolutional Neural Networks for Lung Nodule Malignancy Classification in CT Imaging”, Buletin Ilmiah Sarjana Teknik Elektro, vol. 8, no. 4, pp. 941–953, Jul. 2026.

Issue

Section

Article