Manuscript Offprint

arXiv:2611.07843

Enhanced MRI brain tumor detection using deep learning in conjunction with explainable AI SHAP based diverse and multi feature analysis

Asif Rahman, Maqsood Hayat, Nadeem Iqbal, Fawaz Khaled Alarfaj, Salem Alkhalaf, Fahad Alturise

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Asif Rahman 1^{1}, Maqsood Hayat 1^{1}, Nadeem Iqbal 1^{1}, Fawaz Khaled Alarfaj 2^{2}, Salem Alkhalaf 3^{3} & Fahad Alturise 4^{4}

Recent innovations in medical imaging have markedly improved brain tumor identification, surpassing conventional diagnostic approaches that suffer from low resolution, radiation exposure, and limited contrast. Magnetic Resonance Imaging (MRI) is pivotal in precise and accurate tumor characterization owing to its high-resolution, non-invasive nature. This study investigates the synergy among multiple feature representation schemes such as local Binary Patterns (LBP), Gabor filters, Discrete Wavelet Transform, Fast Fourier Transform, Convolutional Neural Networks (CNN), and Gray-Level Run Length Matrix alongside five learning algorithms namely: k-nearest Neighbor, Random Forest, Support Vector Classifier (SVC), and probabilistic neural network (PNN), and CNN. Empirical findings indicate that LBP in conjunction with SVC and CNN obtained high specificity and accuracy, rendering it a promising method for MRI-based tumor diagnosis. Further to investigate the contribution of LBP, Statistical analysis chi-square and p-value tests are used to confirm the significant impact of LBP feature space for identification of brain Tumor. In addition, The SHAP analysis was used to identify the most important features in classification. In a small dataset, CNN obtained 97.8% accuracy while SVC yielded 98.06% accuracy. In subsequent analysis, a large benchmark dataset is also utilized to evaluate the performance of learning algorithms in order to investigate the generalization power of the proposed model. CNN achieves the highest accuracy of 98.9%, followed by SVC at 96.7%. These results highlight CNN's effectiveness in automated, high-precision tumor diagnosis. This achievement is ascribed with MRI-based feature extraction by combining high resolution, non-invasive imaging capabilities with the powerful analytical abilities of CNN. CNN demonstrates superiority in medical imaging owing to its ability to learn intricate spatial patterns and generalize effectively. This interaction enhances the accuracy, speed, and consistency of brain tumor detection, ultimately leading to better patient outcomes and more efficient healthcare delivery. https://github.com/asifrahman557/BrainTumorDetection.

Keywords Brain tumor, Machine learning, CNN, PNN, LBP, RF, MRI, SHAP analysis

The human brain, a fundamental component of the central nervous system (CNS), collaborates with the spinal cord to manage and synchronize vital body activities, such as decision-making, signal transmission, and sensory information integration 1^{1}. The complicated and highly structured anatomy facilitates complex cognitive and physiological processes; nevertheless, this complexity also makes it susceptible to various illnesses and diseases, including stroke, infections, and brain tumors 2,3^{2,3}. Brain tumors, characterized by the unregulated growth of abnormal cells within the limited confines of the skull, present considerable threats to neurological function and general health 4−6^{4-6}. These tumors are generally categorized into two types: benign (non-cancerous) and malignant

1^{1}Department of Computer Science, Abdul Wali Khan University Mardan, Mardan, Khyber-Pakhtunkhwa, Pakistan.

2^{2}Department of Management Information Systems (MIS), School of Business, King Faisal University (KFU), 31982 Al-Ahsa, Saudi Arabia. 3^{3}Department of Computer Engineering, College of Computer, Qassim University, Buraydah, Saudi Arabia. 4^{4}Department of Cybersecurity, College of Computer, Qassim University, Buraydah, Saudi Arabia. email: m.hayat@awkum.edu.pk; s.alkhalaf@qu.edu.sa

Scientific Reports | (2025) 15:29411

| https://doi.org/10.1038/s41598-025-14901-4

natureportfolio

(cancerous), with more than 200 specific subtypes recognized based on their cellular origin, location, and behavior7,8^{7,8}. Despite the advancement in medical research, the prognosis for patients with brain tumors remains unfavorable, with survival rates differing markedly based on tumor type, location, and stage at diagnosis9−11^{9-11}.

