Figures
Abstract
Due to the substantial impact of brain tumors on human health, precise identification of tumor types is vital for patient prognosis and guiding treatment decisions. Magnetic Resonance Imaging (MRI) technology, owing to its non-invasive nature and high resolution, is indispensable in accurately classifying brain tumor types. However, manual interpretation of MRI images is not only time-consuming and labor-intensive but also susceptible to subjective bias. Hence, many automatic brain tumor diagnosis systems utilizing deep learning techniques have been developed. This paper introduces an advanced modularized Convolutional Neural Network (CNN) that incorporates ConvDAtt block, Complementary Information (CI) downsampling block, and Spatial Pyramid Pooling (SPP) block. Firstly, the ConvDAtt block combines convolution, depth-separable convolution and Coordinated Attention (CA) mechanism. The module alleviates the gradient vanishing problem in deep neural network training, enhancing the training stability and performance of the model. In the ConvDAtt block, the CA mechanism can not only capture information across channels, but also sense direction and position sensitive information, improving the accuracy of the model’s identification of objects of interest. Secondly, the CI block is a downsampling block with convolution and pooling functions. In the CI block, there is a complementary relationship between the pooling layer and the convolution layer, which is mainly reflected in two aspects, feature extraction and dimensionality reduction, enlargement of receptive field. Moreover, the complementary relationship can solve the problem of information loss in the process of downsampling, while also significantly reducing computational cost. Thirdly, the SPP block extracts features from different scales of the input data and integrates these features, thus enhancing the performance of the network, and enhancing the robustness of the model. The combination of ConvDAtt block, CI block and SPP block can effectively extract the information features and discriminant features of brain tumor MRI images, which has the advantages of parameter reduction, stable training and clear structure.
Citation: Zhang J, Cai C, Tan X, Chen W, Zhao X, Du G, et al. (2026) An efficient brain tumor classification system with accurate recognition and complementary downsampling blocks. PLoS One 21(9): e0343457. https://doi.org/10.1371/journal.pone.0343457
Editor: Ali Mohammad Alqudah, University of Manitoba, CANADA
Received: October 31, 2024; Accepted: September 15, 2026; Published: September 30, 2026
Copyright: © 2026 Zhang et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: The datasets used are free and open. Dataset Chen from figshare(https://figshare.com/articles/dataset/Chen/28533134?file=55975439). Dataset Kaggle from figshare(https://figshare.com/articles/dataset/Kaggle/28533164?file=52781087). The Dataset Brain Tumor MRI from figshare (https://figshare.com/articles/dataset/The_Dataset_Brain_Tumor_MRI/28533221?file=52782272). Our model code can be found in the following web site: https://figshare.com/articles/software/CODE/28537058?file=52799603.
Funding: This research is funded by the Major Science and Technology Projects of Henan Province (No. 221100210500), the Foundation of Henan Educational Committee (No. 24A320004), the Medical and Health Research Project in Luoyang (No. 2001027A), and the Construction Project of Improving Medical Service Capacity of Provincial Medical Institutions in Henan Province (No. 2017-51).Role of Funder statement: The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
1. Introduction
Brain tumors are primarily categorized into two distinct types, primary brain tumors and brain metastases. Surgical intervention, particularly complete resection, is often regarded as the optimal approach for managing this condition [1]. Prior to treatment, a thorough evaluation of the tumor is imperative to ensure the effectiveness of the therapeutic intervention. MRI, a widely utilized imaging technique for elucidating the shape, size, and location of brain tumors, holds a crucial role in this assessment [2]. However, the analysis of MRI images requires professional expertise, rendering it a potentially error-prone process. Therefore, research on automatic diagnosis of brain tumors is of great significance to patients, doctors, technicians and hospitals [3].
Traditional Machine Learning (ML) algorithms have long been prevalent in the medical field and widely employed [4]. For example, Twinkle Bansal et al. [5] have combined the Grayscale Covariance Matrix (GLAM) technique with shape features to comprehensively and accurately extract mixed tumor region characteristics and a hybrid classification strategy incorporating Random Forest (RF), K-Nearest Neighbors (KNN), and Decision Tree (DT) classifiers has been employed to enhance classification accuracy and stability. In [6], the Gray Level Co-occurrence Matrix (GLCM) and Gray Level Run Length Matrix (GLRLM) were utilized to extract image features. Then, a Probabilistic Neural Network (PNN) classifier was utilized to categorize MRI brain images. In [7], multiple supervised machine learning were compared in depth to assess their actual effectiveness for internal effectiveness and accuracy in predicting clinical events. In [8], ML algorithms have been applied to predict the development of cancer symptoms and have successfully identified predictors of these symptoms. In [9], the categorization of brain tumors was successfully accomplished through the integration of various techniques, Discrete Wavelet Transform (DWT), Principal Component Analysis (PCA), Feedforward Backpropagation Artificial Neural Network (FP-ANN), and the KNN classifier. These algorithms heavily rely on hand-crafted features, resulting in time-consuming processes prone to errors [10].
Convolutional Neural Networks(CNNs) have effectively addressed this issue by autonomously learning invariant features, showcasing superior performance and gaining wide application [11]. Recently, CNNs have yielded outstanding outcomes in brain tumor classification. In [12], a CNN is used to classify primary brain tumors. To screen out the best-performing models, a series of experiments were designed and conducted. Finally, a CNN architecture with an overall performance of 96% was successfully built. Roy et al. [13] conducted in-depth comparative analysis of simple artificial neural networks including basic CNNs and extended CNNs. The experimental results show that extended CNN exhibits excellent performance in classification tasks, with an accuracy rate of 97%. G. Vidya Sagar et al. [14] introduced a residual learning technique tailored for brain tumor classification, involving three core steps, preprocessing, feature extraction, and classification. In [15], a technique for training CNN was introduced, employing a class-weighted focal loss approach. In addition, in order to further improve the effectiveness of the classifier, this study utilized the integrated features of multiple CNN models. In [16], the proposed framework adopted transfer learning, wherein deep features were extracted from MRI images using a pre-trained deep convolutional neural network. Subsequently, these features undergone evaluation with multiple machine learning classifiers, and the top three best-performing classifiers were selected and integrated into a deep feature set to enhance feature representation and classification accuracy. In [17], a stacked modeling strategy was proposed, which significantly improved the final accuracy of the model and effectively overcame the challenge of insufficient labeled training data. Three CNN architecture models namely VGG19, Inception V3, and ResNet101 have been adequately trained on medical image datasets and were used in this study. Khan et al. [18] proposed a model that adds three additional layers to the MobileNet backbone and integrates residual learning, while replacing the ReLU activation function with Swish to improve information retention and feature representation. This model achieved an accuracy of 96.94% on the Figshare multi-class classification dataset.
In order to further improve the accuracy of the model, many novel models have appeared in recent years. For example, in [19], DenseNet201, ResNet152V2, and InceptionResNetV2 were utilized as pre-trained models, forming a stacked ensemble model to enhance generalization ability. In [20], six optimization algorithms were combined with two classifiers, softmax and Support Vector Machine (SVM). The best performance was observed when the softmax classifier was combined with the Nesterov Accelerated Adaptive Moment Estimation (Nadam) optimizer. Muhammad Irfan et al. [21] used multiple pre-trained models (ResNet50, VGG16, VGG19 and U-Net) to classify brain tumors or no tumors. Among the pre-trained models compared, the U-Net model showed excellent performance with an accuracy of 95%. Bala Venkateswarlu Isunuri et al. [22] proposed an Ensemble Coupled Convolutional Network (ECCN) model designed specifically for classifying three distinct types of brain tumors. This proposed model was evaluated on the REMBRANDT dataset, demonstrating an accuracy rate of 96.95%. Gomez-Guzman et al. [23] conducted an evaluation of seven deep convolutional neural network (CNN) models in the context of brain tumor classification, with one model being generic and the remaining six being pre-trained. Amongst all the models compared, InceptionV3 emerged as the superior model, achieving an impressive average accuracy of 97.12%. Trisheela et al. [24] utilized VGGNet for feature extraction, employed Invasive Weed Optimization (IWO) to select the most relevant features, and utilized an enhanced DarkNet-53 deep learning (DL) model to classify brain tumors. The model achieved an accuracy of 95% on a dataset consisting of 3,264 MRI scan images. Tariq et al. [25] achieved an accuracy rate of 96% on the brain tumor MRI dataset by combining EfficientNetV2 for efficient feature extraction and Vision Transformer (ViT) for capturing global contextual information, and applying geometric mean ensemble learning to integrate the predictions from both models.
Clinically, the precise identification of brain tumor types directly informs treatment planning, surgical strategy, and prognostic evaluation. However, manual MRI interpretation is labor-intensive and subject to inter-observer variability, which poses significant challenges in time-sensitive clinical environments. Therefore, developing an automated and reliable classification system holds great potential to address these challenges in clinical practice. In this paper, we propose a modular deep convolutional neural network specifically designed for high-accuracy, multi-class brain tumor classification. The network incorporates three key components: the ConvDAtt block, which combines convolution, depth-separable convolution, coordinate attention (CA), and residual connections to enhance feature extraction and training stability [26], the Complementary Information (CI) downsampling block, which exploits the complementary strengths of convolution and pooling to preserve rich feature information during downsampling, and the Spatial Pyramid Pooling (SPP) block, which captures multi-scale spatial information and aggregates it into a fixed-length feature vector [27]. This modular design not only achieves state-of-the-art classification accuracy but also significantly reduces computational overhead, thereby serving as a promising methodological framework that could potentially inform future clinical decision-support systems, pending rigorous prospective validation in real-world settings. The effectiveness of the proposed method is extensively validated on two public benchmark datasets, consistently demonstrating substantial advantages over existing approaches. It introduces an efficient modular brain tumor classification network [28] that improves classification accuracy through the synergistic interaction of multiple modules, showing strong potential as a reliable auxiliary system for computer-aided diagnosis. The contribution of this research includes the following aspects:
- A novel modular convolutional neural network is proposed for brain tumor image classification from MRI.
- The ConvDAtt block, integrating convolution, depth-separable convolution, CA mechanism, and residual connectivity, is proposed to enhance network performance and training efficiency. The introduction of CA mechanism [29] helps the network to extract key features from the original data, thus improving the performance of the model.
- The CI downsampling block leverages the complementary strengths of convolution and pooling to preserve rich spatial information during downsampling, while also substantially improving computational efficiency.
- The SPP block is employed to capture multi-scale spatial information from input feature maps, which further strengthens the model’s robustness against image quality degradation.
- The proposed method demonstrates superior effectiveness and accuracy compared to prior art methods, as evidenced by experimental results using two public datasets.
The structure of this article is as follows: Section 2 elaborates on the proposed method in detail, Section 3 presents the experimental results, Section 4 conducts an in-depth discussion of the results, and Section 5 summarizes the article.
2. Materials and methods
2.1. Datasets
This paper conducts a series of experiments aimed at classifying brain tumors using publicly available MRI datasets. The dataset, sourced from Cheng et al.[30], comprises 3064 grayscale brain MR images categorized into three groups, 708 meningioma samples, 1426 glioma samples, and 930 pituitary tumor samples. In addition, experimental data sets consisting of 3264 grayscale brain MR images from the Kaggle platform [31] were also used. This dataset categorizes images into four groups, meningiomas, gliomas, pituitary tumors and normal tumor-free samples, with respective sample counts of 940, 926, 901 and 497. The inclusive categorization encompasses normal tumor-free samples, augmenting the study’s utility. Representative images are depicted in Fig 1, showcasing various brain tumor morphologies and characteristics. For model assessment, each dataset is split into training and testing sets in an 80/20 ratio to ensure sufficient data for model learning and independent validation. Table 1, showing details of the two datasets, provides a clear basis for subsequent analysis and discussion.
2.2. Preprocessing
The Chen dataset comprises grayscale images uniformly sized at 512 × 512 pixels. To ensure compatibility and computational efficiency, preprocessing was conducted [32]. Initially, all images were resized uniformly to 224 × 224 pixels, aligning them with the input requirements of the deep learning model. Subsequently, considering the model’s expectation of receiving three-channel RGB input, the original grayscale images were transformed into three-channel RGB format by duplicating the grayscale values across the RGB channels. For the Kaggle dataset, inconsistencies exist in image size and color space, with some being grayscale and others RGB. To ensure data consistency and model training stability, similar preprocessing steps were applied. Specifically, all images were uniformly resized to 224 × 224 pixels, and grayscale images were converted to the three-channel RGB format. This standardization of image size and color space across both datasets facilitates subsequent deep learning model training.
2.3. Classification system
The proposed brain tumor classification network, designed with a modular approach, efficiently captures informative and discriminative features from brain tumor MRI images. The network is specifically constructed to preserve significant spatial features in brain MRI images, ensuring the integrity and accuracy of essential information. Considering the importance of key features and capturing multi-scale spatial information in brain tumor MRI image classification, the CA mechanism and spatial pyramid pool are utilized to further improve classification accuracy. The integration enables the network to better discern and differentiate between different types of brain tumors.
Fig 2 illustrates the overarching framework of the proposed brain tumor classification system. The dataset is divided explicitly into training and testing sets, with no overlap between them. The model is trained on the training set, and the trained model is saved to the disk. Subsequently, it loads the saved model to classify the testing set and evaluates its classification performance.
Fig 3 depicts the schematic diagram of the proposed network architecture. Initially, the number of feature channels is increased by sequential convolutional layers (referred to as conv blocks). Subsequently, the spatial dimensions of the feature maps are reduced by the CI layer. Following this, the ConvDAtt layer conducts feature extraction and transformation, followed by further reduction in feature map size with the CI layer. Subsequently, the network undergoes three iterative cycles, facilitating additional feature fusion and downsampling. The SPP layer then captures multi-scale spatial information from the input feature mapping. This layer maps the feature pool into a fixed-size output. Finally, the flattened feature maps are fed into a fully connected layer for classification. The ConvDAtt layer can effectively extract features and enhance the network’s focus on important features. Secondly, the CI layer realizes the size reduction and feature fusion of the feature graph, which not only preserves the spatial details, but also enriches the feature representation, which is crucial to improve the performance of the neural network. In sections 2.31 and 2.32, the functionality and operations of two key layers, the ConvDAtt layer and the CI layer, are explored.
2.3.1. ConvDAtt block.
The ConvDAtt module is illustrated in Fig 4. The input data first passes through Conv1, followed by depth-separable convolution, the CA attention mechanism, Conv2, and finally a residual connection.
Initially the Conv1 layer is used. This convolutional layer is designed to extract effective features from the input data. Subsequently, a depth-separable convolution is used to reduce the number of parameters and improve the computational efficiency of the model.
Subsequently, the Coordinate Attention (CA) mechanism is employed. Because traditional attention mechanisms (e.g., SENet, ECANet) rely on global pooling, it is commonly used in channel attention to encode spatial information. However, global pooling compresses spatial information into a single channel descriptor, making it difficult to retain positional cues, which are essential for capturing spatial structures in visual tasks. In contrast, the CA mechanism enhances spatial feature recognition by embedding precise positional information into channel attention. The structure of the CA module is illustrated in Fig 5.
To enable attention blocks to more effectively capture long-range spatial dependencies with accurate positional information, the CA mechanism splits the computational process of channel attention into two independent directional components using a 1D feature encoding operation. Specifically, given an input , two pooling kernels with spatial extents of (H, 1) and (1, W) are applied to encode each channel along the horizontal and vertical axes, respectively. Thus, the output of the a-th channel with height h is shown in Equation (1):
Similarly, the output of the a-th channel of width w is shown in Equation (2):
These two transformations enable the attention blocks to effectively capture long-range dependencies along one spatial axis while preserving precise positional information along the other, thereby enhancing the network’s ability to accurately localize objects of interest. Subsequently, the aggregated feature maps generated by Equation 1 and Equation 2 are first connected and then passed through the shared 1 × 1 convolutional transform function to produce the final combined representation shown in Equation (3):
where [-,-]denotes the concatenation operation along the spatial dimension, δ is a nonlinear activation function, and is an intermediate feature map used to encode spatial information in both the horizontal and vertical directions. Here, r is the reduction ratio for controlling the block size. The feature map f is then partitioned into two independent tensors,
and
, along the spatial dimension. Next, two 1 × 1 convolutional transforms
and
are utilized to transform
and
, respectively, into tensors with the same number of channels as the input X to obtain:
where denotes the sigmoid function, and the outputs
and
are applied as attention weights along the corresponding spatial dimensions, respectively. Finally, the output of the coordinate attention module, denoted as Y, is formulated as follows:
This process enables the model to dynamically adjust attention weights based on the importance of different regions, thereby enhancing its focus on salient feature areas.
Compared with traditional attention methods such as Squeeze-and-Excitation (SE) and Convolutional Block Attention Module (CBAM), which either ignore positional information or only capture local spatial dependencies, the CA mechanism provides a more efficient and comprehensive approach to capture inter-channel relationships and remote dependencies with precise positional information, improving spatial feature discrimination and thus helping the model to better classify brain tumor images.
Subsequently, Conv2 is employed to reduce the computational complexity of the model.
Finally residual connections were used to ensure that network information was not lost.
2.3.2. CI block.
The structure of the CI block is shown in Fig 6, which is designed to efficiently downsample the input data. Downsampling plays a crucial role in neural network architectures [33] to reduce the number of parameters and improve the generalization of the model. However, during the downsampling process, the model discards a portion of the data, which may lead to the loss of critical information. Therefore, convolution and pooling are proposed to complement each other to solve this problem.
The CI block is characterized by the complementary use of convolution and pooling. The convolutional layer captures detailed information such as edges in images through the sliding operation of convolution kernels on the input data. Conversely, the pooling layer diminishes the dimensionality of the feature map generated by the convolutional layer through max pooling, which effectively shrinks the feature map and mitigates data redundancy. This complementarity enables the network to fully extract useful information from images while also reducing computational complexity and storage requirements. Additionally, the complementarity is evident in the expansion of receptive fields. Due to the limited size of convolution kernels, the input region covered by a single convolutional layer (i.e., the receptive field) is also limited. However, the pooling layer enlarges the receptive fields of subsequent convolutional layers through downsampling, enabling the network to capture more global information.
2.4. Training CNNs
The training of a convolutional neural network comprises both forward and backward propagation stages. It commences at the input layer and progressively propagates information forward through the network structure. Subsequently, loss values are back-propagated layer by layer from the output layer to the first layer of the network. During this process, the i-th neuron in layer l receives input from neuron j in the preceding layer (i.e., layer l-1) and computes its output value through a series of computations. This process of calculation is handled by weighted summation and activation function, the weighted summation is shown in Equation (7).
where,represents the weights, and
denotes the bias term. Initially, we compute the weighted sum (
) of the variables to obtain an intermediate result. Then, the intermediate value undergoes processing through an activation function, with the Swish and ReLU activation functions, defined by Equations (8) and (9), respectively.
where, represents the output value after processing by the Swish activation function, and
is a constant parameter. Similarly,
denotes the output obtained by the ReLU activation function. The output values of each neuron in both the convolutional and fully connected layers are then precisely computed by using equations (8) and (9). The use of activation functions for the weighted values here is to convert the input values into nonlinear outputs so that the proposed model can learn and express complex features.
The primary objective of the cross-entropy loss function is to precisely evaluate the model’s prediction error. This is achieved by comparing the predicted probability distribution generated by the model with the true labeling distribution, as depicted in Equation (10). Utilizing the back-propagation mechanism, the function optimizes the model parameters, consequently enhancing the accuracy of prediction outcomes. This approach ensures both the objectivity of assessment and the reliability of model predictions.
During back propagation, the proposed model updates the weights based on the gradient of the loss function. The model weights are updated according to Equation (11).
where, the parameters ,
, and
significantly influence the learning algorithm’s performance throughout the iterative process. Specifically,
, representing the learning rate of layer l, directly influences the weight update magnitude, ensuring model convergence during training. Meanwhile,
governs the learning schedule, optimizing algorithm convergence by controlling the reduction rate of initial values. Furthermore, the interplay between the learning rate and
effectively characterizes the impact of previous weight updates on the current iteration, enhancing model generalization ability. The proposed model is optimized using this method to gradually reduce the error.
3. Results
3.1. System implementation and evaluation metrics
The experiments were conducted on a computer equipped with a 3.50 GHz CPU, 64.0 GB RAM, and an NVIDIA GeForce RTX 4070 Ti. All experiments were conducted in Python 3.10 environment. PyTorch 2.1.1 and TorchVision 0.16.1 are used to implement the proposed model.
The Adam optimizer was utilized for training with an initial learning rate of 0.001 for 60 iterations. The learning rate decayed by a factor of 0.1 every 10 iterations. The batch size was set to 32 samples. The value of network training hyperparameters are provided in Table 2 The performance of the proposed method was evaluated using accuracy, sensitivity, precision, specificity, and F1 score metrics, calculated as described below [34].
True Positives (TP) are referred to as the instances that are accurately identified as positive among all the tumor cases predicted as positive. Likewise, True Negatives (TN) are denoted as the cases that were indeed negative among those predicted as negative. Conversely, False Negatives (FN) indicate cases that were wrongly predicted as negative when they were actually positive. False Positives (FP) signify cases that were predicted as positive but were actually negative.
To ensure the robustness of our performance evaluation, we performed 10-fold cross-validation. The experimental results are presented in Table 3. The dataset was randomly partitioned into ten subsets of approximately equal size. In each fold, one subset was used as the validation set, and the remaining nine were used for training. This process was repeated ten times, resulting in ten accuracy scores. The mean accuracy of 98.04% and standard deviation of 0.98%, as presented in Table 3, demonstrate the stability of the proposed model.
The main steps of the brain tumor classification experiment include the training phase and the testing phase. The process unfolds as follows.
- The magnetic resonance imaging dataset is partitioned into mutually exclusive training and testing subsets.
- Augmentation techniques such as random rotation and horizontal flipping are applied to the training dataset to augment the image count and mitigate overfitting.
- A modular network is constructed, and its weights are initialized randomly using the default method.
- The network undergoes training with specified hyperparameter values.
- Upon completion of training, the model is saved to disk.
- Finally, model evaluation is conducted using various metrics on the designated test dataset.
3.2. The ablation study
To assess the impact of each module on the proposed model, a series of experiments were conducted and the effect of combining different blocks was detailed in Table 4. Firstly, the basic model Baseline was used. Then, the ConvDAtt module was integrated into the basic model Baseline, forming the Baseline-ConvDAtt module. Subsequently, the CI module was incorporated, resulting in the Baseline-ConvDAtt-CI module. Finally, by combining the SPP module with the Baseline-ConvDAtt-CI module, the Baseline-ConvDAtt-CI-SPP module was obtained.
Table 4 summarizes the performance variations resulting from the progressive integration of different modules. The baseline model achieves an accuracy of 83.82%. After incorporating the ConvDAtt block into the baseline model, the accuracy increases significantly to 97.39%, indicating that ConvDAtt effectively enhances discriminative feature extraction. Subsequently, the incorporation of the CI block increases the accuracy to 98.37%. Finally, the addition of the SPP block leads to a final accuracy of 98.69%, achieving the overall best performance. In addition to classification performance, Table 4 also provides computational efficiency indicators. The proposed model requires 78.98 minutes for training and 5 seconds for inference, indicating acceptable computational efficiency. Although incorporating the ConvDAtt block substantially improves classification accuracy, it also introduces additional computational overhead, resulting in increased training time. After the introduction of the CI module, the training time was reduced from 359.2 minutes to 35.77 minutes. The training time was significantly shortened while maintaining a competitive accuracy rate, indicating that the CI module has improved computational efficiency without sacrificing performance. The final Baseline-ConvDAtt-CI-SPP model achieves a favorable balance between classification performance and computational cost. Overall, the proposed modules play complementary roles in the network. The ConvDAtt block mainly enhances discriminative feature extraction, the CI block focuses on information preservation and computational efficiency during downsampling, and the SPP block improves multi-scale feature representation.
The analysis shows that the accuracy of the model on the basical model Baseline is 83.82%. Then, by integrating the ConvDAtt block into the baseline model, the accuracy of this model reaches 97.39%. Subsequently, after adding the CI block, the accuracy of the model rises to 98.37%. Finally, by adding the SPP block, the accuracy of the model is further increased to 98.69%. This underscores the distinctive benefits of utilizing the ConvDAtt, CI, and SPP blocks in neural network architectures. Meanwhile, some indicators of computational efficiency are given in Table 4. For example, the training time of the proposed model is 78.98 minutes, the inference time is 5 seconds. These metrics indicate that efficient computational performance is exhibited by the proposed model. Moreover, by incorporating the ConvDAtt module into the baseline model, the accuracy of the resulting Baseline-ConvDAtt model increases significantly, whereas the training time grows by a factor of several times. Subsequently, with the incorporation of the CI module, the training time is significantly reduced without compromising accuracy. The proposed final model, termed Baseline-ConvDAtt-CI-SPP, reduces computational time while preserving high accuracy, thereby demonstrating its high efficiency.
To rigorously assess the statistical significance of the improvements brought by each proposed module, we conducted paired t-tests based on five independent runs using different random seeds on the Chen dataset. As shown in Table 5, the average accuracy rate of the proposed model is 24.68% higher than that of the baseline model. The paired t-test yielded a t-value of 32.94 and p < 0.001, confirming that the overall improvement was statistically significant. The introduction of the ConvDAtt block brought about the most significant gain, with an accuracy improvement of 23.79% and p < 0.001, highlighting its crucial role in enhancing feature extraction and training stability. Although the subsequent integration of the CI and SPP blocks resulted in more modest numerical improvements of 0.76% and 0.13%, respectively, these differences did not reach statistical significance (p > 0.05). Nevertheless, these modules contribute to improved model parameter efficiency and reduced computational cost, benefits that are reflected in enhanced stability and overall performance. Overall, the statistical analysis confirms that the proposed method achieves significant and reliable improvements compared to the baseline.
The results presented in Table 6 demonstrate that the proposed model exhibits favorable efficiency with respect to parameter scale, computational complexity, and model size. Specifically, the final model (Baseline-ConvDAtt-CI-SPP) contains 15.29 M parameters, requires 2.85 G FLOPs, and occupies a model size of 58.31 MiB. Furthermore, when transitioning from Baseline-ConvDAtt to Baseline-ConvDAtt-CI, the FLOPs decrease significantly from 97.14 G to 2.40 G, while classification accuracy is further improved to 98.37%. This observation strongly confirms that the CI module effectively enhances feature representation capability while simultaneously reducing computational cost.
Considering that low-quality images may adversely affect the performance of the proposed model, we conducted a series of ablation experiments to evaluate its robustness. The detailed results are presented in Table 7.
Gaussian noise is a common type of random noise. In this section, the model’s performance is evaluated by simulating low-quality images through the addition of Gaussian noise. Table 7 presents the ablation results and the performance of the proposed model under low-quality image conditions. As shown in Table 7, the accuracy of the baseline model decreases significantly after introducing Gaussian noise. After incorporating the ConvDAtt and CI modules, the model gradually recovers its discriminative capability. With the further addition of the SPP module, the accuracy increases to 96.90%, demonstrating improved robustness under degraded image conditions. Furthermore, the effectiveness of the SPP module is more evident under degraded image conditions. The robustness experiment demonstrates that the complete model maintains higher performance under noisy inputs, indicating that multi-scale feature aggregation helps improve feature representation in challenging scenarios. This indicates that the SPP module enhances robustness against image quality degradation by strengthening multi-scale feature representation.
To assess the interactions between convolution and pooling layers in the CI block by separately excluding convolution or pooling layers from the CI block. Table 8 provides detailed indicators of the model after removing the convolutional or pooled layer from the CI block.
From Table 8, it can be observed that upon eliminating the convolutional layer from the CI block, the model classification accuracy was 96.57%. Similarly, upon removing the pooling layer, the model classification accuracy was 97.39%. However, the classification accuracy for our proposed completed model attained 98.69%. In conclusion, the synergistic integration of convolution and pooling within the CI block is advantageous in enhancing the model’s overall performance.
3.3. Impact of data augmentation
Due to the restricted sample size in the benchmark dataset, overfitting may occur during the training of the proposed model. To mitigate this issue, a data augmentation approach was utilized to increase sample diversity and enhance system performance [35]. Each image was applied with random rotations within a ± 15 degrees range and horizontal flips were conducted with a 50% probability. These adjustments aim to comprehensively capture data features, thereby optimizing model training.
In order to thoroughly validate the data enhancement method adopted in this experiment, the Chen dataset and the Kaggle dataset were used for the experiment. The experimental results are shown in Fig 7. As can be observed from Fig 7, the data augmentation technique significantly improves the model performance. Specifically, the accuracy has been increased by 3.1% on the Chen dataset and 2.44% on the Kaggle dataset.
4. Discussion
A confusion matrix [36] is a specific tabular layout that is primarily used to evaluate the performance of a classification model to clearly show how well the classification model predicts actual samples. The confusion matrices of the proposed model on the Chen and Kaggle datasets are shown in Fig 8 and Fig 9, respectively. Equations (12) to (15) are utilized to compute the specific values of the model’s classification outcomes from the confusion matrixes. The symbols G, M, P, and N designate distinct types of brain tumors, with G standing for glioma, M for meningioma, P for pituitary tumor, and N representing no tumor. From the confusion matrix on the Chen dataset, it can be calculated that the precision of glioma classification reached 98.95%, the precision of meningioma classification reached 96.53%, and the precision of pituitary tumor classification reached 100%. The results indicate that the proposed model has a good classification ability for various types of brain tumors.
To offer a comprehensive assessment of the proposed model’s performance spanning various classes, Table 9 and Table 10 exhibit the specific precision, recall, and F1-score for each individual class on the Chen and Kaggle datasets, respectively.
These detailed metrics highlight the robust performance of our proposed model across different brain tumor types and the normal class. The ability of the model to accurately classify each class is demonstrated by the high precision, recall, and F1-scores, which further validates the effectiveness of the ConvDAtt, CI, and SPP blocks in enhancing the overall performance. Furthermore, we calculated the accuracy for each image and subsequently computed the standard deviation. The standard deviation on the Chen dataset was 0.1136, while that on the Kaggle dataset was 0.1635. The relatively small standard deviations on both datasets suggest that the model is stable and reliable.
The systematic comparison between the proposed model and previous state-of-the-art models using the same dataset is exhaustively demonstrated in Table 11. The results of the comparative analysis clearly reveal that the proposed model demonstrates superiority over these state-of-the-art approaches on both the Chen and Kaggle datasets. Specifically, the proposed model achieves an accuracy of 98.69% on the Chen dataset and 97.25% on the Kaggle dataset. Particularly, the accuracy of the proposed model on the Chen dataset is improved by 0.27% compared to the best model, Enhanced AlexNet with ASA [37], while on the Kaggle dataset, it is improved by 0.25% compared to the best model, EfficientNet-B7++ [38]. In addition, the proposed model outperforms previous state-of-the-art models in terms of F1-score, Precision, and Recall metrics on both the Chen and Kaggle datasets. These performance improvements are mainly attributed to the in-depth improvements and innovations in our methodology, especially in the areas of data preprocessing, feature extraction, and the handling of complementary relationships between pooling and convolutional layers. These improvements greatly improve the accuracy of the model, thus making the proposed model stand out in comparison with other state-of-the-art models.
Table 12 presents the parameter count and accuracy of models evaluated on the Chen dataset over the past two years. As can be observed, the proposed model achieves a parameter count of 15.29M and achieves an accuracy of 98.69%. Regarding the Enhanced AlexNet with ASA [37]model, which achieves an accuracy closest to that of the proposed model, its parameter count ranges from 60M to 70M, which is approximately three to four times that of the proposed model. For models with fewer parameters than the proposed model, namely MobileNetV2 [40] EfficientNet-B7++ [38], and Prototypical Networks [45], the reported accuracies are 92.10%, 95.00%, and 69.35%, respectively, all of which are considerably lower than the accuracy of the proposed model. In addition, the parameter counts for these three models are 11.1M, 8.38M, and 11.7M, which are only one to two times smaller than that of the proposed model.
Fig 10 and Fig 11 depict the Receiver Operating Characteristic (ROC) curves of the proposed model on the Chen dataset and the Kaggle dataset, respectively. The Area Under the Curve (AUC) is fundamentally assessed as a metric for evaluating the effectiveness of the model in distinguishing between various tumor types. High or low AUC values directly reflect classifier performance. On the Chen dataset, AUC values of 0.9970, 0.9975, and 0.9994 are achieved by the proposed model for glioma, meningioma, and pituitary tumor, respectively. Similarly, on the Kaggle dataset, AUC values of 0.9837, 0.9904, 0.9936, and 0.9988 are attained by the proposed model for the four categories of glioma, meningioma, pituitary tumor, and no tumor, respectively. These results comprehensively illustrate the excellent performance of the model in classifying various tumor types.
Fig 12 and Fig 13 demonstrate the excellent performance of the proposed model through visualization. As can be seen in Fig 12 and Fig 13, the samples within each class are more compactly distributed, and the distances between classes are increased.
Table 13 shows the robustness of the proposed model in processing low-quality magnetic resonance images after the introduction of Gaussian noise. After introducing Gaussian noise, the model achieved an accuracy of 96.9%, which demonstrates its strong robustness and reliable performance.
Table 14 presents the diverse metrics of the proposed model when it is evaluated on the Brain Tumor MRI dataset. This dataset, which comprises 7,023 grayscale magnetic resonance (MR) images, is a publicly available dataset on the Kaggle platform. It includes 1,621 images of gliomas, 1,645 images of meningiomas, 1,757 images of pituitaries, and 2,000 images without tumors. By examining the metrics in Table 14, it becomes evident that outstanding performance is demonstrated by the proposed model. Specifically, each performance metric of the proposed model nearly reaches 100%. Furthermore, the accuracy of the proposed model achieved 99.54%, which underscores its robust generalization capability to new and unseen datasets.
To visually see which regions the model focuses on in the brain tumor classification task, we used the Grad-CAM [47]technique to visualize it. This technique is used to help us see how brain tumors are identified and classified by the model. As shown in Fig 14, Fig 14 (a) shows pictures of various brain tumor areas before visualization and Fig 14 (b) shows heatmaps after visualization. Fig 14 (b) shows more directly the reference of this Grad-CAM technique, where the red part represents the brain tumor region.
(a) brain tumor (b) visual heat map.
5. Conclusion
Early diagnosis of brain tumors plays a crucial role in treatment decision-making. Given the cumbersome and time-consuming nature of manual examination of brain tumors, the imperative need arises for the development of automated detection methods to aid physicians. A method for efficient detection of multiple types of brain tumors is proposed in this paper. Initially, the ConvDAtt block, featuring depthwise separable convolution, attention mechanisms, and residual connectivity, is utilized. The use of depthwise separable convolution reduces the number of parameters and improves the feature extraction capability of the proposed model. The introduced CA mechanism dynamically adjusts weight allocation based on input data characteristics, enabling the model to prioritize key features while disregarding irrelevant information. Secondly, the CI block is introduced, which is a downsampling module that combines convolution and pooling. In the CI block, the complementary nature of convolution and pooling helps to extract feature information and enables the CNN to make decisions using both local and global information while also significantly reducing the computational burden (decreasing FLOPs from 97.14G to 2.85G). Thirdly, the SPP block is introduced to capture multi-scale spatial features and enhance feature representation, which enhances model robustness. And the method’s effectiveness was verified through thorough ablation experiments. Experimental results show that the proposed method achieves 98.69% accuracy on Chen dataset and 97.25% accuracy on Kaggle dataset. These results demonstrate the competitive performance of the proposed method on both Chen and Kaggle datasets, further validating its effectiveness. With the increasing availability and diversity of medical image data, the generalization ability and robustness of deep learning models can be further improved. Therefore, future studies will focus on expanding datasets with larger-scale and more diverse samples. Moreover, external multi-center clinical validation will be explored to further evaluate the generalization capability of the proposed method. Future research directions also include multimodal image fusion, explainable artificial intelligence, and further exploration of practical deployment strategies.
Acknowledgments
The provision of these two public datasets by Kaggle and Chen is greatly appreciated by us.
References
- 1. Alyami J, Rehman A, Almutairi F, Fayyaz AM, Roy S, Saba T, et al. Tumor localization and classification from MRI of brain using deep convolution neural network and salp swarm algorithm. Cogn Comput. 2023;16(4):2036–46.
- 2. Ali RR, Yaacob NM, Alqaryouti MH, Sadeq AE, Doheir M, Iqtait M, et al. Learning architecture for brain tumor classification based on deep convolutional neural network: classic and ResNet50. Diagnostics (Basel). 2025;15(5):624. pmid:40075870
- 3. Almijalli M, Almusayib FA, Albugami GF, Aloqalaa Z, Altwijri O, Saad AS. Automatic active contour algorithm for detecting early brain tumors in comparison with AI detection. Processes. 2025;13(3):867.
- 4. Ghosh A, Soni B, Baruah U. Transfer learning-based deep feature extraction framework using fine-tuned EfficientNet B7 for multiclass brain tumor classification. Arab J Sci Eng. 2023;49:12027–48.
- 5. Bansal T, Jindal N. An improved hybrid classification of brain tumor MRI images based on conglomeration feature extraction techniques. Neural Comput & Applic. 2022;34(11):9069–86.
- 6. Mukadam SB, Patil HY. Machine learning and computer vision based methods for cancer classification: A systematic review. Arch Computat Methods Eng. 2024;31(5):3015–50.
- 7. Beunza J-J, Puertas E, García-Ovejero E, Villalba G, Condes E, Koleva G, et al. Comparison of machine learning algorithms for clinical event prediction (risk of coronary heart disease). J Biomed Inform. 2019;97:103257. pmid:31374261
- 8. Zeinali N, Youn N, Albashayreh A, Fan W, Gilbertson White S. Machine learning approaches to predict symptoms in people with cancer: systematic review. JMIR Cancer. 2024;10:e52322. pmid:38502171
- 9. El-Dahshan E-SA, Hosny T, Salem A-BM. Hybrid intelligent techniques for MRI brain images classification. Digital Signal Processing. 2010;20(2):433–41.
- 10. Abd-Ellah MK, Awad AI, Khalaf AAM, Hamed HFA. A review on brain tumor diagnosis from MRI images: Practical implications, key achievements, and lessons learned. Magn Reson Imaging. 2019;61:300–18. pmid:31173851
- 11. Basheera S, Satya Sai Ram M. Classification of brain tumors using deep features extracted using CNN. J Phys: Conf Ser. 2019;1172:012016.
- 12.
Santamaria BC, Carreno EC, Barrera AG. Classification of Primary Brain Tumors Using Convolutional Neural Network (CNN). In: 2022 IEEE Colombian Conference on Applications of Computational Intelligence (ColCACI), 2022. 1–6. https://doi.org/10.1109/colcaci56938.2022.9905365
- 13. Roy SS, Rodrigues N, Taguchi Y. Incremental dilations using CNN for brain tumor classification. Appl Sci. 2020;10(14):4915.
- 14. Sagar GV, Kumar MR, Ahammad SkH, Santhosh C. Image classification of intracranial tumor using deep residual learning technique. Multimed Tools Appl. 2023;83(19):57409–27.
- 15. Deepak S, Ameer PM. Brain tumor categorization from imbalanced MRI dataset using weighted loss and deep feature fusion. Neurocomputing. 2023;520:94–102.
- 16. Kang J, Ullah Z, Gwak J. MRI-based brain tumor classification using ensemble of deep features and machine learning classifiers. Sensors (Basel). 2021;21(6):2222. pmid:33810176
- 17. Al-Azzwi ZHN, Nazarov AN. Brain tumor classification based on improved stacked ensemble deep learning methods. Asian Pacific J Cancer Prevention. 2023;24:2141–8.
- 18. Khan SUR, Zhao M, Li Y. Detection of MRI brain tumor using residual skip block based modified MobileNet model. Cluster Comput. 2025;28(4).
- 19. Asif S, Zhao M, Chen X, Zhu Y. BMRI-NET: A deep stacked ensemble model for multi-class brain tumor classification from MRI images. Interdiscip Sci Comput Life Sci. 2023;15:499–514.
- 20. Ghosh A, Soni B, Baruah U. Transfer learning-based deep feature extraction framework using fine-tuned EfficientNet B7 for multiclass brain tumor classification. Arab J Sci Eng. 2023.
- 21. Irfan M, Shaf A, Ali T, Farooq U, Rahman S, Nasar Faraj Mursal S, et al. Effectiveness of Deep learning models for brain tumor classification and segmentation. Computers, Materials & Continua. 2023;76(1):711–29.
- 22. Isunuri BV, Kakarla J. Ensemble coupled convolution network for three-class brain tumor grade classification. Multimed Tools Appl. 2023;83(19):57643–59.
- 23. Gómez-Guzmán MA, Jiménez-Beristaín L, García-Guerrero EE, López-Bonilla OR, Tamayo-Perez UJ, Esqueda-Elizondo JJ, et al. Classifying brain tumors on magnetic resonance imaging by using convolutional neural networks. Electronics. 2023;12(4):955.
- 24. Trisheela S, Fernandes R, Rodrigues AP, Supreeth S, Ambika BJ, Pareek PK, et al. Brain tumour detection using VGG-Based feature extraction with modified DarkNet-53 model. Int J Biomed Imaging. 2025;2025:5535505. pmid:40487802
- 25. Tariq A, Iqbal MM, Javed Iqbal M, Iftikhar A. Transforming brain tumor detection empowering multi-class classification with vision transformers and EfficientNetV2. IEEE Access. 2025;13:63857–76.
- 26. Li J, Guan W. Patch merging refiner embedding UNet for image denoising. Inf Sci. 2023;641:119123.
- 27. Huang Z, Wang J, Fu X, Yu T, Guo Y, Wang R. DC-SPP-YOLO: Dense connection and spatial pyramid pooling based YOLO for object detection. Inf Sci. 2020;522:241–58.
- 28. Ertosun MG, Rubin DL. Automated grading of gliomas using deep learning in digital pathology images: A modular approach with ensemble of convolutional neural networks. AMIA Annu Symp Proc. 2015;2015:1899–908. pmid:26958289
- 29. Zhu H, Wang J, Wang SH, Zhang YD, Gorriz JM. ConvNet-CA: A lightweight attention-based CNN for brain disease detection. In: Vicente JMF, Alvarez-Sanchez JR, Lopez FD, Adeli H, editors. Artificial intelligence in neuroscience: Affective analysis and health applications, pt I. Cham: Springer International Publishing Ag. 2022. p. 3–12.
- 30. Cheng J, Huang W, Cao S, Yang R, Yang W, Yun Z, et al. Enhanced performance of brain tumor classification via tumor region augmentation and partition. PLoS One. 2015;10(10):e0140381. pmid:26447861
- 31. Bhuvaji S, Kadam A, Prajakta B, Sameer D, Swati K. Brain Tumor Classification (MRI). Kaggle. 2020.
- 32. Martinez-Vega B, Tkachenko M, Matkabi M, Ortega S, Fabelo H, Balea-Fernandez F, et al. Evaluation of preprocessing methods on independent medical hyperspectral databases to improve analysis. Sensors (Basel). 2022;22(22):8917. pmid:36433516
- 33. Zhang Z, Wu H, Zhao H, Shi Y, Wang J, Bai H, et al. A novel deep learning model for medical image segmentation with convolutional neural network and transformer. Interdiscip Sci. 2023;15(4):663–77. pmid:37665496
- 34. Alsaggaf W, Cömert Z, Nour M, Polat K, Brdesee H, Toğaçar M. Predicting fetal hypoxia using common spatial pattern and machine learning from cardiotocography signals. Applied Acoustics. 2020;167:107429.
- 35. Nalepa J, Marcinkiewicz M, Kawulok M. Data augmentation for brain-tumor segmentation: A review. Front Comput Neurosci. 2019;13:83. pmid:31920608
- 36. Riehl K, Neunteufel M, Hemberg M. Hierarchical confusion matrix for classification performance evaluation. J R Stat Soc Sers C-Appl Stat. 2023;72(5):1394–412.
- 37. Balasuburamani K, Shanmugavel KL. Brain tumor classification in MRI using hybrid ASA-based deep learning and Masi-entropy multilayer thresholding segmentation with sunflower optimization. TS. 2025;42:223–41.
- 38. Ishaq A, Ullah FUM, Hamandawana P, Cho D-J, Chung T-S. Improved EfficientNet architecture for multi-grade brain tumor detection. Electronics. 2025;14(4):710.
- 39. Sterniczuk B, Charytanowicz M. An ensemble transfer learning model for brain tumors classification using convolutional neural networks. Adv Sci Technol Res J. 2024;18:204–16.
- 40. Bogacsovics G, Harangi B, Hajdu A. Developing diverse ensemble architectures for automatic brain tumor classification. Multimed Tools Appl. 2024;84(30):36453–96.
- 41. Suliman Farhan A, Khalid M, Manzoor U. Combined oriented data augmentation method for brain MRI images. IEEE Access. 2025;13:9981–94.
- 42. Alhassan AM, Altmami NI. IV3TM: Inception V3 enabled bidirectional long short-term memory network for brain tumor classification. PLoS One. 2025;20(10):e0335397. pmid:41134912
- 43. Guo X, Liu T, Chi Q. Brain tumor diagnosis in MRI scans images using Residual/Shuffle Network optimized by augmented Falcon Finch optimization. Sci Rep. 2024;14(1):27911. pmid:39537654
- 44. Dutta TK, Nayak DR, Zhang Y-D. ARM-Net: Attention-guided residual multiscale CNN for multiclass brain tumor classification using MR images. Biomedical Signal Processing and Control. 2024;87:105421.
- 45. Akhmetzhanova S, Serek A, Kashayev R, Kozhamuratova A. Few-shot brain tumor classification: meta- vs metric-learning comparison. Bulletin EEI. 2025;14(5):3913–22.
- 46. Montoya SFÁ, Rojas AE, Vásquez LFN. Classification of brain tumors: A comparative approach of shallow and deep neural networks. SN COMPUT SCI. 2024;5(1).
- 47. Selvaraju RR, Cogswell M, Das A, Vedantam R, Parikh D, Batra D. Grad-CAM: Visual explanations from deep networks via gradient-based localization. Int J Comput Vis. 2020;128:336–59.