Research Article

Attention-Guided Transfer Learning Framework for Four-Class Brain Tumor Classification Using MRI

DOI:

10.3791/69087

July 10th, 2026

In This Article

Summary

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This study presents a lightweight attention-based deep learning framework for four-class brain tumor classification from MRI images using transfer learning with MobileNetV2, EfficientNetV1, and Inception-ResNet-V2. The model achieves high classification accuracy with reduced computational complexity, supporting resource-constrained clinical decision-support applications.

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The objective of this research is to develop a lightweight yet accurate deep learning framework for classifying brain tumors into four categories—gliomas, meningiomas, pituitary tumors, and healthy brain tissue—using magnetic resonance imaging (MRI) data. The proposed methodology combines transfer learning with three pre-trained convolutional neural network models—MobileNetV2, EfficientNetV1, and Inception-ResNet-V2—integrated with an attention mechanism that emulates the human visual system’s ability to focus on clinically relevant regions of an image. This attention-guided approach enhances tumor localization while suppressing irrelevant background information. The framework is evaluated on a large, publicly available brain MRI dataset containing thousands of labeled images across the four classes. Standard preprocessing, data augmentation, and training protocols are employed to allow straightforward replication of the proposed method. Experimental results demonstrate that EfficientNetV1 achieves the highest classification performance, reaching superior accuracy compared to both MobileNetV2 and Inception-ResNet-V2. The study concludes that the proposed lightweight, attention-based framework effectively balances accuracy and computational complexity, making it highly suitable for real-time and mobile healthcare applications, particularly in resource-constrained environments.

Introduction

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Accurate classification of brain tumors using magnetic resonance imaging (MRI) plays a critical role in clinical diagnosis, treatment planning, and prognosis estimation1. Brain tumors, including glioma, meningioma, and pituitary tumors, exhibit distinct pathological characteristics and treatment responses; therefore, early and reliable identification is essential for improving therapeutic outcomes and reducing disease progression. MRI is widely preferred for brain tumor evaluation because of its superior soft-tissue contrast, noninvasive nature, and ability to visualize tumor morphology across multiple anatomical planes. However, manual interpretation of MRI scans is often time-consuming and highly dependent on radiological expertise, particularly when tumor boundaries are irregular or when visual similarities exist between tumor classes. Consequently, automated computer-aided diagnostic systems have become increasingly important for assisting radiologists in accurate and efficient tumor classification.

Deep learning (DL)-based image analysis techniques have significantly advanced automated disease classification across biomedical and computer vision applications2,3. In neuro-oncology, machine learning and transfer learning techniques have demonstrated promising performance for tumor detection, segmentation, and classification tasks4. Convolutional neural networks (CNNs), in particular, have shown superior capability in automatically extracting hierarchical image features directly from MRI scans without relying on handcrafted feature engineering. CNN architectures can learn discriminative tumor-related representations from imaging data, thereby improving classification performance compared to conventional machine learning approaches. Recent advances in DL have enabled the development of high-performance image classification systems capable of processing large-scale imaging datasets with improved precision and reduced human intervention.

Despite these advancements, conventional deep CNN architectures often require substantial computational resources, including high memory consumption, increased parameter complexity, and extensive training time5. Such computational demands restrict their implementation in resource-constrained clinical environments and mobile healthcare systems. In addition, lightweight convolutional neural network architectures have attracted increasing attention because of their reduced computational complexity and suitability for deployment in low-resource applications5. Several recent studies have explored optimized CNN strategies, efficient feature extraction mechanisms, and lightweight deployment frameworks to improve classification efficiency without significantly compromising predictive accuracy6,7,8. However, balancing computational efficiency with robust multi-class tumor classification performance remains a major challenge in MRI-based brain tumor analysis9.