Brain tumors are a significant source of morbidity and mortality globally, ranking as the 10th most prevalent cause of death across all age demographics12^{12}. The National Brain Tumor Foundation (NBTF) reports a 300% increase in brain tumor-related fatalities over the last three decades, highlighting the critical necessity for enhanced diagnostic and treatment approaches. Timely identification and care are essential, since untreated tumors may result in significant neurological impairments or death13^{13}. Conventional diagnostic techniques, including biopsies, are intrusive, protracted, and fraught with hazards, hence demanding the creation of non-invasive, precise, and efficient diagnostic instruments. Magnetic Resonance Imaging (MRI) has emerged as the benchmark for diagnosing brain tumors, providing exceptional visibility of analytical structures and anomalies.

Brain tumors, originating inside the brain, constitute 14.1% of yearly occurrences, with a disproportionately elevated frequency in children (70% of cases)14,15^{14,15}. Despite their commonality, efficacious therapies for several brain tumor subtypes continue to be elusive, and the enduring adverse consequences of these tumors on patients' quality of life are significant16,17^{16,17}. Moreover, global statistics reveal a significant rise in brain tumor manifestations, with incidence rates escalating by 10–15% from 2004 to 202018^{18}. These numbers emphasize the increasing prevalence of brain tumors and the urgent inevitability of novel approaches to enhance detection, treatment, and patient outcomes. However, the prompt and efficient care of brain cancers depends on precise diagnosis and categorization. The variability of brain tumors regarding size, location, form, and imaging properties, together with changes in scanning settings and modalities, renders this endeavor intrinsically hard19^{19}. Conventional diagnostic methods, such as the Leksell Gamma Knife and radioactive beams, while beneficial, are labor-intensive, need considerable human knowledge, and frequently entail extended processing durations20^{20}. The emergence of sophisticated imaging technologies, such as Computer Tomography (CT), MRI, and Positron Emission Tomography (PET), has transformed brain tumor diagnosis by offering intricate, non-invasive viewing of cerebral structures. MRI is the preferred modality because of its higher soft tissue contrast and capability to acquire multi-parametric data, including T1-weighted, T2-weighted, and FLAIR sequences21^{21}.

Nevertheless, with these breakthroughs, the intricacy of brain tumors persists in posing considerable obstacles for doctors and researchers. The necessity for accurate, automated diagnostic instruments is essential, as early identification and commencement of therapy are pivotal elements affecting patient survival rates22^{22}. The amalgamation of sophisticated imaging data with machine learning (ML) and deep learning (DL) methodologies presents a potential approach to overcoming these problems, facilitating the creation of intelligent systems proficient in precise tumor identification, classification, and segmentation.

The rapid advancement of machine learning (ML) and deep learning (DL) has revolutionized medical imaging, providing robust instruments for the automated examination of intricate datasets23,24^{23,24}. Deep Neural Networks (DNNs), especially Convolutional Neural Networks (CNNs), have exhibited exceptional efficacy in image classification, object recognition, and natural language processing applications25−26^{25-26}. These breakthroughs are driven by enhancements in computing power, particularly GPUs, and the accessibility of extensive, annotated datasets, which have enabled the creation of very precise models for medical applications27,28^{27,28}.

In the realm of brain tumor diagnostics, deep learning models have demonstrated remarkable potential. CNNs, due to their hierarchical structure and capacity to learn spatial feature hierarchies, are especially adept in analyzing medical pictures29^{29}. Techniques including autoencoders, transfer learning, and ensemble approaches have significantly improved the efficacy of these models, allowing them to attain state-of-the-art outcomes in tumor detection and classification30−32^{30-32}. Hybrid models that integrate CNNs with optimization methods, like Particle Swarm Optimization (PSO) and Genetic methods (GAs), have exhibited enhanced efficacy in tumor segmentation and classification tasks33,34^{33,34}.

Despite these achievements, other difficulties persist. Numerous current investigations are constrained by the utilization of small, homogenous datasets, which may insufficiently reflect the range of tumor types, imaging modalities, and patient demographics35,36^{35,36}. Furthermore, the incorporation of deep learning models into clinical practice necessitates the resolution of challenges of computational complexity, interpretability, and generalizability37^{37}. Moreover, the absence of common assessment measures and benchmarking datasets complicates the comparison of various models and methodologies38^{38}.

