BrainAid: Efficient Brain Tumor Detection Using Lightweight CNNs and Explainable AI for Resource-Constrained Environments
Authors: Sai Sriram Gonthina, Ross Gore, Bikash Chandra Singh, Pronaya Bhattacharya, Sachin Shetty, Abhishek Phadke, Sandip Roy
Organizations: Department of Computer Science and Engineering, IIIT - Naya Raipur, Raipur, Chhattisgarh, India · Center for Secure & Intelligent Critical Systems, Old Dominion University, Virginia, USA · Department of Computer Science, California State University, Fresno, USA · Department of Computer Science and Engineering, Amity School of Engineering and Technology, Amity University, Kolkata, India · School of Engineering & Computing, Christopher Newport University, Virginia, USA
A brain tumor is an unusual growth of cells in the brain that can be cancerous or not, affecting normal brain function and causing serious risk to health. Existing solutions for brain tumor classification, such as expert manual evaluations of magnetic resonance imaging (MRI) scans, are generally inconsistent as different professionals have different criteria and can be resource-intensive, leading to delayed diagnoses. Additionally, while deep learning models have demonstrated potential, they typically require significant computational resources, motivating the need for more efficient and accessible diagnostic tools that can be deployed in real-time healthcare settings. To address these limitations, this study presents BrainAid, which makes efficient use of Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) for effective classification of four-class classification of glioma, meningioma, pituitary tumor, and no-tumor MRI scans, outperforming all the standard models such as VGG16, Inception-V3, ResNet-50 and so, while integrating Explainable AI (XAI) to improve interpretability. The BrainAid is trained to classify tumors with a high precision of 98%, achieving an F1 score of 98% and an accuracy of 98% using publicly available dataset. The model is deployed on a Raspberry Pi, demonstrating efficiency in low-resource environments. This system shows the feasibility of real-time, edge-based tumor classification, providing quick diagnostic support for medical professionals and enhancing patient care in resource-limited healthcare facilities and underserved areas.
Figures & tables
Fig. 1: Explainability Challenges: In Grad-CAM visualization, red represents highly activated regions, green represents less activation, and blue represents least focused regions.
Scheme
Year
Concept Applied
Major Contributions
Drawbacks
Anantharajan
2024
* Adaptive Contrast Enhancement
* Algorithm for noise reduction and contrast
* Does not incorporate XAI techniques
et al. [ 17 ]
Algorithm
enhancement of MRI scans
* Need a significant quantity of training
* Gray-Level Co-Occurrence Matrix
* Integrates strength of DNN and SVM
data to function accurately [ 18 ]
* Deep Neural Support Vector Machine
Hossain
2024
* Ensemble Learning
* Included model explainability
* Increased computational cost due to usage
et al. [ 19 ]
* Transfer Learning
* Achieved an accuracy of 96.94%
of multiple models
TABLE I: A comparative summary of recent schemes in Brain Tumor identification
Fig. 2: Schematic Workflow: The proposed BrainAid framework, which is primarily composed of three key constituent blocks: (i) the preprocessing block, (ii) the architecture block, and (iii) the interface block.
Fig. 3: BrainAid CNN Architecture: It is a combination of convolutional 2D, flatten, max pooling, dense, and dropout layers.
Proposed Model
Parameters
Settings
CNN
Input Size
150×150×3
Initial Learning Rate
0.001
Batch Size
32
Number of Train Batches
152
Learning Algorithm
Adam
Loss Function
Cross Entropy
TABLE II: Description of Training Configuration of the developed BrainAid CNN Model
Fig. 4: BrainAid ViT Architecture: Developed ViT model consists of patch splitting, flattening, embedding followed by transformer encoder for feature extraction task and MLP head for classification of tumors.
Model
Metric
Glioma
Meningioma
Pituitary
No Tumor
Macro Avg.
Weighted Avg.
AUC
ResNet-50
Precision
1.00
0.91
0.91
0.99
0.95
0.95
0.998
Recall
0.94
1.00
1.00
0.82
0.94
0.94
F1 Score
0.97
0.95
0.95
0.89
0.94
0.94
VGG16
Precision
0.85
0.87
0.84
0.88
0.86
0.86
0.974
Recall
0.98
0.98
0.88
0.55
0.85
0.86
F1 Score
0.91
0.92
0.86
0.67
0.84
0.85
TABLE III: Quantitative Results of Compared Methods in Terms of precision , recall, F1 score , Classwise Accuracy, corresponding Weighted Accuracy, and Area Under Curve, in which the Best ones are highlighted in BLUE
Fig. 5: Confusion Matrix: A summary of predictions by the developed BrainAid system.
Fig. 6: Model Development: The behavior of the BrainAid in loss over the range of 50 epochs.
Fig. 7: Model Development: The behavior of the BrainAid in accuracy over the range of 50 epochs.
Model
Metric
Glioma
Meningioma
Pituitary
No Tumor
Macro Avg.
Weighted Avg.
SWIN [ 19 ]
Precision
0.80
0.40
0.65
0.28
0.53
0.56
Recall
0.13
0.23
0.67
0.92
0.49
0.43
F1 Score
0.22
0.30
0.66
0.43
0.40
0.39
CCT [ 19 ]
Precision
0.74
0.76
0.78
0.26
0.63
0.68
Recall
0.15
0.60
0.43
0.96
0.53
0.48
F1 Score
0.25
0.67
0.56
0.41
0.47
0.48
TABLE IV: Quantitative Results of Compared ViT Methods in Terms of Precision, Recall, F1 Score, Classwise Accuracy, and corresponding Weighted Accuracy in which the Best ones are highlighted in BLUE and also shaded
Fig. 8: Explainability: this displays the comparison of the key areas targeted by different models, while the developed BrainAid system concentrated on better regions, demonstrating better interpretability.
Method
F1 Score
Accuracy
Number of
(%)
(%)
Classes
W. Mohamed et al. [ 30 ]
98.3
98.0
2
K. Neamah et al. [ 23 ]
99.91
99.02
2
R. Preetha et al. [ 24 ]
99.34
99.33
2
T. K. Behera et al. [ 21 ]
97.0
98
2
A. Sekhar et al. [ 27 ]
97.24
98.3
3
TABLE V: Comparison of Brain Tumor Classification Performance With Existing Methods
Fig. 9: Real-time Deployment: The user selects the MRI scan, the framework then predicts the type of tumor along with the probability score.
Model
Params
Model Size
Inference Time
(Million)
(MB)
(s)
ResNet-50
23
90
3.47
VGG16
14
56
0.94
Inception-V3
21.8
83
5.69
EfficientNet-B0
4
15
4.93
MobileNetV2
2
8
0.06
TABLE VI: Model Comparison on Parameters, Size, and Inference Time
Improving patient outcomes depends on the prompt and accurate diagnosis of brain tumors, but manual MRI scan analysis is still time-consuming and unreliable. Although deep learning has shown promise, many of the models that are now in use are computationally intensive and have difficulty handling the intrinsic complexity and variety of different types of brain tumors. In this work, we propose a lightweight yet high-performing Convolutional Neural Network (CNN) for multi-class brain tumor classification, employing MRI images to target gliomas, meningiomas, pituitary tumors, and healthy (no tumor) instances. The model was rigorously evaluated on two publicly accessible datasets from Figshare and Kaggle. Leveraging efficient feature extraction and optimized training strategies, our CNN achieved classification accuracies of 99.03% and 99.28%, along with ROC scores of 99.88% and 99.94% on Dataset 1 and Dataset 2, respectively-all while utilizing significantly fewer parameters than popular pre-trained architectures. In contrast to cutting-edge models like DenseNet201, MobileNetV2, VGG19, Xception, InceptionV3, and ResNet50, our approach consistently demonstrated superior performance with reduced computational overhead. These findings highlight the potential of the proposed model as a practical and reliable diagnostic aid in clinical environments.
Md Fahimul Kabir Chowdhury, Jannatul Ferdous
Department of Computer Science and Engineering, University of North Texas, USA · Department of Electrical and Electronic Engineering, International Islamic University Chittagong, Bangladesh
Brain tumors represent one of the most critical neurological conditions, where early and accurate diagnosis is directly correlated with patient survival rates. Manual interpretation of Magnetic Resonance Imaging (MRI) scans is time-intensive, subject to inter-observer variability, and demands significant specialist expertise. This paper proposes a deep learning framework for automated four-class brain tumor classification distinguishing glioma, meningioma, pituitary tumor, and healthy brain tissue from a dataset of 7,023 MRI scans. The proposed system employs a Vision Transformer (ViT-B/16) pretrained on ImageNet-21k as the backbone, augmented with a clinically motivated preprocessing and training pipeline. Contrast Limited Adaptive Histogram Equalization (CLAHE) is applied to enhance local contrast and accentuate tumor boundaries invisible to standard normalization. A two-stage fine-tuning strategy is adopted: the classification head is warmed up with the backbone frozen, followed by full fine-tuning with discriminative learning rates. MixUp and CutMix augmentation is applied per batch to improve generalization. Exponential Moving Average (EMA) of weights and Test-Time Augmentation (TTA) further stabilize and boost performance. Attention Rollout visualization provides clinically interpretable heatmaps of the brain regions driving each prediction. The proposed model achieves a test accuracy of 99.29%, macro F1-score of 99.25%, and perfect recall on both healthy and meningioma classes, outperforming all CNN-based baselines
Classifying brain tumors using magnetic resonance imaging (MRI) is crucial for early diagnosis and treatment; however, tumor heterogeneity and a dearth of annotated datasets restrict the use of supervised deep learning approaches. In this work, we use self-supervised learning (SSL) to study multi-class brain tumor classification. Using a ResNet-50 backbone, we evaluate four SSL frameworks including SimCLR, BYOL, DINO, and Moco v3 on a publicly available dataset of 4,448 MRIs with 17 distinct tumor types. On the dataset, SimCLR achieved 99.64% accuracy, 99.64% precision, 99.64% recall, and 99.64% F1-score. The workflow includes preprocessing, fine-tuning, linear evaluation, and SSL pretraining with data augmentations. Results show that, when labels are limited, SSL-pretrained models outperform supervised baselines in terms of F1-score, recall, accuracy, and precision. Additionally, by providing visual insights into model decisions, Explainable AI techniques (Grad-CAM, Grad-CAM++, EigenCAM) enhance interpretability. These results demonstrate SSL's scalability and dependability in diagnosing brain tumors from unlabeled medical data.
Abrar Hossain Zahin, Amit Kumar Saha, Tanvir Mridha +5
Department of Computer Science and Engineering, East West University, Dhaka, 1212, Bangladesh.