Attention-based deep learning frameworks have emerged as effective solutions for improving feature representation in medical image analysis10. Attention mechanisms enable neural networks to selectively emphasize diagnostically relevant image regions while suppressing irrelevant background information. Inspired by the human visual system, attention-guided architectures improve discriminative feature learning by directing computational focus toward tumor-specific spatial regions and contextual characteristics. Such mechanisms are particularly beneficial for brain tumor MRI analysis because tumor tissues frequently exhibit heterogeneous intensity patterns, irregular morphology, and overlapping visual characteristics among tumor categories. Consequently, integrating attention modules into CNN-based architectures can enhance classification accuracy and improve feature localization performance.

Several recent studies have demonstrated the potential of DL frameworks for automated brain tumor diagnosis and MRI-based tumor classification11,12. Gao et al. developed and validated a DL model for brain tumor diagnosis using MRI data, demonstrating strong classification capability for automated neuroimaging analysis11. Similarly, Abdusalomov et al. investigated DL-based brain tumor detection approaches using MRI scans and reported promising diagnostic performance12. Although these studies achieved improved classification accuracy, limitations related to dataset diversity, model generalization, and computational requirements remain unresolved. In many cases, the training datasets were limited in size or derived from restricted clinical sources, thereby increasing the risk of overfitting and reducing robustness across heterogeneous patient populations.

To improve tumor visualization and feature extraction, multimodal MRI analysis and reconstruction techniques have also been explored13,14. Sun et al. investigated multimodal MRI-based glioma assessment using a deep learning reconstruction framework combined with denoising strategies13. Their work demonstrated the importance of image quality enhancement for improving glioma detection accuracy. Similarly, Srinivas and Rao proposed a DL-based segmentation framework for multimodal MRI brain tumor sub-region analysis14. Their approach improved tumor sub-region delineation and contributed to individualized treatment planning. Nevertheless, multimodal frameworks generally require extensive preprocessing, increased computational resources, and precise image registration among imaging modalities, which may limit their applicability in practical clinical environments.

Attention-guided multimodal fusion methods have also been proposed for improving segmentation accuracy and MRI feature integration15,16,17,18. Zhou et al. introduced an attention mechanism-based fusion framework for multimodal brain tumor segmentation15. The study demonstrated improved segmentation performance through contextual feature learning; however, the approach primarily focused on segmentation rather than lightweight tumor classification. Similarly, Zhou and Du proposed a 3D multimodal network for accelerated MRI reconstruction16, while Huang et al. developed AMF-Net, an adaptive multisequence fusion network for multimodal brain tumor diagnosis17. Zhou et al. further proposed MLMFNet for multimodal accelerated MRI reconstruction18. Although these methods improved reconstruction quality and feature fusion capability, they relied heavily on multiple MRI modalities, deep architectures, and computationally expensive fusion operations. Such requirements may reduce their feasibility for deployment in resource-limited healthcare systems and edge-based diagnostic platforms.

Additional studies have investigated DL frameworks specifically for classifying glioma, meningioma, and pituitary tumors using MRI images19. Mokri et al. developed a DL-based classification system for identifying three major brain tumor types using MRI scans19. Although the study demonstrated encouraging performance, the model relied on relatively small datasets and lacked comparisons with lightweight transfer learning frameworks. Transformer-based architectures have also recently attracted attention in medical imaging due to their ability to model long-range feature dependencies and contextual relationships20. Feng et al. proposed a multimodal transformer framework for accelerated MR image reconstruction20. Their approach improved reconstruction performance compared with conventional methods; however, transformer architectures generally require extensive computational resources and large-scale training datasets, which may limit their practical deployment in resource-constrained medical systems.

Transfer learning-based lightweight CNN architectures have shown considerable promise for reducing computational complexity while maintaining classification accuracy21,22,23. Rahman et al. demonstrated improved performance in brain tumor classification using MobileNetV2, combined with advanced preprocessing and fine-tuning approaches21. MobileNetV2 is particularly well-suited for lightweight medical imaging applications due to its depth wise separable convolutions, reduced parameter count, and efficient feature extraction. Similarly, EfficientNet-based frameworks have shown strong multi-class classification performance through compound scaling strategies that optimize network depth, width, and input resolution simultaneously22. EfficientNet architectures achieve improved classification efficiency while maintaining lower computational overhead compared with conventional CNNs. In addition, Inception-ResNet architectures integrate residual learning with efficient feature extraction mechanisms to improve image classification performance23. Such hybrid architectures enable effective gradient propagation and deeper network representation learning while preserving computational efficiency.