Substantial advancements have been achieved in the formulation of computer models for brain tumor diagnosis, with an increasing focus on intelligent methodologies. Recent research has shown the capability of machine learning and deep learning approaches to revolutionize brain tumor diagnostics. Almadhoun et al.39^{39} attained 98% test accuracy utilizing a deep learning model on a dataset including 10,000 MR images. Musallam et al.40^{40} suggested a DCNN model achieving an overall accuracy of 97.72% for the classification of four tumor subtypes. Additional significant contributions encompass the use of correlation learning techniques41^{41}, ensemble classifiers42^{42}, and sophisticated designs such as Dense EfficientNet43^{43}, which attained accuracies beyond 98%.

Hybrid models, like those that integrate CNNs with SVM or evolutionary algorithms, have demonstrated encouraging outcomes. Mittal et al.44^{44} shown enhanced segmentation accuracy by the integration of Growing CNN with Stationary Wavelet Transform. Preprocessing approaches, including picture augmentation and multimodal information fusion, have significantly improved the performance of these models45,46^{45,46}. In addition, recent studies in unsupervised domain adaptation have demonstrated promising performance in medical image segmentation such as multi-organ segmentation47^{47}, knee MRI analysis48^{48}, identification of ocular diseases49^{49}. Furthermore, liver segmentation across modalities has been approached using adversarial and self-learning techniques50^{50}.

In a sequel, ML approaches tackle more difficulties associated with dataset variety and computational complexity51,52^{51,52}. The detailed analysis of the literature review is illustrated in Table 1.

Scientific Reports | (2025) 15:29411

| https://doi.org/10.1038/s41598-025-14901-4

natureportfolio

ClassificationReferenceMethod/modelDetailsPerformance metrics
Deep learning modelsAlmadhoun et al. 53^{53},Educational Model utilizing Deep learning algorithmsTransfer learning10,000 MRI imagesTraining accuracy: 100%Testing accuracy: 98%
Musallam et al., 54^{54}DCCN modelMulti categories tumor classificationAccuracy: 97.72%
Nayat et al., 55^{55}Dense efficient/NetHybrid ModelAccuracy: 98.78%
Obeidavi et al., 56^{56}Residual Network based on CNNBRATS dataset 2015Accuracy: 97.05%
Sajjad et al., 57^{57}Hybrid CNN modelCNN + Additional approachesAccuracy: 86%Specificity: 91%
Paual et al. 52^{52}CNN and Fully connected network3064 MRI imagesAccuracy: 91.43%
Mittal et al., 60^{60}Stationary wavelet Transform and CNNFocus on segmentation--
Cinar and Yildirim 63^{63}GoogLeNet, InceptionV3, DenseNet201, AlexNet, and ResNet-50Tumor segmentation and localization
Sangeeta et al., 66^{66}ResNet-50Brain Tumor classificationAccuracy: 96.50%
Liang et al., 65^{65}Fusion of DL modelBrain tumor scaling
Machine learning algorithmsWozniak et al. 58^{58}Correlation learning model3064 brain cancer imagesAccuracy: 96%
Garg et al., 59^{59}Hybrid modelAccuracy: 97.3%
Lotlikar et al., 20^{20}K-nearest neighborBrain datasetAccuracy: 95.6%
Gumaei et al., 47^{47}RELM + PCA-NGISTAccuracy: 94.2%
Pasheal et al., 64^{64}CNN and 10-fold cross-validationAccuracy: 93.6%
Optimization based modelNarayana and Reddy 61^{61}Ensemble modelMRI imagesAccuracy: 91%
Dixit and Nanda 62^{62}PSO and CNN modelBrain tumor detectionAccuracy: 92%

Table 1. Literature review.

This study aims to address the limitations of existing models or predictors by assessing the effectiveness of various machine learning and deep learning models with diverse feature extraction strategies for brain tumor classification in order to achieve high diagnostic accuracy. This research endeavors to provide a robust framework for accurate and timely brain tumor diagnosis, ultimately improving patient outcomes.

The contribution of this study includes:

  • A comprehensive assessment of cutting-edge machine learning and deep learning models for brain tumor categorization.

  • The integration of sophisticated feature extraction methods to enhance model performance.

  • A comparative analysis of the proposed model with existing methodologies, highlighting their limitations and strengths.

Materials and methods Dataset

