Deep Spatial and Channel Attention with Transformer Context for Brain Tumor MRI Classification

Authors

  • Hamza Bin Abdul Majeed Faculty of Computer Science and Information Technology, Lahore, 55150, Pakistan.
  • Shahzaib Khan Faculty of Computer Science and Information Technology, Lahore, 55150, Pakistan.
  • Khalid Hamid Faculty of Computer Science and Information Technology, Lahore, 55150, Pakistan.

Keywords:

Classification of Brain Tumor, Diagnostics of MRI, Deep Learning, Spatial Attention, Channel Attention, Vision Transformers

Abstract

One of the most valuable activities in medical diagnostics is magnetic resounding imaging (MRI)--brain tumor classification affects directly the planning of treatment and prognosis of a patient. The paper outlines a new approach of automatic deep-learning brain tumor as a multi-class problem that isolates brain tumor images caused by glioma, meningioma, pituitary tumors, and non-tumor images of the brain. In relation to the background, the proposed model is an extension of the ResNet background, but with deployment of Squeeze-and-Excitation (SE) blocks and attention specification with the aid of transformers to enhance the channel and global settings in terms of background characteristic learning. The fact that it is modeled as a hybrid architecture should help to create the discriminative properties the model detects within advanced MRI scans. Our model has also been tested and trained on a common publicly available dataset and therefore the final test accuracy of 99.08% is high, with 98% or above F1-scores in all tumor types. The result of the five-fold cross-validation indicated a mean test accuracy of 98.15, which reveals the integrity of the model and its applicability. We outperformed baseline models as vanilla ResNet (98.70%), ResNet with SEs blocks (98.78%), and ResNet with transformer modules (98.32%). Analysis reports (confusion matrix, classification report) in detail demonstrate that the model does not confuse low classes of tumors misclassification. The specified visually delivered explanations open the door to clinically understandable interpretability of the forecasts, which are mediated by Grad-CAM and the attention maps. We also contrast it with what the available state-of-the-art models in literature would deliver, demonstrating the merit of our solution in accuracy and novelty of architecture. Despite its high performance, there still exist certain limitations such as the absence of segmentation, the potential of domain shifts, and inability of use in real-time. Future work will focus on integrating segmentation pipelines, enhance explanatory mechanisms, and real-time implementation of the model into real-world clinical practice. The creation may become the basis of the further elaboration of new AI-based diagnostic devices that will assist in the continued trustworthy, explainable, and more powerful outcomes in brain tumor detection systems in clinical practice.

Downloads

Published

2025-08-20

How to Cite

Hamza Bin Abdul Majeed, Shahzaib Khan, & Khalid Hamid. (2025). Deep Spatial and Channel Attention with Transformer Context for Brain Tumor MRI Classification. Journal of Computing & Biomedical Informatics. Retrieved from https://www.jcbi.org/index.php/Main/article/view/1051

Issue

Section

Articles