Comparative Evaluation of Transformer-Based Architectures for Brain Tumor MRI Classification: Balancing Predictive Performance and Computational Efficiency
Pdf File

Keywords

Brain tumor classification
MRI
Vision transformer
Swin transformer
Transfer learning
Computational efficiency

How to Cite

Comparative Evaluation of Transformer-Based Architectures for Brain Tumor MRI Classification: Balancing Predictive Performance and Computational Efficiency. (2026). Artificial Intelligence in Applied Sciences, 2(1), 69-75. https://doi.org/10.69882/adba.ai.2026020

Abstract

Reliable categorization of brain tumors on magnetic resonance imaging (MRI) plays an important role in radiological decision support for differentiating tumor subtypes with overlapping visual characteristics. This study investigates a transformer-based transfer learning framework for classifying brain MRI scans into four clinically relevant categories: glioma, meningioma, no tumor, and pituitary tumor. The experimental dataset comprised 5,941 brain MRI scans, which were partitioned into training, validation, and independent test subsets at an approximately 70:15:15 ratio, yielding 4,160, 892, and 889 images, respectively. A consistent experimental protocol was applied to evaluate four transformer architectures: Swin-Base, DeiT-Base, ViT-Base, and BEiT-Base. The evaluation combined predictive and computational criteria, including accuracy, macro-level precision, recall, F1-score, AUROC, parameter count, GFLOPs, per-image inference time, and image throughput. Among the evaluated models, Swin-Base achieved the highest overall classification performance, with an accuracy of 0.9854, macro-averaged precision of 0.9832, macro-averaged recall of 0.9855, and macro-averaged F1-score of 0.9843. BEiT-Base achieved the highest macro-averaged AUROC value of 0.9980, indicating strong class separability across decision thresholds. The confusion matrix of Swin-Base further demonstrated robust class-wise discrimination on the 889-image independent test set, correctly classifying 876 images. These findings suggest that transformer-based architectures, particularly Swin-Base, may provide a highly effective approach for automated brain MRI-based tumor classification.

Pdf File

References

Ahmed, M. M., M. M. Hossain, M. R. Islam, M. S. Ali, A. A. N. Nafi, et al., 2024 Brain tumor detection and classification in mri using hybrid vit and gru model with explainable ai in southern bangladesh. Scientific Reports 14: 22797.

Aloraini, M., A. Khan, S. Aladhadh, S. Habib, M. F. Alsharekh, et al., 2023 Combining the transformer and convolution for effective brain tumor classification using mri images. Applied Sciences 13: 3680.

Asiri, A. A., A. Shaf, T. Ali, M. Aamir, A. Usman, et al., 2023 Exploring the power of deep learning: Fine-tuned vision transformer for accurate and efficient brain tumor detection in mri scans. Diagnostics 13: 2094.

Bao, H., L. Dong, S. Piao, and F. Wei, 2022 Beit: Bert pre-training of image transformers. In International Conference on Learning Representations (ICLR).

Chandraprabha, K., L. Ganesan, and K. Baskaran, 2025 A novel approach for the detection of brain tumor and its classification via end-to-end vision transformer-cnn architecture. Frontiers in Oncology 15: 1508451.

Chen, W., X. Tan, J. Zhang, G. Du, Q. Fu, et al., 2025 Mlg: A mixed local and global model for brain tumor classification. Frontiers in Neuroscience 19: 1618514.

Dosovitskiy, A., L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, et al., 2021 An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR).

Goceri, E., 2025 An efficient network with cnn and transformer blocks for glioma grading and brain tumor classification from mris. Expert Systems with Applications 268: 126290.

Hira, M. I. K., M. S. Hossain, M. M. A. Bithee, U. S. Sara, M. M. Hasan, et al., 2026 Bdneuro-mri: A bangladeshi clinical brain tumor mri dataset for four-class deep learning classification. Version 7. doi: 10.17632/ZWR4NTF94J.7.