This research utilizes the publicly accessible Brain Tumor MRI dataset from Kaggle, https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset 67^{67}. The dataset consists of MRI images grouped into two primary categories tumor and non-tumor. Further tumor images were categorized into three subtypes including Pituitary Tumors, Meningioma tumors, and Glioma Tumors. The dataset consists of 2000 MRI images of which 1000 images of non-tumor and 1000 images of tumor. Further, tumor data is composed of 300 images of Pituitary, 400 of Meningioma, and 300 images of Glioma tumors. In order to evaluate the generalization of the model, a large training dataset is used, which consists of 7023 MRI images split into 5712 images for training and 1311 images for testing 63^{63}. In the training dataset, 4117 images are affected by tumors further classified into 1457 images of the pituitary, 1339 images of meningioma, and 1321 images of glioma tumors whereas 1595 images of non-tumor. The testing dataset consists of 1311 images of which 405 images of non-tumors and 906 images of tumors. Tumor images are 300 images of pituitary, 306 images of meningioma, and 300 images of glioma tumors.

This work employed a series of preprocessing and data cleansing steps to augment the quality of brain tumor MRI images and boost the precision and resilience of the classification models. Initially, all images were transformed to grayscale to minimize computational complexity by removing superfluous color channels, as the essential characteristics for classification are based on intensity fluctuations rather than color information. A Gaussian filter was subsequently added to blur images, therefore, diminishing high-frequency noise and enabling the model to concentrate on the most pertinent characteristics while lessening the impact of slight alterations 68^{68}. Subsequently, the binary threshold was executed to convert the grayscale images into binary images. During this process, the pixels' value above the predefined threshold were rendered white (foreground) and those below were assigned black (background). This stage highlighted the delineation of objects, especially tumor areas, thereby facilitating the distinction between malignant tissue and healthy tissue. In a sequel, contour detection methods were utilized to ascertain the greatest contour, which generally represents the tumor region, in each image. The images were subsequently cropped to emphasize the area of interest (ROI), eliminating extraneous background elements and ensuring that the model focused on the most relevant aspects of the image. Ultimately, all images were downsized to a uniform resolution of 128×128128 \times 128 pixels to maintain uniformity throughout the collection.

Scientific Reports | (2025) 15:29411

| https://doi.org/10.1038/s41598-025-14901-4

natureportfolio

Further, several advanced data augmentation techniques were utilized to enhance the diversity of the benchmark training dataset and strengthen the model's ability to generalize to novel data. Data augmentation is a technique that artificially increases the quality such as illumination, size, and orientation as well as the diversity of a dataset by applying various transformations. This research utilized random modifications to brightness and contrast. Brightness was arbitrarily adjusted within a range of 0.8 to 1.2, emulating diverse lighting situations that may arise during image acquisition. Likewise, the contrast was modified within the identical range to assist the model in identifying tumor characteristics across varying imaging settings. Subsequently, all enhanced images were normalized by dividing the pixel values by 255, so scaling them to a range between 0 and 1.

