Brain tumor detection in MRI using HAMNET: a hybrid attention mechanism for improved accuracy and computational efficiency
Accurate and efficient detection of brain lesions from MRI images remains a major challenge in medical imaging, particularly due to the complexity of tissue patterns and the limited availability of labeled data. In this study, three distinct architectures are proposed: (1) HAMNET-based on a novel hybrid attention mechanism (HAM) combining channel, spatial, and self-attention; (2) a CNN-Transformer hybrid; and (3) a self-supervised learning framework based on SimCLR. Experimental results demonstrate that the CNN-Transformer and HAMNET achieve accuracies of 99.47% and 99.69%, and macro F1-scores of 99.43% and 99.68%, respectively, achieving performance comparable to state-of-the-art Transformer-based models with substantially lower computational cost. Meanwhile, HAMNET, with only 5.03 million parameters, and the CNN-Transformer model, with 5.3 million parameters, are significantly more computationally efficient than pure Transformer-based models such as ViT (85.8 million parameters), while maintaining comparable classification performance. Furthermore, the SimCLR-based self-supervised framework leverages unlabeled data effectively: linear probing, partial fine-tuning, and full end-to-end fine-tuning achieve accuracies of 85.83%, 91.23%, and 98.93%, demonstrating strong representation transferability. All experiments were conducted on a dataset of 7023 four-class MRI images, split into two separate folders with an 80:20 ratio for training and testing. Overall, this study provides an effective and computationally efficient framework with potential applicability to future clinical MRI analysis.
Authors
- Negar Fazaeli (ORCID: https://orcid.org/0009-0002-1012-3779)
- Vahid Mehrdad
Institutions
- Lorestan University (IR)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-08-21
- DOI
- https://doi.org/10.1038/s41598-026-67959-z
- Primary Topic
- Brain Tumor Detection and Classification
- Type
- article
- Field-Weighted Citation Impact
- 0.00