147 American Academic Scientific Research Journal for Engineering, Technology, and Sciences ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 https://asrjetsjournal.org/index.php/American_Scientific_Journal/index Deep Learning-Based Diagnosis of Brain Cancer Using Convolutional Neural Networks On MRI Scans: A Comparative Study of Model Architectures and Tumor Classification Accuracy Tobi Titus, Oyekanmia*, Peter Oluwasayo, Adigunb , Nelson Abimbola Ayuba Azeezc, Ayodeji Adedotun Adeniyid a.bDepartment of Computer Science, New Mexico Highlands University, 1005 Diamond St, Las Vegas, New Mexico, USA cDepartment of Physics, University of Abuja, Abuja, Federal Capital Territory, Nigeria dDepartment of Media, Art, and Technology, New Mexico Highlands University, 1005 Diamond St, Las Vegas, New Mexico, USA aEmail: toyekanmi@live.nmhu.edu bEmail: poadigun@nmhu.edu cEmail: azeez.abimbola2019@uniabuja.edu.ng dEmail: aadeniyi1@live.nmhu.edu Abstract Brain tumor diagnosis using magnetic resonance imaging (MRI) is essential for timely intervention and treatment planning, yet manual interpretation is often time-consuming and subject to observer variability. Deep learning, particularly convolutional neural networks (CNNs), has shown considerable promise in automating tumor classification with high accuracy. This study developed and evaluated a LightBT-CNN model using the Brain Tumor MRI dataset, consisting of 7,023 images categorized into glioma, meningioma, pituitary tumor, and no tumor classes. The model was trained, validated, and tested using Python and TensorFlow, with performance evaluated through classification metrics and Gradient-weighted Class Activation Mapping (Grad-CAM) for interpretability. The LightBT-CNN model achieved an overall classification accuracy of 98% accuracy, with strong precision, recall, and F1-scores across tumor types. Grad-CAM visualizations confirmed that the model focused on tumor-specific regions, strengthened the reliability of predictions, and enhanced clinical interpretability. ------------------------------------------------------------------------ Received: 7/24/2025 Accepted: 9/24/2025 Published: 10/4/2025 ------------------------------------------------------------------------ * Corresponding author. https://asrjetsjournal.org/index.php/American_Scientific_Journal/index mailto:toyekanmi@live.nmhu.edu mailto:poadigun@nmhu.edu mailto:azeez.abimbola2019@uniabuja.edu.ng mailto:aadeniyi1@live.nmhu.edu American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 148 These findings align with existing research, such as Ait Amou and his colleagues (2022), who reported 98.70% accuracy with CNN and Bayesian optimization, Haq and his colleagues (2023), who achieved 99.89% with a multi-level CNN, and Sun (2021), whose customized CNN attained 96% accuracy with an AUC of 0.99. The results demonstrate the feasibility of integrating CNN-based approaches into brain tumor diagnostics, with explainable AI tools like Grad-CAM further supporting clinical accuracy and adoption. Keywords: Brain tumor; Convolutional Neural Network (CNN); LightBT-CNN Model; MRI; Grad-CAM. 1.Introduction Brain cancer is one of the rare types of cancer and one of the most aggressive, which are primary malignant brain tumors and other central nervous system (CNS) tumors[1, 2].According to GLOBOCAN, brain cancer accounted for about 1.6% of all cancers worldwide, with an estimated 308,102 new cases and 251,329 deaths annually[3].In the United States, the American Cancer Society (2024) reported that brain and spinal cord tumors represent about 1.3% of all new cancer diagnoses, with glioblastoma being the most common and aggressive subtype, comprising nearly 47% of malignant brain tumors, characterized by rapid progression and poor prognosis[4]. Diagnosis relies heavily on neuroimaging techniques, such as magnetic resonance imaging (MRI) and computed tomography (CT) scans, often supplemented by biopsy for histopathological confirmation[5].The safest approach in magnetic resonance imaging (MRI) which is the clinical standard for detecting and characterizing brain tumors. Despite advances in diagnosis, surgery, radiotherapy, and chemotherapy, brain cancer remains difficult to treat due to the complexity of the brain, the invasive nature of many tumors, and the protective blood–brain barrier that limits drug delivery[6, 7]. As a result, survival rates are often low for aggressive types, highlighting the urgent need for improved diagnostic and therapeutic strategies, including molecular profiling, immunotherapy, and artificial intelligence–assisted imaging analysis[2].Convolutional neural networks (CNNs) are an impactful technology for providing solutions in medical diagnostics and have achieved state-of-the-art performance in medical image classification[8].CNNs have revolutionized brain cancer diagnostics by enabling highly accurate, automated analysis of medical imaging, particularly MRI scans[2, 9].These deep learning models excel at detecting tumors, classifying their types, such as gliomas, meningiomas, and pituitary tumors, and segmenting tumor regions to assist in surgical planning[2, 10].Recent advancements in CNN architecture and hyperparameter optimization have led to diagnostic accuracies exceeding 95%, with models like ResNet-18 outperforming deeper networks while maintaining computational efficiency[2, 11].Moreover, the integration of explainable AI techniques, such as LIME, into CNN-based systems like CNN-TumorNet has enhanced transparency, allowing clinicians to better understand and trust the model’s decisions[12]. Despite these breakthroughs, challenges persist, including limited data diversity, concerns over interpretability, and the need for seamless integration into clinical workflows. Hence, this research aims to design a “LightBT-CNN Model” brain classification model using standardized MRI datasets and compare the findings with other CNN architectures. 2. Methods This study adopted a practical, design-based approach through the development of a “DIY Convolutional Neural Network (LightBT-CNN) Model” aimed at detecting, identifying, and interpreting MRI clinical data for brain American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 149 cancer diagnosis. The model was trained and tested on secondary data obtained from Kaggle, titled Brain Tumor MRI Dataset by Masoud Nickparvar, last updated four years ago, and rated 8.75 in usability as of August 15, 2025[13].The dataset comprises 7,023 MRI images categorized into four classes: glioma, meningioma, pituitary tumor, and no tumor[13]. Model development and testing were conducted using Python programming, with essential libraries including NumPy, Pandas, Matplotlib, Seaborn, and TensorFlow. Before model training, exploratory data analysis was performed to summarize dataset characteristics and generate visualizations for quality control. Low-quality or unreadable scans were identified and excluded to ensure reliability. Data preprocessing involved recoding, categorizing, and restructuring the dataset to standardize inputs for CNN processing. The LightBT CNN model was a Sequential Convolutional Neural Network (CNN), which was built within TensorFlow and trained using convolutional, pooling, and fully connected layers optimized for multi-class classification. Training and validation subsets were generated from the dataset to minimize bias and overfitting[8]. Each model iteration was trained, simulated, and evaluated using standard performance metrics, including accuracy, sensitivity, specificity, precision, F1-score, and area under the receiver operating characteristic curve (AUC-ROC). Comparative analysis was conducted against established CNN architectures to benchmark the diagnostic performance of the DIY model. 3. Results 3.1 Data Preprocessing and Visualization The CNN model was initiated by preprocessing the data. The path and directory were assigned for testing and training, followed by the iteration of directions for the training path (Figures 1 &2), and a data frame was also created. Figure 1: Creation of training dataframe American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 150 Figure 2: Creation of testing dataframe The data, training and testing data was visualized as shown in Figure 3. Figure 3: Countplot of the dataset The MRI dataset was preprocessed and organized into training, validation, and testing sets using the “ImageDataGenerator” function in “TensorFlow/Keras” (See Figure 4 and 5). The images were resized to 150 × 150 pixels, normalized by rescaling pixel values to the range [0, 1], and augmented with brightness variation between 0.8 and 1.2 to improve generalization and prevent overfitting.  Training set: 5,712 MRI images across 4 classes (glioma, meningioma, pituitary tumor, and no tumor).  Validation set: 655 MRI images across the same 4 classes, used to monitor performance during training.  Test set: 656 MRI images across the 4 classes, reserved for evaluating final model performance. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 151 Figure 4: Preprocessing of the dataset The dataset distribution shows that each subset-maintained class balance, ensuring unbiased evaluation across categories. This setup provided a robust foundation for training the CNN model, optimizing hyperparameters, and later validating predictive performance with unseen MRI images. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 152 Figure 5: Validation and final testing dataset American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 153 The data was validated and split for training and testing. As part of dataset quality control, sample images were visualized from a Keras data generator along with their corresponding class labels to confirm proper categorization and suitability for training. Images were retrieved using the `next(generator)` function, meaning they were sampled randomly and not necessarily from the same batch (See Figure 6). The number of pictures displayed was restricted to perfect squares (e.g., 4, 9, 16) for grid-based visualization. This process enabled verification of dataset integrity, class balance, and sample quality across the four categories: glioma, meningioma, pituitary tumor, and no tumor, helping to detect potential labeling or preprocessing errors before model training. Figure 6: Data visualization of the MRI scans 3.2 LightBT CNN Model Creation The model was created using a Sequential Convolutional Neural Network (CNN) architecture. The model summary (See Figure 7) in the image was designed for brain tumor classification from MRI images. The network American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 154 began with a series of convolutional layers (Conv2D) that progressively increased the number of filters from 32 to 256, allowing the extraction of increasingly complex features. Each convolutional layer was followed by “Batch Normalization”, which stabilized and accelerated training, and “Max Pooling”, which reduced spatial dimensions to improve computational efficiency and mitigate overfitting. The final convolutional block outputs featured maps of size (7, 7, 256), which were flattened into a one- dimensional vector of 12,544 units. This vector was then passed into a fully “connected dense layer” with 256 neurons, containing the largest share of parameters (over 3.2 million). A “dropout layer” was introduced afterward to reduce overfitting by randomly disabling neurons during training. The output layer “(dense_1)” consisted of 4 units, corresponding to the four target classes: glioma, meningioma, pituitary tumor, and no tumor, likely activated with a “softmax function” for multiclass classification. Overall, the network has 3,602,884 total parameters, of which 3,601,924 are trainable, while only 960 are non- trainable, showing the model is highly adaptable to learning from data. The design combined depth, normalization, and dropout regularization to balance accuracy and generalization, making it suitable for medical diagnostics such as brain tumor diagnosis. Figure 7: Coding of the LightBT-CNN model American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 155 Figure 8: Summary of the LightBT CNN model 3.3 LightBT CNN Model Training and Analysis The model training process was evaluated by plotting training and validation curves for key performance metrics, providing insight into the model’s learning dynamics and generalization capability (See Figure 9). The metrics assessed included accuracy, loss, precision, and recall, as recorded during training using the “Keras History object” generated by the model.fit() function. Training and validation performance trends were visualized across epochs, with the plots highlighting the optimal epoch for each metric. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 156 Figure 9: Metric analysis of the LightBT CNN model 3.4 Model Evaluation and Performance The performance of the LightBT CNN model was assessed using a classification report and a confusion matrix (See Figures 10 and 11). The classification report demonstrated excellent predictive accuracy across all four brain tumor classes (glioma, meningioma, no tumor, and pituitary). Precision values ranged from 0.95 to 1.00, while recall values spanned 0.95 to 1.00, indicating a balanced ability to correctly identify positive cases without overpredicting. The F1-scores, which combine precision and recall, were consistently high (0.95–1.00), indicating an outstanding model performance. Overall classification accuracy was 98%, with both macro and weighted American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 157 averages yielding a precision, recall, and F1-score of 0.98, underscoring the model’s reliability across imbalanced class distributions. The confusion matrix provided a deeper depiction of the prediction distribution. The model correctly classified the majority of samples in all categories, with minimal misclassifications. For instance, 142 out of 150 glioma cases and 146 out of 153 meningioma cases were accurately predicted, while all 203 no tumor cases and all 150 pituitary tumor cases were classified correctly. Misclassifications were minor, with glioma occasionally confused with meningioma and vice versa, reflecting the morphological similarities between these tumor types in MRI imaging. Figure 10: Evaluation of LightBT CNN model American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 158 Figure 11: Evaluation of LightBT CNN model performance 3.5 Prediction and Model Testing The trained LightBT CNN model was evaluated on unseen MRI images to assess its predictive performance in real-world applications. The model output provided raw probability distributions across the four tumor classes (glioma, meningioma, pituitary tumor, and no tumor). To enhance transparency and interpretability, Gradient- weighted Class Activation Mapping (Grad-CAM) was implemented. Grad-CAM produces class-specific heatmaps that highlight the regions of the MRI scans most influential to the model’s decision (See Figure 13). By American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 159 applying Grad-CAM to the last convolutional layer of the CNN, the spatial areas associated with tumor detection were identified. These heatmaps were normalized between 0 and 1 and overlaid on the original MRI images to create visual explanations. Figure 12 depicts a predicted output (identified and classified) of the LightBT CNN model’s prediction on an MRI image. The input MRI scan clearly shows a tumor mass, and the model predicted the case as meningioma with a probability score of 1.0 (100%), while assigning zero probability to the other classes (pituitary, glioma, and no tumor). The bar chart displaying class probabilities highlights the model’s high level of confidence in its classification. This result illustrates the practical diagnostic capability of the CNN model in real-time prediction, supporting its robustness for clinical decision support in brain cancer diagnosis. Figure 12: The prediction and classification of brain tumors by the LightBT-CNN model Figure 13 depicts the left image (original MRI) and the right image (Grad-CAM heatmap). The original MRI is a standard grayscale MRI scan showing the brain's internal structures. A bright, circular mass in the upper right American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 160 quadrant suggests the presence of a tumor, likely a meningioma, based on its location and appearance. The Grad- CAM heatmap has an overlay of color, which uses color gradients (blue to red) to highlight the regions the CNN focused on when making its prediction.  Red & Yellow Zones: These are the most influential areas in the model’s decision—clearly centered around the tumor.  Blue & Green Zones: These areas had minimal impact on the classification, indicating the model correctly ignored irrelevant regions. Figure 13: Grad-CAM heatmap of a classified MRI scan by the LightBT-CNN model 4. Discussion- Comparative Performance Discussion The LightBT CNN model demonstrated an impressive 98% overall accuracy, positioning it competitively against established CNN architectures such as VGG16, ResNet50, and EfficientNet, which have been widely applied in brain tumor classification tasks. Previous studies using VGG16 have reported accuracies in the range of 90–95%, often requiring transfer learning and extensive fine-tuning due to its deeper architecture and high parameter count[2, 7] .Similarly, ResNet50, known for its residual connections that alleviate vanishing gradients, typically achieves 93–96% accuracy in MRI-based tumor classification but comes with a much higher computational cost[9, 11]. In contrast, the LightBT CNN model achieved comparable or superior accuracy with a relatively lightweight architecture, containing approximately 3.6 million parameters, which is significantly fewer than VGG16’s 138 million parameters or ResNet50’s 23 million parameters[2, 11].This indicates that the DIY model not only delivers state-of-the-art accuracy but also provides computational efficiency, making it more feasible for clinical settings with limited hardware resources. These findings are consistent with Ait Amou and his colleagues (2022), who reported that their CNN with American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 161 Bayesian optimization achieved 98.70% validation accuracy, outperforming standard architectures such as VGG16, VGG19, ResNet50, InceptionV3, and DenseNet201[2].This highlights the potential of model optimization strategies in enhancing diagnostic accuracy. Similarly, Haq and his colleagues (2023) proposed a multi-level CNN (MCNN) for IoT-based healthcare systems, achieving an outstanding 99.89% classification accuracy. This demonstrates not only the feasibility of CNNs for clinical applications but also their adaptability for remote and connected healthcare infrastructures[10].Furthermore, Sun (2021) found that a customized CNN model outperformed standard architectures with a test accuracy of 96% and an AUC score of 0.99, underlining the superiority of integrated CNN models in improving diagnostic efficiency[11]. When comparing these findings with this study, it is evident that CNN-based models consistently achieve above 90% accuracy across different architectures and datasets. However, beyond raw performance metrics, the inclusion of Grad-CAM in this analysis demonstrates the added value of interpretability. While accuracy confirms diagnostic strength, interpretability ensures clinical reliability. The Grad-CAM results revealed that correctly classified tumors were highlighted within their lesion boundaries, while misclassifications occasionally arose from activations outside tumor regions, suggesting areas for model refinement. This aligns with the call in recent literature for models that balance performance with explainability, thereby enhancing clinical adoption. In summary, this study supports existing evidence that CNNs are highly effective in brain tumor classification and extends the conversation by emphasizing the role of Grad-CAM in enhancing transparency. Together with previous works (Ait Amou and his colleagues, 2022; Haq and his colleagues, 2023; Sun, 2021)[2, 10, 11], our results suggest that future research should focus not only on improving accuracy but also on optimizing interpretability to ensure safe and reliable clinical deployment. 5. Conclusion The LightBT CNN model achieved a high degree of accuracy, precision, and generalization in brain tumor classification, confirming its effectiveness in distinguishing between glioma, meningioma, pituitary tumors, and healthy brain scans. This study demonstrates the effectiveness of CNN in classifying brain tumors from MRI scans with high accuracy. This interpretability enhances the clinical applicability of deep learning models. However, further optimization of architectures and validation with larger datasets are recommended to enhance efficiency and reduce misclassification. Additionally, the integration of explainable AI tools such as Grad-CAM into medical diagnostics will be essential for building clinician accuracy and ensuring safe adoption of AI-driven diagnostic support systems in healthcare. 6. Limitations of the Study This study had several limitations that should be acknowledged. First, the dataset size was relatively limited compared to the vast heterogeneity of brain tumor types, which may restrict the generalizability of the findings. Second, while MRI scans were used as the primary imaging modality, differences in image quality, scanner specifications, and acquisition protocols across institutions may have influenced model performance. Third, the study focused only on commonly available CNN architectures without incorporating hybrid or ensemble models, American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 162 which could potentially yield higher accuracy. Additionally, the research was primarily computational and did not include real-time clinical validation with radiologists, limiting its immediate clinical applicability. Finally, the models were trained on pre-processed datasets, which may not fully replicate the complexity and noise of real- world clinical MRI images. 7. Future Studies Future research should aim to address these limitations. Larger, multi-institutional datasets should be used to enhance the robustness and external validity of CNN-based brain tumor diagnosis systems. The integration of multimodal imaging data, such as PET, CT, or advanced MRI sequences, could provide richer diagnostic information and improve classification accuracy. Future studies could also explore the use of ensemble learning, transfer learning with novel architectures, and explainable AI techniques to improve both performance and interpretability. Moreover, clinical validation with radiologists in real-world settings is crucial for translating these models into practice. Finally, the development of lightweight CNN models optimized for deployment on low- resource devices could extend the application of AI-driven diagnosis to regions with limited healthcare infrastructure. References [1] S. Kim et al., "Global burden of brain and central nervous system cancer in 185 countries, and projections up to 2050: a population-based systematic analysis of GLOBOCAN 2022," Journal of Neuro-Oncology, vol. 175, no. 2, pp. 673-685, 2025/11/01 2025, doi: 10.1007/s11060-025-05164-0. [2] M. Ait Amou, K. Xia, S. Kamhi, and M. Mouhafid, "A Novel MRI Diagnosis Method for Brain Tumor Classification Based on CNN and Bayesian Optimization," Healthcare, vol. 10, no. 3, p. 494, 2022. [Online]. Available: https://www.mdpi.com/2227-9032/10/3/494. [3] H. Sung et al., "Global Cancer Statistics 2020: GLOBOCAN Estimates of Incidence and Mortality Worldwide for 36 Cancers in 185 Countries," CA: A Cancer Journal for Clinicians, vol. 71, no. 3, pp. 209-249, 2021, doi: https://doi.org/10.3322/caac.21660. [4] D. S. Dizon and A. H. Kamal, "Cancer statistics 2024: All hands on deck," Cancer Journal for Clinicians, vol. 74, no. 1, 2024. [Online]. Available: 10.3322/caac.21824. [5] B. Bonakdarpour and C. Takarabe, "Brain Networks, Clinical Manifestations, and Neuroimaging of Cognitive Disorders: The Role of Computed Tomography (CT), Magnetic Resonance Imaging (MRI), Positron Emission Tomography (PET), and Other Advanced Neuroimaging Tests," Clinics in Geriatric Medicine, vol. 39, no. 1, pp. 45-65, 2023, doi: 10.1016/j.cger.2022.07.004. [6] H. Hu, X. Li, W. Yao, and Z. Yao, "Brain Tumor Diagnose Applying CNN through MRI," in 2021 2nd International Conference on Artificial Intelligence and Computer Engineering (ICAICE), 5-7 Nov. 2021 2021, pp. 430-434, doi: 10.1109/ICAICE54393.2021.00090. https://www.mdpi.com/2227-9032/10/3/494 https://doi.org/10.3322/caac.21660 American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) - Volume 103, No 1, pp 147-163 163 [7] W. Ayadi, W. Elhamzi, I. Charfi, and M. Atri, "Deep CNN for Brain Tumor Classification," Neural Processing Letters, vol. 53, no. 1, pp. 671-700, 2021/02/01 2021, doi: 10.1007/s11063-020-10398-2. [8] P. O. Adigun, A. A. Adeniyi, and T. T. Oyekanmi, "Detection and Interpretation of X-Ray Scans for the Presence of Pneumonia Using Convolutional Neural Network," American Academic Scientific Research Journal for Engineering, Technology, and Sciences, Original vol. 101, no. 1, pp. 97-108, 2025. [Online]. Available: https://core.ac.uk/download/pdf/640473726.pdf. Yes. [9] B. A. Mohammed and M. S. Al-Ani, "An efficient approach to diagnose brain tumors through deep CNN," Mathematical Biosciences and Engineering, vol. 18, no. 1, pp. 851-867, 2021, doi: 10.3934/mbe.2021045. [10] A. u. Haq et al., "MCNN: a multi-level CNN model for the classification of brain tumors in IoT- healthcare system," Journal of Ambient Intelligence and Humanized Computing, vol. 14, no. 5, pp. 4695- 4706, 2023/05/01 2023, doi: 10.1007/s12652-022-04373-z. [11] C. Sun, "CNN Models Applied in Brain Cancer Diagnosis," in 2021 2nd International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT), 15-17 Oct. 2021 2021, pp. 289- 293, doi: 10.1109/AINIT54228.2021.00064. [12] N. Rasool et al., "CNN-TumorNet: leveraging explainability in deep learning for precise brain tumor diagnosis on MRI images," (in eng), Front Oncol, vol. 15, p. 1554559, 2025, doi: 10.3389/fonc.2025.1554559. [13] M. Nickparvar. Brain Tumor MRI Dataset, doi: https://doi.org/10.34740/KAGGLE/DSV/2645886. https://core.ac.uk/download/pdf/640473726.pdf https://doi.org/10.34740/KAGGLE/DSV/2645886