Although significant progress has been achieved in MRI-based brain tumor classification, several limitations remain unresolved. Many existing approaches prioritize classification accuracy with computationally intensive architectures, without adequately addressing deployment efficiency or computational constraints. Other studies focus primarily on segmentation, multimodal reconstruction, or feature fusion rather than direct four-class tumor classification. Furthermore, relatively few frameworks integrate lightweight transfer learning architectures with attention-guided feature learning for efficient multi-class brain tumor classification. Therefore, there remains a need for a computationally efficient framework that balances classification accuracy, lightweight deployment, and discriminative feature extraction in resource-constrained clinical environments.

Therefore, this study proposes a lightweight attention-guided transfer learning framework for four-class brain tumor classification using MRI images. The proposed framework integrates MobileNetV2, EfficientNetV1, and Inception-ResNet-V2 with an attention mechanism that selectively emphasizes diagnostically relevant tumor regions while suppressing irrelevant background features. The framework aims to improve feature discrimination and classification performance while reducing computational complexity. By combining lightweight transfer-learning backbones with attention-guided feature extraction, the proposed approach aims to provide an efficient, scalable solution for automated MRI-based brain tumor classification in resource-constrained clinical decision-support environments.

Access restricted. Please log in or start a trial to view this content.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

This study used a publicly available, anonymized dataset; therefore, informed consent was not required. The proposed approach comprises six components: preprocessing, convolution module, attention module, integration of convolution and attention modules, and fully connected (FC) layers. Figure 1 illustrates the complete workflow of our method.

Dataset acquisition
Labeled brain MRI images are obtained from a publicly available Kaggle dataset comprising four tumor categories and normal tissue.

Data preprocessing
Images are resized to a uniform resolution and intensity normalized. Optional augmentation (rotation, flipping, zooming) is applied to improve generalization. The dataset is split into training (70%) and testing (30%) sets.

Model architecture
Three backbone CNNs pre-trained on ImageNet—MobileNetV2, EfficientNetV1, and Inception-ResNet-V2—were used to classify brain tumors into four categories using MRI images. MobileNetV2 and EfficientNetV1 were configured with an input dimension of 224 × 224 pixels, while Inception-ResNet-V2 required an input size of 299 × 299 pixels. In the transfer learning process, the initial convolutional layers were frozen at the start to retain generalized image features, while the upper layers were fine-tuned to tailor the model for brain tumor classification. Each backbone was paired with a lightweight classification head that included Global Average Pooling, dense layers, dropout for regularization, and a Softmax activation function to predict four classes. Dropout was implemented to mitigate overfitting and enhance generalization. The designed architecture effectively merged efficient feature extraction with lower computational demands, facilitating precise classification while remaining suitable for deployment in resource-limited and proof-of-concept scenarios.

Attention-based feature extraction
Input images are processed through an initial convolutional layer followed by a custom attention module. Parallel max pooling and average pooling capture salient and contextual features, which are concatenated and refined via convolution to emphasize tumor-relevant regions.

Convolutional backbone and fusion
Attention-weighted features are forwarded to pre-trained backbones (MobileNetV2, EfficientNetV1, or Inception-ResNet-V2). High-level convolutional layers are logically fused to reduce memory access and improve computational efficiency.

Classification
Flattened features are passed through fully connected layers with ReLU6 activation and dropout, producing a compact representation for final four-class softmax classification.

Evaluation
Model performance is assessed on the test set using accuracy, precision, recall, F1-score, and confusion matrices.

Framework development
The proposed solution is implemented in Python and uses Keras for execution. Table 1 illustrates the hyperparameters. The dataset is split into a training set and a test set following a 70:30 ratio. Five different arbitrary splits of trains/tests are used to display the final balanced performance for each data set.

Preprocessing
The input images must be updated because the MobileNetV2 framework serves as the foundation for the proposed solution. To extract high-resolution features from photographs, the pre-trained MobileNetV2 model is used with its input dimension. Each input image is then scaled to 224×224 pixels in the range [-1, 1].

