Comparative Analysis of CNN and Vision Transformer Architectures for Explainable Brain Tumor Classification Using MRI Images
DOI:
https://doi.org/10.54536/ajarai.v1i2.7963Keywords:
Deep Learning (Dl), Explainable Artificial Intelligence (Xai), Magnetic Resonance Imaging (Mri), Vision Transformer (Vit)Abstract
Diagnosis of brain tumor is one of the most critical tasks in medical imaging and early and accurate diagnosis is extremely important for improving the treatment planning and outcome of patients with brain tumors. Brain tumor assessment is achieved with Magnetic Resonance Imaging (MRI), which is commonly used, but manual interpretation of MRI scans can be time-consuming and subject to inter-observer variability. To overcome these difficulties, an explainable deep learning (XDL) framework is proposed that classifies brain tumors into a multiclass classification problem using magnetic resonance imaging (MRI) images. To overcome these challenges, this study proposes an explainable deep learning (XDL) framework that is capable of brain tumor classification as a multiclass classification problem from MRI images. Five state-of-the-art deep learning architectures ResNet50, VGG16, DenseNet121, Vision Transformer (ViT), and a Hybrid CNN ViT model, were tested and compared to determine which one would be the best fit for the classification task. Preprocessing and augmentation of MRI images were performed before training and evaluation the model. Metrics used to evaluate the performance included accuracy, precision, recall, F1 score, the confusion matrix, and Receiver Operating Characteristic Area Under Curve (ROC-AUC). The Hybrid CNN–ViT framework was compared and it was found that the hybrid approach, combining the advantages of CNN for feature extraction and transformer for contextual learning, led to better classification performance. Gradient-weighted Class Activation Mapping (Grad-CAM) and Local Interpretable Model-Agnostic Explanations (LIME) were used to explain the best-performing model to improve the transparency and interpretability of the model. To validate that the model attended to clinically relevant tumour regions in classification, the explainability results were obtained. The proposed framework showed high classification accuracy of 98.68% and an average of ROC-AUC score at approximately 0.999, indicating that the framework has good predictive power and high interpretability. The results indicate that the proposed explainable deep learning framework shows great promise of helping clinical diagnosis of brain tumors to be reliable and transparent, by integrating with AI.
Downloads
References
Ahmed, M. M., Hossain, M. M., Islam, M. R., Ali, M. S., Nafi, A. A. N., & Ahmed, M. F. (2024). Brain tumor detection and classification in MRI using hybrid ViT and GRU model with explainable AI in Southern Bangladesh. Scientific Reports, 14(1), Article 22797. https://doi.org/10.1038/s41598-024-73893-w
Akinde, A. (2026). So many opinions, so many LLMs: Comparing large language models to traditional machine learning for open-ended survey analysis. Applied Research and Innovation, 4(1), 87–96. https://journals.e-palli.com/home/index.php/ari/article/view/6586
Badža, M. M., & Barjaktarović, M. Č. (2020). Classification of brain tumors from MRI images using a convolutional neural network. Applied Sciences, 10(6), Article 1999. https://doi.org/10.3390/app10061999
Bohaju, J. (2020). Brain tumor dataset extracted features for brain tumor [Data set]. https://www.kaggle.com/jakeshbohaju/brain-tumor
Dosari, F. H. M. A., & Abouellail, S. I. A. D. (2023). Artificial intelligence (AI) techniques for intelligent control systems in mechanical engineering. American Journal of Smart Technology and Solutions, 2(2), 55–64. https://doi.org/10.54536/ajsts.v2i2.2188
Hatamizadeh, A., Tang, Y., Nath, V., Yang, D., Roth, H. R., Xu, D., & Terzopoulos, D. (2022). UNETR: Transformers for 3D medical image segmentation. Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, 574–584. https://doi.org/10.1109/WACV51458.2022.00065
He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770–778. https://doi.org/10.1109/CVPR.2016.90
Huang, G., Liu, Z., van der Maaten, L., & Weinberger, K. Q. (2017). Densely connected convolutional networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 4700–4708. https://doi.org/10.1109/CVPR.2017.243
Iftikhar, S., Fatima, K., Khan, M. A., & Javed, A. (2025). Explainable CNN for brain tumor detection and classification using MRI images. Egyptian Journal of Radiology and Nuclear Medicine, 56(1), Article 12. https://doi.org/10.1186/s43055-024-01389-0
Islam, M. M., Karray, F., Alhajj, R., & Zeng, J. (2023). Transfer learning architectures with fine-tuning for brain tumor classification using MRI images. Intelligent Systems with Applications, 18, Article 200257. https://doi.org/10.1016/j.iswa.2023.200257
Isin, A., Direkoglu, C., & Sah, M. (2016). Review of MRI-based brain tumor image segmentation using deep learning methods. Procedia Computer Science, 102, 317–324. https://doi.org/10.1016/j.procs.2016.09.407
Khan, H. A., Jue, W., Mushtaq, M., & Mushtaq, M. U. (2020). Brain tumor classification in MRI image using convolutional neural network. Mathematical Biosciences and Engineering, 17(5), 6203–6216. https://doi.org/10.3934/mbe.2020328
LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444. https://doi.org/10.1038/nature14539
Louis, D. N., Perry, A., Wesseling, P., Brat, D. J., Cree, I. A., Figarella-Branger, D., Hawkins, C., Ng, H. K., Pfister, S. M., Reifenberger, G., Soffietti, R., von Deimling, A., & Ellison, D. W. (2021). The 2021 WHO classification of tumors of the central nervous system: A summary. Neuro-Oncology, 23(8), 1231–1251. https://doi.org/10.1093/neuonc/noab106
Niyonkuru, V., Sylla, S., Kasuli, Z. A., Sinzinkayo, J. J., & Kabanga, D. (2025). Alzheimer’s disease detection using lightweight convolutional neural network on MRI scans. American Journal of Bioscience and Bioinformatics, 4(1), 31–39. https://doi.org/10.54536/ajbb.v4i1.5943
Rahman, T., Chowdhury, M. E. H., Khandakar, A., Kiranyaz, S., Zaman, S. U., Islam, M. R., & Reaz, M. B. I. (2023). MRI brain tumor detection and classification using parallel deep convolutional neural networks. Results in Engineering, 19, Article 101271. https://doi.org/10.1016/j.rineng.2023.101271
Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). Why should I trust you? Explaining the predictions of any classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 1135–1144. https://doi.org/10.1145/2939672.2939778
Samek, W., Montavon, G., Lapuschkin, S., Anders, C. J., & Müller, K. R. (2021). Explaining deep neural networks and beyond: A review of methods and applications. Proceedings of the IEEE, 109(3), 247–278. https://doi.org/10.1109/JPROC.2021.3060480
Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., & Batra, D. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. Proceedings of the IEEE International Conference on Computer Vision, 618–626. https://doi.org/10.1109/ICCV.2017.74
Shaker, A., Tantawi, M., Shedeed, H., & Tolba, M. (2024). Hybrid CNN–Transformer architectures for medical image classification: A comprehensive review. Biomedical Signal Processing and Control, 89, Article 105683. https://doi.org/10.1016/j.bspc.2023.105683
Sharif, M. I., Li, J. P., Amin, J., Sharif, A., & Elhoseny, M. (2022). Deep learning techniques for brain tumor classification using MRI images: A review. Current Medical Imaging, 18(4), 321–337. https://doi.org/10.2174/1573405617666210608151240
Sultan, H. H., Salem, N. M., & Al-Atabany, W. (2019). Multi-classification of brain tumor images using deep neural network. IEEE Access, 7, 69215–69225. https://doi.org/10.1109/ACCESS.2019.2919122
Tjoa, E., & Guan, C. (2021). A survey on explainable artificial intelligence (XAI): Toward medical XAI. IEEE Transactions on Neural Networks and Learning Systems, 32(11), 4793–4813. https://doi.org/10.1109/TNNLS.2020.3027314
Wen, P. Y., & Huse, J. T. (2020). Central nervous system tumors in 2020: Progress in diagnosis, classification, and treatment. Nature Reviews Neurology, 16(10), 557–558. https://doi.org/10.1038/s41582-020-0394-4
Wong, Y., Su, E. L. M., Yeong, C. F., Holderbaum, W., & Yang, C. (2025). Brain tumor classification using MRI images and deep learning techniques. PLOS ONE, 20(5), Article e0322624. https://doi.org/10.1371/journal.pone.0322624
Zhou, T., Canu, S., Ruan, S., & Vera, P. (2023). Hybrid CNN–Transformer architectures for medical image classification: A review. Artificial Intelligence in Medicine, 141, Article 102547. https://doi.org/10.1016/j.artmed.2023.102547
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Md. Abu Yousuf, Joy Chowdhury, Susmoy Chowdhury, Sukanta Dev (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.

