Abstract
Brain tumor classification from magnetic resonance imaging is an important task in computer-aided diagnosis because tumor appearance varies substantially across cases. This study proposes a hybrid deep learning model—namely, BrTxNet—for binary brain tumor classification based on EfficientNetB0 and VGG16. Single-backbone and hybrid configurations were evaluated using a group-aware balanced dataset. Two hybrid fusion strategies were examined: direct concatenation and feature-level learnable fusion. The proposed model projects and adaptively weights features from both branches before classification. Experimental results showed that the learnable fusion model achieved the best performance, reaching 98.79% accuracy and 99.93% ROC-AUC with strong sensitivity and specificity. Furthermore, Grad-CAM and t-SNE analyses support the interpretability and discriminative power of the learned fused representations.
1. Introduction
Brain tumors are among the most critical neurological disorders because delayed or inaccurate diagnosis can seriously affect treatment planning and patient outcomes. Magnetic resonance imaging (MRI) is widely used for brain tumor evaluation due to its ability to provide comprehensive structural information about soft tissues without using ionizing radiation [1]. Nevertheless, the imaging appearances of brain tumors in MRI scans may vary considerably in size, shape, location, and internal texture, making manual interpretation difficult and time-consuming. Therefore, there is an increasing need for reliable computer-aided diagnostic systems that can support specialists in the accurate classification of brain MRI images [2].
Recent advances in deep learning have substantially improved brain tumor analysis from MRI, particularly in classification tasks based on convolutional neural networks and transfer learning [3]. Specifically, review studies have shown that deep learning methods are increasingly used for brain tumor segmentation, quantification, and classification, with transfer learning becoming especially important when medical datasets are relatively limited in size [4]. In this context, several pre-trained backbone architectures, including VGG-based, ResNet-based, DenseNet-based, and EfficientNetB0-based models, have demonstrated promising classification performance after adaptation to brain MRI data. These models benefit from transferring visual representations learned from large-scale natural image datasets which can improve feature extraction and generalization in medical imaging applications [5].
In addition to single-backbone approaches, many studies have also explored hybrid and explainable deep learning models to combine complementary representations extracted from multiple architectures and improve the interpretability of classification decisions [6]. Hybrid transfer learning and explainable models have produced strong results for brain tumor MRI classification, suggesting that feature fusion and branch complementarity can enhance robustness beyond what is achievable with a single backbone alone [7]. However, the reported gains still depend strongly on the selected backbones, the adopted fusion mechanism, and the extent to which the model is adapted to the MRI domain. This indicates that further investigation is needed into more selective fusion strategies that can integrate complementary features while preserving interpretability [8].
Despite these advances, many deep learning approaches for brain tumor MRI classification still face several limitations, including dependence on single-backbone architectures, non-adaptive feature fusion methods, and limited interpretability analysis. To address these challenges this study proposes a hybrid deep learning model combining EfficientNetB0 and VGG16 for binary brain tumor MRI classification. The model evaluates single and hybrid backbone configurations, selective fine-tuning strategies, and multiple fusion methods, including direct concatenation, learnable feature fusion, and attention-enhanced fusion. Additionally, Grad-CAM and t-SNE are utilized to improve model interpretability and analyze the separability of the learned feature representations.
The main contributions of this study are summarized as follows:
- A hybrid BrTxNet model based on EfficientNetB0 and VGG16 CNN architectures is proposed for binary brain tumor MRI classification.
- An adaptive feature-level learnable fusion mechanism is introduced to weight the projected features from both branches before classification.
- A leakage-aware evaluation pipeline is adopted using duplicate removal, pHash, SSIM verification, group-aware splitting, and train-only augmentation.
- Grad-CAM and t-SNE analyses are used to support model interpretability and feature-space separability.
2. Proposed Methodology
2.1. Dataset Description
The experiments in this work used the publicly available BR35H: Brain Tumor Detection 2020 dataset from Kaggle [9]. For the binary classification task studied in this work, only the yes and no folders were used. These folders contain brain MRI images of tumors and no tumors, respectively. The first binary subset had 3000 images, 1500 of which had tumors and 1500 of which did not. Before training and testing the model. all images were resized to 224 × 224 pixels to make sure they worked with the transfer learning backbones that were chosen. Figure 1 shows the overall workflow of the proposed model.
Figure 1.
Overall workflow of the proposed BrTxNet model for brain tumor MRI classification.
2.2. Dataset Preparation and Data Leakage Mitigation
Before model development, the original dataset was carefully examined to reduce redundancy and mitigate the risk of data leakage [10]. This inspection revealed only one exact duplicate pair in the no-tumor class, and one of the duplicated images was removed from the working dataset. After that, perceptual hashing (pHash) was applied to identify visually similar images. The similarity between two perceptual hash codes was measured using the Hamming distance given in (1). The initial pHash analysis identified 575 groups of visually similar images, indicating a considerable level of redundancy within the dataset.
where denotes the Hamming distance between two perceptual hash codes and . Smaller values indicate higher visual similarity between the corresponding images.
To further verify the true structural similarity of the candidate images identified by pHash, the structural similarity index measure (SSIM) was applied to the corresponding image pairs. A total of 1640 image pairs were evaluated, among which 736 pairs showed very high similarity with SSIM ≥ 0.95, resulting in 357 confirmed highly similar groups. The SSIM metric used in this study is given in (2) [11]. The SSIM analysis was performed using the structural_similarity function from the scikit-image package, version 0.25.2.
where μx and μy are the mean intensities of images x and y, σx2 and σy2 are the corresponding variances, and σxy is the covariance between the two images. Higher SSIM values indicate stronger structural similarity.
To reduce leakage risk one representative image was retained from each highly similar group while the remaining redundant images were excluded from the working dataset. After cleaning, the dataset contained 2480 images including 1423 tumor and 1057 no-tumor images. To prevent visually related images from appearing in different subsets, group-aware splitting was applied, resulting in 910/678 tumor/no-tumor images for training, 229/168 for validation, and 284/211 for testing. Because the training subset was still imbalanced, offline augmentation was applied only to the minority no-tumor class, producing a balanced training set of 910 tumor and 910 no-tumor images. The validation and testing subsets were kept unchanged and without augmentation to ensure unbiased evaluation. The final dataset statistics are summarized in Table 1.
Table 1.
Summary of dataset cleaning and final split.
2.3. Data Augmentation and Input Preprocessing
To improve the robustness of model training and reduce overfitting, data augmentation was applied only to the training subset. Preprocessing and augmentation strategies are commonly used in deep learning-based brain MRI tumor diagnosis to improve model generalization [12]. Light online augmentation included horizontal flipping, small rotations, zooming, and translations. In contrast, the validation and testing subsets were kept without augmentation to ensure an unbiased evaluation.
2.4. Baseline Models and Fine-Tuning Strategy
Initially, two transfer learning backbones were evaluated as single-model baselines, namely EfficientNetB0 and VGG16 [13,14]. In both cases, the original classification head was removed by setting include_top = False, and the extracted convolutional features were converted into compact feature vectors using global average pooling. A dropout layer and a final sigmoid classification layer were then added for binary tumor classification. In the initial baseline setting, each backbone was used in a frozen configuration to assess its direct transfer capability on brain magnetic resonance images.
To improve domain adaptation, selective fine-tuning was subsequently applied. For VGG16, only the layers of the final convolutional block were unfrozen, whereas for EfficientNetB0, only the upper convolutional blocks were selectively fine-tuned while keeping batch normalization layers frozen for training stability. This strategy allowed the models to adapt to the characteristics of brain MRI data without fully retraining all backbone layers. For the hybrid models, training was performed in two stages. First, only the newly added fusion and classification head layers were trained while the backbone branches remained frozen. Second, selective fine-tuning was applied to the upper layers of both branches using a smaller learning rate. The exact training hyperparameters are summarized in Table 2.
Table 2.
Main training hyperparameters.
2.5. Hybrid Learnable Fusion Model
The hybrid BrTxNet model was designed to combine the complementary feature extraction capabilities of EfficientNetB0 and VGG16 for binary brain tumor classification. The architecture of the proposed hybrid learnable fusion model is shown in Figure 2. In this architecture the same input brain magnetic resonance image is forwarded to two parallel branches where EfficientNetB0 and VGG16 act as feature extractors. After removing the original classification heads, deep convolutional features are extracted from both branches and converted into compact feature vectors through global average pooling. To make the extracted representations compatible for fusion, both feature vectors are projected into a shared latent space with the same dimensionality. This common embedding space enables the model to learn a more effective integration of global and local image characteristics before the final classification stage.
Figure 2.
Architecture of BrTxNet hybrid learnable model.
Instead of directly concatenating the projected feature vectors, the proposed model performs adaptive feature-level fusion by assigning trainable importance weights to the representations extracted from both branches. In this way, the network learns how much each feature dimension from EfficientNetB0 and VGG16 should contribute to the final fused representation. The weighted features from both branches are then combined and normalized before being forwarded to the classification head. Lastly, the fused representation is processed by a fully connected layer with dropout regularization followed by a sigmoid output neuron for binary classification. This design enables the model to exploit complementary information from both backbones in a more selective and discriminative manner than direct concatenation.
The mathematical form of the proposed feature-level learnable fusion is described in Equations (3)–(8).
where feff and fvgg denote the feature vectors extracted from the EfficientNetB0 and VGG16 branches respectively; zeff and zvgg are the projected feature representations in the shared latent space; and ReLU is the activation function.
Adaptive feature-wise importance weights are then learned for both projected vectors as follows:
where weff and wvgg are trainable feature-level weight vectors, and σ(⋅) denotes the sigmoid activation function.
The weighted features are computed and fused as:
where ⊙ denotes element-wise multiplication, and ffusion represents the final fused feature vector.
Lastly the binary output of the model is obtained as:
where y^ denotes the predicted tumor probability.
2.6. Trainable Model Configurations
The total trainable and non-trainable parameter counts of the proposed models are listed in Table 3.
Table 3.
Model configurations and parameter counts.
2.7. Explainability and Feature Space Visualization
To enhance the interpretability of the proposed model, Gradient-weighted Class Activation Mapping (Grad-CAM) was applied to the final hybrid model [7,15]. Because the adopted architecture consists of two convolutional branches, Grad-CAM was extracted separately from the EfficientNetB0 and VGG16 branches with respect to the final prediction, thereby providing branch-wise visual explanations of the classification decision. In addition, a merged heatmap was generated by combining the two branch-wise activation maps, in order to provide an overall visual interpretation of the hybrid model. For qualitative analysis, representative tumor and no-tumor test images were selected, and the resulting heatmaps were examined to assess whether the model focused on clinically relevant tumor regions while remaining relatively inactive for no-tumor cases.
To further analyze the discriminative quality of the learned fused representation, t-distributed stochastic neighbor embedding (t-SNE) was applied to the feature vectors extracted from the fusion layer of the final hybrid model. Before dimensionality reduction, the extracted features were standardized and reduced using principal component analysis to improve the stability of the t-SNE projection. The resulting two-dimensional embedding was then used to visualize the degree of separability between tumor and no-tumor samples in the learned feature space. This analysis provided additional qualitative evidence regarding the effectiveness of the proposed hybrid learnable fusion strategy.
3. Results and Discussion
This section presents the experimental results obtained from the evaluated single-backbone and hybrid models, followed by a discussion of the most important findings. The comparison focuses on classification accuracy, precision, recall, F1-score, receiver operating characteristic area under the curve, and specificity. In addition, the effect of selective fine-tuning, adaptive feature fusion, and interpretability analysis is discussed to highlight the contribution of the proposed model.
3.1. Performance of Single-Backbone Models
The first set of experiments was conducted to evaluate the performance of the single -backbone models—namely, EfficientNetB0 and VGG16—under frozen and fine-tuned settings. These experiments were intended to establish reliable baselines before moving to the proposed hybrid models. In the frozen configuration, EfficientNetB0 achieved better overall performance than VGG16, indicating stronger direct transfer capability to the brain MRI domain. However, after selective fine-tuning both models showed substantial improvement, with VGG16 exhibiting the largest gain in classification performance. These results confirm that selective adaptation of pre-trained backbones to MRI data is essential for achieving high classification accuracy and motivates the subsequent investigation of hybrid fusion strategies.
The quantitative results of the single-backbone models are summarized in Table 4. As shown, fine-tuning significantly improved both backbones with VGG16 showing the largest improvement over its frozen baseline.
Table 4.
Comparison Performance of the single-backbone models.
3.2. Hybrid Model Performance
Two hybrid configurations were evaluated, namely, direct concatenation and feature-level learnable fusion. The concatenation-based model demonstrated strong performance with perfect recall, highlighting the effectiveness of combining complementary features extracted from EfficientNetB0 and VGG16. Nevertheless, the proposed feature-level learnable fusion model achieved the best overall performance, indicating that adaptive feature weighting enables a more effective integration strategy than simple concatenation. A quantitative comparison of the hybrid models is provided in Table 5.
Table 5.
Performance of hybrid models.
Table 5 shows that the proposed hybrid learnable fusion model achieved the highest overall accuracy and the best balance between recall and specificity, making it the model finally selected in this study.
3.3. Ablation Study
To further assess the contribution of each design component, an ablation study was conducted on the evaluated model configurations. This analysis examined how the classification performance changed when moving progressively from fine-tuned single-backbone models to direct hybrid concatenation and then to the proposed learnable fusion model. This stepwise comparison provides a clearer understanding of the effects of dual-branch representation learning and adaptive feature-level fusion.
The ablation results are summarized in Table 6. As shown, the transition from single-backbone models to hybrid fusion models improved the overall classification performance. The proposed hybrid learnable fusion model achieved the best overall results, indicating that adaptive feature-level weighting provided a more effective integration of the complementary representations extracted from EfficientNetB0 and VGG16 than direct concatenation.
Table 6.
Ablation study of the model configurations.
3.4. Visual Performance Analysis
The training and validation accuracy and loss curves of the single-backbone models and hybrid models are shown in Figure 3. These visual results provide additional insight into convergence behavior and training stability across the different model configurations.
Figure 3.
Training and validation accuracy and loss curves for the evaluated models: (a) EfficientNetB0; (b) VGG16; (c) hybrid concatenation; (d) hybrid learnable fusion (BrTxNet).
In addition, the ROC curves of the strongest evaluated models are shown in Figure 4, while the corresponding confusion matrices are presented in Figure 5. The visual comparison confirms that the proposed hybrid learnable fusion model achieved the most balanced diagnostic behavior among the evaluated configuration.
Figure 4.
ROC Curves: (a) EfficientNetB0, (b) VGG16, (c) hybrid concatenation, (d) hybrid learnable fusion models.
Figure 5.
Confusion matrices: (a) EfficientNetB0, (b) VGG16, (c) hybrid concatenation, (d) hybrid learnable fusion models.
3.5. Explainability and Feature Space Analysis
To further analyze the discriminative quality of the learned fused representation, t-distributed stochastic neighbor embedding (t-SNE) was applied to the fused feature vectors extracted from the final hybrid model in order to examine class separability in the learned feature space. The resulting two-dimensional embedding showed a clear separation trend between tumor and no-tumor samples, indicating that the proposed feature-level learnable fusion mechanism generated a discriminative representation suitable for binary classification. The t-SNE visualization of the fused feature representations is shown in Figure 6.
Figure 6.
t-SNE visualization of fused features from the BrTxNet hybrid learnable fusion model.
Grad-CAM was used to evaluate the interpretability of the selected hybrid model on tumor and no-tumor test images. The VGG16 branch produced more localized activation regions while EfficientNetB0 generated broader but still relevant responses. The combined heatmaps indicated that the model focused on tumor-related areas in positive cases and showed minimal activation for negative cases. Taken together with the t-SNE analysis, these results confirm that the model learns meaningful and well-separated feature representations, as illustrated in Figure 7.
Figure 7.
Grad-CAM heatmap visualization of the BrTxNet model predictions. Warmer colors indicate higher model activation and stronger contribution to the prediction, whereas cooler colors indicate lower activation.
3.6. Performance Comparison with Related Studies
To further contextualize the obtained results, the proposed model was compared with selected recent brain tumor MRI classification studies that reported quantitative performance. The selected works include transfer learning, ensemble learning, hybrid CNN-based models, CNN–Transformer architectures, and explainable deep learning approaches. Because these studies used different datasets, class definitions, preprocessing procedures, and validation protocols, the comparison should be interpreted as a contextual performance analysis rather than a direct one-to-one benchmark. Table 7 summarizes the comparison with the most relevant related works.
Table 7.
Comparison with Recent Brain Tumor MRI Classification Studies.
As shown in Table 7, the proposed model achieved competitive performance compared with recent transfer learning, ensemble, hybrid CNN-based, CNN–Transformer, and explainable deep learning approaches. Although some related works reported comparable or higher accuracy, their results were obtained using different datasets and experimental settings. The proposed model remains superior while additionally incorporating leakage-aware dataset preparation, adaptive feature-level learnable fusion, and interpretability analysis using Grad-CAM and t-SNE. Therefore, its contribution is not limited to classification accuracy, but also includes a more controlled and interpretable evaluation pipeline for binary brain tumor MRI classification.
4. Conclusions
This study presents a new BrTxNet hybrid deep learning model for binary brain tumor MRI classification based on EfficientNetB0 and VGG16. Experimental results showed that selective fine-tuning significantly improved the performance of single-backbone models, while hybrid fusion further enhanced the overall classification capability. Among all evaluated configurations, the hybrid learnable fusion model achieved the best overall performance, with 98.79% accuracy, 97.93% precision, 100% recall, 98.95% F1-score, 0.99933 ROC-AUC, and 97.16% specificity. These findings indicate that adaptive feature-level fusion provides a more effective integration of complementary backbone representations than direct concatenation. Moreover, Grad-CAM and t-SNE analyses supported the interpretability and discriminative quality of the learned fused representation. Although the proposed hybrid learnable fusion model achieved the best performance, it required higher computational cost due to its dual-backbone architecture. The study was also limited to a single public dataset and binary classification. Future work will focus on external validation, multi-class tumor analysis, quantitative interpretability evaluation, and lightweight model design for faster and more efficient deployment.
Author Contributions
Conceptualization, G.A.A.-S.; methodology, all authors; data curation, S.A.-A.; formal analysis, all authors; investigation, all authors; project administration, G.A.A.-S.; software, S.A.-A.; supervision, G.A.A.-S.; validation, all authors; visualization, S.A.-A.; writing—original draft preparation, all authors; writing—review and editing, all authors. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The dataset used in this study is publicly available from the Kaggle repository “BR35H: Brain Tumor Detection 2020” at https://www.kaggle.com/datasets/ahmedhamada0/brain-tumor-detection (accessed on 26 May 2026).
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| MRI | Magnetic Resonance Imaging |
| SSIM | Structural Similarity Index Measure |
References
- Sheikh, M.A.A.; Dey, A.; Kole, A. A deep transfer learning and ensemble learning framework for brain tumor detection and classification in MRI images. Discov. Artif. Intell. 2026, 6, 859. [Google Scholar] [CrossRef] [Scilit]
- Nahiduzzaman, M.; Abdulrazak, L.F.; Kibria, H.B.; Khandakar, A.; Ayari, M.A.; Ahamed, M.F.; Ahsan, M.; Haider, J.; Moni, M.A.; Kowalski, M. A hybrid explainable model based on advanced machine learning and deep learning models for classifying brain tumors using MRI images. Sci. Rep. 2025, 15, 1649. [Google Scholar] [CrossRef] [Scilit]
- Saeedi, S.; Rezayi, S.; Keshavarz, H.; Niakan Kalhori, S.R. MRI-based brain tumor detection using convolutional deep learning methods and chosen machine learning techniques. BMC Med. Inform. Decis. Mak. 2023, 23, 16. [Google Scholar] [CrossRef] [Scilit]
- Mohammed, S.J.; Al-Suhail, G.A. Explainable AI-based Deep Learning for Brain Tumor MRI Analysis: A Review. In Proceedings of the 2025 6th International Conference on Communications, Information, Electronic and Energy Systems (CIEES), Ruse, Bulgaria, 26–28 November 2025. [Google Scholar] [CrossRef] [Scilit]
- Alahmed, H.A.; Al-Suhail, G.A. Exploring Transfer Learning Techniques for Brain Tumor Diagnosis in MRI Data. In Proceedings of the 2024 1st International Conference on Emerging Technologies for Dependable Internet of Things (ICETI), Sana’a, Yemen, 25–26 November 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1–8. [Google Scholar] [CrossRef] [Scilit]
- Talukder, M.A.; Islam, M.M.; Uddin, M.A.; Layek, M.A.; Acharjee, U.K.; Bhuiyan, T.; Moni, M.A. A deep ensemble learning framework for brain tumor classification using data balancing and fine-tuning. Sci. Rep. 2025, 15, 35251. [Google Scholar] [CrossRef] [Scilit]
- Iftikhar, S.; Anjum, N.; Siddiqui, A.B.; Rehman, M.U.; Ramzan, N. Explainable CNN for brain tumor detection and classification through XAI based key features identification. Brain Inform. 2025, 12, 10. [Google Scholar] [CrossRef] [Scilit]
- Celik, F.; Celik, K.; Celik, A. Enhancing brain tumor classification through ensemble attention mechanism. Sci. Rep. 2024, 14, 22260. [Google Scholar] [CrossRef] [Scilit]
- Hamada, A. Br35H: Brain Tumor Detection 2020, Kaggle Dataset Repository, 2020. Available online: https://www.kaggle.com/datasets/ahmedhamada0/brain-tumor-detection (accessed on 26 May 2026).
- Yagis, E.; Atnafu, S.W.; García Seco de Herrera, A.; Marzi, C.; Scheda, R.; Giannelli, M.; Tessa, C.; Citi, L.; Diciotti, S. Effect of data leakage in brain MRI classification using 2D convolutional neural networks. Sci. Rep. 2021, 11, 22544. [Google Scholar] [CrossRef] [Scilit]
- Dohmen, M.; Bürgin, T.; Arens, M.; Koren, J.P.P.; Maier, A. Similarity and quality metrics for MR image-to-image translation. Sci. Rep. 2025, 15, 5683. [Google Scholar] [CrossRef] [Scilit]
- Musthafa, N.; Memon, Q.A.; Masud, M.M. Advancing Brain Tumor Analysis: Current Trends, Key Challenges, and Perspectives in Deep Learning-Based Brain MRI Tumor Diagnosis. Eng 2025, 6, 82. [Google Scholar] [CrossRef] [Scilit]
- Lin, J.; Huang, L.; Ding, L.; Yan, S. Deep Brain Tumor Lesion Classification Network: A Hybrid Method Optimizing ResNet50 and EfficientNetB0 for Enhanced Feature Extraction. Fractal Fract. 2025, 9, 614. [Google Scholar] [CrossRef] [Scilit]
- Younis, E.M.; Ibrahim, I.A.; Mahmoud, M.N.; Albarrak, A.M. Hybrid of VGG-16 and FTVT-b16 Models to Enhance Brain Tumors Classification Using MRI Images. Diagnostics 2025, 15, 2014. [Google Scholar] [CrossRef] [Scilit]
- Gundogan, E. A Novel Hybrid Deep Learning Model Enhanced with Explainable AI for Brain Tumor Multi-Classification from MRI Images. Appl. Sci. 2025, 15, 5412. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