The convolution model
MobileNetV2 enhances image recognition by leveraging an efficient Convolutional Neural Network (CNN) architecture designed to minimize computational demands. While traditional CNNs achieve high accuracy, they often require substantial memory and processing power. MobileNetV1 introduced the concept of depthwise separable convolution, which separates standard convolution into two distinct operations: depthwise convolution for filtering inputs and pointwise convolution for integrating features. MobileNetV2 builds on this idea by incorporating bottleneck residual blocks that consist of expansion layers, depthwise convolution, projection layers, and residual connections. The projection layer compresses feature channels, while residual connections facilitate better information flow throughout the network. To improve stability and enhance learning performance, ReLU6 activation and batch normalization are applied after convolutional operations.

In this research, MobileNetV2, pre-trained on ImageNet, was used as the backbone model to extract features, delivering effective high-level semantic representations while keeping computational costs low for brain tumor classification. After every convolution layer, there is a ReLU6 activation layer, which is an adaptation of the ReLU activation function, where the size is maximized at six, and a batch normalization layer. The common 1x1 convolution, average pooling, and classification layers are applied to 17 of the remaining bottleneck blocks, forming the full MobileNetV2 architecture. We used MobileNetV2 as the backbone network pre-trained on ImageNet. In such a case, the convolutional map is obtained from the last residual block after passing through the MobileNetV2 convolutional layer. Lower-level residual blocks produce smaller feature maps. Such blocks do not contribute to our research because they do not collect high-level data for overall image identification. During model building and training, the layers preceding the convolutional layers that generate a 7 × 7 3D feature map are kept fixed. In mathematical terms, this is expressed as below in Eq (1):

F1(I) = Conv(I)     (1)

Here, F1(I) represents the convolutional feature extracted from the input image, I.

The focus module
The human brain's attention mechanism, which implies that people naturally focus more on significant visual inputs than on every detail in an image, serves as the basis for this transformation network's design. Numerous attention-based models have been created in deep learning research because of this idea. The spatial correlations seen in brain tumor representations are highlighted by the suggested attention mechanism. While the channel attention module captures the most important tumor-related information across feature channels, the regional attention unit identifies the most informative regions of the MRI image. Using a structured attention method, the suggested focus unit focuses on areas that contain discriminative tumor information.

To improve feature representation, techniques such as Top Activation Pooling and balanced feature extraction are used prior to the spatial feature detection phase. This strategy enhances the model's ability to emphasize clinically significant tumor regions while minimizing irrelevant background details, thereby improving classification accuracy and the efficiency of feature learning. The second is the concatenation of the max-pooled and average-pooled tensors. Lastly, the sigma activation function, combined with a 7x7 convolutional filter, shall be used to activate visual stimuli within the visuals. The different stages of the focus module are indicated in equations (2) and (3). where balanced Pool(F) ∈ RHxWx1 represents the average pooling operation and MaxPool(F) ∈ RHxWx1 describes the max pooling operation.

F2(I) = [AvgPool(F);MaxPool(F)]      (2)

These two element maps can be combined in 3D to create an element map

F2(I) = ∈ RHxwx1. F3(I) = σ(f7x7(F2(I)))        (3)

where σ is the activation function indicating sigma. The attention characteristics, which are represented by a HxWxC Height-encoded tensor (V), breadth (W), and thickness (C), are represented by F3(I), while f7x7 represents the filter size convolution operation (7x7).

Fusion of attention and a convolution model
In contrast to a network that relies on a single encoder, a multimodal Merging Unit could extract much more efficient and comprehensive information for the vast majority of modalities. The fusion block is intended to guide toward the maximum essential Cross-modal features; hence, it will pinpoint areas of attention for Tumor region extraction. This is a simple concatenation of individual latent representations, but some information would be lost. A combined object map was thus generated by combining the feature maps of the convolution and observation modules using the basic feature concatenation method of Sitaula et al. These two feature maps captured differences in various image properties, so we decided to use a simple concatenation method rather than max, min, or sum-based strategies. This also makes it computationally lighter than the alternative methods that use bilinear methods as a form of tensor product computation. When such two features are combined, the resultant is called a feature tensor. The mathematical expression of the aggregated tensor output of characters T is given by Equation (4).