References (78)

  • Intelligent ultralight deep learning model for multiclass brain tumor detection
  • A new deep hybrid boosted and ensemble learning-based brain tumor analysis using MRI
  • Deep learning for smart healthcare: a survey on brain tumor detection from medical imaging
  • An intelligent lung cancer diagnosis system using cuckoo search optimization and support vector machine classifier
  • A review on a deep learning perspective in brain cancer classification
  • Deep learning approach for brain tumor detection and segmentation
  • & Brain tumors
  • Image processing techniques for brain tumor detection: a review
  • Big data analysis for brain tumor detection: deep convolutional neural networks
  • Molecular biomarkerdefined brain tumors: epidemiology, validity, and completeness in the united States
  • Modern brain tumor imaging
  • Update on brain tumor imaging: from anatomy to physiology
  • Computeraided diagnosis of human brain tumor through MRI: a survey and a new algorithm
  • Exposure to lead increases the risk of meningioma and brain cancer: a metaanalysis
  • CNN based multiclass brain tumor detection using medical imaging
  • Data augmentation and transfer learning for brain tumor detection in magnetic resonance imaging
  • Brain tumor detection using machine learning and deep learning: a review
  • Convolutional neural network techniques for brain tumor classification (from 2015 to 2022): review, challenges, and future perspectives
  • Imagenet classification with deep convolutional neural networks
  • Deep Speech 2: Endtoend speech recognition in English and Mandarin
  • A lagrangian dual framework for deep neural networks with constraints (opens arXiv in a new tab)
  • Pointer networks
  • Learning combinatorial optimization algorithms over graphs
  • Machine learning predicts 1[(4fluorophenyl)methyl]indole-2,3dione as drug lead for peptide deformylase in Plasmodium falciparum
  • Attention, learn to solve routing problems! arXiv (opens arXiv in a new tab)
  • Taskbased endtoend model learning in stochastic optimization
  • OptNet: Differentiable optimization as a layer in neural networks
  • Melding the datadecisions pipeline: decisionfocused learning for combinatorial optimization
  • Decoding medical diagnosis with machine learning classifiers (opens the publisher in a new tab)
  • Deep learning in medical image analysis
  • A survey on deep learning in medical image analysis
  • Overview of deep learning in medical imaging
  • Using Convolutional Neural Networks for Image Recognition
  • An Introduction to Convolutional Neural Networks
  • Deep learningbased cardiovascular image diagnosis: a promising challenge
  • Computeraided classification of lung nodules on computed tomography images via deep learning technique
  • Procedia Comput
  • Segmentation and classification of lung tumor from 3D CT image using Kmeans clustering algorithm
  • Twophase multimodel automatic brain tumour diagnosis system from magnetic resonance images using convolutional neural networks
  • Brain tumour segmentation using convolutional neural network with tensorflow
  • Detection of brain tumor by using ANN
  • Detection of brain tumor based on features fusion and machine learning
  • Brain tumor type classification via capsule networks
  • A deep learning-based framework for automatic brain tumors classification using transfer learning
  • A hybrid feature extraction method with regularized extreme learning machine for brain tumor classification
  • Sourcefree unsupervised domain adaptation for crossmodality abdominal multiorgan segmentation
  • Sourcefree unsupervised adaptive segmentation for knee joint MRI
  • MSLINet: retinal disease detection network based on multisegment localization and multiscale interaction
  • Unsupervised domain adaptation for crossmodality liver segmentation via joint adversarial learning and selflearning
  • Dense and diverse capsule networks: making the capsules learn better (opens arXiv in a new tab)
  • Deep learning for brain tumor classification
  • Detection of brain tumor using deep learning
  • A new convolutional neural network architecture for automatic detection of brain tumors in magnetic resonance imaging images
  • Brain tumor classification using dense Efficientnet
  • Tumor detection in brain MRI using residual convolutional neural networks
  • Brain tumor detection and segmentation in MR images using deep learning
  • Deep neural network correlation learning mechanism for CT brain tumor detection
  • Brain tumor detection and classification using machine learning: a comprehensive survey
  • Deep learning based enhanced tumor segmentation approach for MR brain images
  • IEEE., An efficient optimization technique to detect brain tumor from MRI images
  • Brain MR image classification via PSO based segmentation
  • Detection of tumors on brain MRI images using the hybrid convolutional neural network architecture
  • Brain tumor classification via convolutional neural network and extreme learning machines
  • Brain tumor detection based on deep learning approaches and magnetic resonance imaging
  • IEEE., Automatic detection of brain tumor using deep learning algorithms
  • An effective approach to detect and identify brain tumors using transfer learning
  • Advanced brain tumor classification in MR images using transfer learning and pretrained deep CNN models
  • A pilot study of deep learningbased monocular depth estimation from fundus photographs
  • Unveiling the potential pattern representation of RNA 5methyluridine modification sites through a novel feature fusion model leveraging convolutional neural network and tetranucleotide composition
  • A novel predictor for the analysis and prediction of enhancers and their strength via multiview features and deep forest
  • TargetAMP: computational prediction of antimicrobial peptides by coupling sequential information with evolutionary profile
  • NLPBCHEns: NLPbased intelligent computational model for discrimination of malaria parasite
  • cACPDeepGram: classification of anticancer peptides via deep neural network and skipgrambased word embedding model
  • A deep analysis of brain tumor detection from MR images using deep learning networks
  • MRIbased brain tumor detection using convolutional deep learning methods and chosen machine learning techniques
  • Ensemble of deep learning models for brain tumor detection
  • A Comparative Study of Enhanced Machine Learning Algorithms for Brain Tumor Detection and Classification
  • Development of hybrid models based on deep learning and optimized machine learning algorithms for brain tumor multi-classification