Hong, S., J. Wu, L. Zhu, and W. Chen, 2024 Brain tumor classification in vit-b/16 based on relative position encoding and residual mlp. PLOS ONE 19: e0298102.

Hossain, S., A. Chakrabarty, T. R. Gadekallu, M. Alazab, and M. J. Piran, 2024 Vision transformers, ensemble model, and transfer learning leveraging explainable ai for brain tumor detection and classification. IEEE Journal of Biomedical and Health Informatics 28: 1261–1272.

Jayaraman, G., S. Meganathan, S. S. Mohideen Shah, M. Anuradha, R. K. Sundararajan, et al., 2025 A hybrid cnn-vit framework with cross-attention fusion and data augmentation for robust brain tumor classification. Scientific Reports 15: 45769.

Joshi, D., B. K. Singh, K. K. Nagwanshi, and N. S. Choubey, 2025 Integrating pyramid vision transformer and topological data analysis for brain tumor. Frontiers in Computer Science 7: 1463006.

Karagoz, M. A. et al., 2024 Residual vision transformer (resvit) based self-supervised learning model for brain tumor classification.

Khaniki, M. A. L., M. Mirzaeibonehkhater, M. Manthouri, and E. Hasani, 2024 Brain tumor classification using vision transformer with selective cross-attention mechanism and feature calibration.

Krishnan, P. T., P. Krishnadoss, M. Khandelwal, D. Gupta, A. Nihaal, et al., 2024 Enhancing brain tumor detection in mri with a rotation invariant vision transformer. Frontiers in Neuroinformatics 18: 1414925.

Lan, Y.-L., S. Zou, B. Qin, and X. Zhu, 2023 Potential roles of transformers in brain tumor diagnosis and treatment. Brain-X 1: e23.

Liu, Z., Y. Lin, Y. Cao, H. Hu, Y. Wei, et al., 2021 Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 10012–10022.

Napa, K. K., S. Murugan, J. S. Murugan, and A. Jayanthi, 2025 Brain-meta: A reproducible cnn-vision transformer meta-ensemble pipeline for explainable brain tumor classification. MethodsX p. 103769.

Panigrahi, S., D. R. Das Adhikary, and B. K. Pattanayak, 2025 Hybrid transfer learning and self-attention framework for robust mri-based brain tumor classification. Scientific Reports 15: 21343.

Reddy, C. K. K., P. A. Reddy, H. Janapati, B. Assiri, M. Shuaib, et al., 2024 A fine-tuned vision transformer based enhanced multi-class brain tumor classification using mri scan imagery. Frontiers in Oncology 14: 1400341.

Sahin, E., D. Ozdemir, and H. Temurtas, 2024 Multi-objective optimization of vit architecture for efficient brain tumor classification. Biomedical Signal Processing and Control 91: 105938.

Sankari, C., V. Jamuna, and A. R. Kavitha, 2025 Hierarchical multi-scale vision transformer model for accurate detection and classification of brain tumors in mri-based medical imaging. Scientific Reports 15: 38275.

Sundar, G. N., D. Narmadha, N. A. Jerry, S. K. Thangavel, S. K. Shanmugam, et al., 2024 Brain tumor detection and classification using vision transformer (vit). In Proceedings of the 3rd International Conference on Automation, Computing and Renewable Systems, pp. 562–567.

Tanone, R., L.-H. Li, and S. Saifullah, 2025 Vit-cb: Integrating hybrid vision transformer and catboost to enhanced brain tumor detection with shap. Biomedical Signal Processing and Control 100: 107027.

Touvron, H., M. Cord, M. Douze, F. Massa, A. Sablayrolles, et al., 2021 Training data-efficient image transformers and distillation through attention. In Proceedings of the 38th International Conference on Machine Learning, volume 139, pp. 10347–10357.

Wang, J., S.-Y. Lu, S.-H. Wang, and Y.-D. Zhang, 2024 Ranmerformer: Randomized vision transformer with token merging for brain tumor classification. Neurocomputing 573: 127216.

Creative Commons License

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