[F1(I), F3(I)] = T(I)        (4)

Where F1(I) ∈ RHxWx1 and F2(I) ∈ RHxWx1280. These are 3D tensors with the same width (W) and height (H). Further, they can be concatenated in 3D k creation of 3D tensors, where T(I) ∈ LxWx1281.

Fully Connected Layers (FC)
We used a series of FC layers after feature fusion to convert a volumetric tensor reshaped into a linear feature vector. The classification head consists of a Global Average Pooling layer, fully connected dense layers, dropout regularization, and a Softmax output layer. The ReLU6 activation function is used, with 128 units and a dropout probability of 50%.

Access restricted. Please log in or start a trial to view this content.

Results

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Three pre-trained deep learning models, namely MobileNetV2, EfficientNetV1, and Inception-ResNet-V2, were evaluated for four-class brain tumor classification using MRI images.

Dataset Used
The proposed framework was evaluated using a publicly available brain tumor MRI dataset obtained from the Kaggle platform. The dataset consisted of 835 normal brain MRI images, 826 glioma images, 822 meningioma images, and 827 pituitary tumor images. Representative MRI samples from the d...

Access restricted. Please log in or start a trial to view this content.

Discussion

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The performance evaluation, based on accuracy, recall, F1-score, and precision, reveals that both MobileNetV2 and Inception-ResNet-V2 achieve comparable results in brain tumor classification, each attaining an aggregate and weighted-average accuracy of 97–98%. In contrast, EfficientNet outperforms the other models, achieving 99% accuracy across macro- and weighted-average metrics, thanks to its enhanced generalization and compound scaling strategy. These findings are consistent with previous studies demonstrating t...

Access restricted. Please log in or start a trial to view this content.

Disclosures

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

The authors have no conflicts of interest to declare.

Acknowledgements

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

No external funding was received for this study.

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Brain MRI DatasetIEEEhttps://dx.doi.org/10.21227/q2vt-tf46The dataset is downloaded with institutite access. The MRI dataset contains four classes: glioma, meningioma, pituitary tumor, and normal brain
CNN Accelerator (Layer Fusion)Proposed workLogical fusion of top convolutional layers to reduce memory access and improve computational efficiency
Custom Attention ModuleProposed workAttention mechanism integrating max-pooling and average-pooling to emphasize tumor-relevant regions
EfficientNetV1GooglePre-trained (ImageNet)Scalable CNN architecture providing optimal accuracy–efficiency trade-off
Google ColaboratoryGooglehttps://colab.research.google.com/Cloud-based environment used for model training, evaluation, and experimentation with GPU support
Inception-ResNet-V2GooglePre-trained (ImageNet)Deep hybrid CNN architecture combining Inception modules with residual connections
KerasGooglev2.6.0High-level neural network API built on TensorFlow for rapid model prototyping
MatplotlibMatplotlib Developersv3.4.3Visualization library used for plotting training curves, confusion matrices, and performance metrics
MobileNetV2GooglePre-trained (ImageNet)Lightweight CNN backbone optimized for mobile and edge deployment
NumPyNumPy Developersv1.21.4Core scientific computing library used for numerical operations
PandasPandas Development Teamv1.3.4Data handling and manipulation library used for dataset organization and metadata processing
PythonPython Software Foundationv3.8.10Primary programming language used for data preprocessing, model development, and evaluation
Scikit-learnScikit-learn DevelopersLatest stableUsed for performance evaluation metrics such as precision, recall, F1-score, and confusion matrices
SeabornSeaborn DevelopersLatest stableHigh-level statistical visualization library used for enhanced graphical analysis
TensorFlowGooglev2.6.0End-to-end deep learning framework used for implementing CNN backbones and attention modules

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

Cancer ResearchMobileNetV2EfficientNetV1Inception ResNet V2

Related Articles