Conceptio › Archive › NCBI PubMed Central
NCBI PubMed Central open access

CAHA-Net: A novel MR image classification model based on DenseNet incorporating coordinate attention and hybrid augmentation.

Qi H et al. · ncbi_pmc
NCBI PubMed Central · Papers
Open Source ↗Direct PDF ↓
computer-science-education
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

CAHA-Net: A novel MR image classification model based on DenseNet incorporating coordinate attention and hybrid augmentation - PMC Skip to main content An official website of the United States government Here's how you know Here's how you know Search Log in Primary site navigation Search Log in Search PMC Full-Text Archive Search in PMC Journal List User Guide As a library, NLM provides access to scientific literature. Inclusion in an NLM database does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: PMC Disclaimer | PMC Copyright Notice Sci Rep . 2026 May 28;16:17159. doi: 10.1038/s41598-026-55136-1 CAHA-Net: A novel MR image classification model based on DenseNet incorporating coordinate attention and hybrid augmentation Hui Qi 1 , Ruizhe Guo 2, 3 , Jiajun He 2 , Xiyi Wang 4 , Yaling Han 2, ✉ , Xuchu Jiang 2, ✉ , Chibiao Liu 1, 5, 6 Author information Article notes Copyright and License information 1 School of Information Engineering, Sanming University, Sanming, 365004 China 2 School of Statistics and Mathematics, Zhongnan University of Economics and Law, Wuhan, 430073 China 3 Department of Statistics, University of Warwick, Coventry, CV4 7AL UK 4 School of Mathematics, Sun Yat-sen University, Guangzhou, 510275 China 5 Fujian Key Lab of Agriculture IOT Application, Sanming University, Sanming, 365004 China 6 Fujian Provincial Universities Key Laboratory of Industrial Big Data Analysis and Application, Sanming University, Sanming, 365004 China ✉ Corresponding author. Received 2026 Jan 7; Accepted 2026 May 22; Collection date 2026. © The Author(s) 2026 Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ . PMC Copyright notice PMCID: PMC13234125  PMID: 42209768 Abstract Traditional diagnostic approaches are time-consuming and labor-intensive, and the field currently lacks a comprehensive evaluation of mainstream models that addresses their complementary strengths. Computer-aided diagnosis methods can significantly increase the accuracy and efficiency of MRI-based image classification, thereby providing useful support for brain tumor computer-aided diagnosis research. To address these challenges, this study utilizes a brain tumor MRI dataset comprising 4,264 images from 333 subjects to conduct a comprehensive evaluation of various mainstream Convolutional Neural Networks and Vision Transformers under a repeated patient-level validation protocol. In addition, representative Transformer models are further evaluated under a pretrained partial fine-tuning setting. The results reveal that DenseNet-121 provides a favorable balance between diagnostic performance and computational efficiency under the no-external-pretraining setting, whereas pretrained Transformer models remain competitive when external visual pretraining is available. Building upon these findings, we propose CAHA-Net ( C oordinate A ttention and H ybrid A ugmentation Enhanced DenseNet) , an improved architecture based on DenseNet-121. This method employs a hybrid augmentation strategy combining Contrast Limited Adaptive Histogram Equalization and FMix, aiming to enhance local contrast and increase tumor-background variation during training. Furthermore, by integrating a Coordinate Attention mechanism, the model simultaneously captures spatial positional information in both the horizontal and vertical directions, promoting more lesion-sensitive feature representations during classification. The experimental results demonstrate that CAHA-Net achieves the best average performance among the tested ablation variants in multi-class classification tasks, achieving a Macro-F1 score of 94.14% ± 1.16%, an AUC of 98.97% ± 0.48%, and a false positive rate as low as 1.66% ± 0.39%. The systematic ablation results indicate that FMix is the main independent contributor to performance improvement, whereas coordinate attention helps stabilize feature representation within the complete augmentation-attention pipeline. The proposed model provides preliminary evidence of robustness and cross-dataset transferability, offering an efficient and useful reference for computer-aided diagnostic research on brain tumors. Keywords: Brain tumor, Image classification, Data augmentation, Coordinate attention mechanism, DenseNet Subject terms: Cancer, Computational biology and bioinformatics, Engineering, Mathematics and computing Introduction The rapid proliferation of malignant brain tumors directly threatens the central nervous system and is among the diseases with the highest mortality rates globally. In China, it also ranks among the top ten causes of cancer-related deaths. Therefore, timely and accurate diagnosis of brain tumors is crucial for formulating effective patient treatment plans. Magnetic resonance imaging (MRI), a non-invasive imaging technique free from ionizing radiation, has become one of the most ideal imaging modalities for brain tumor detection because it causes minimal harm to the human body. However, in clinical practice, relying on manual identification and detection of brain tumors from massive volumes of MR images is not only a time-consuming and labor-intensive task but also susceptible to the subjective experience of physicians. To address this, computer aided diagnosis (CAD) technology has emerged, aiming to assist neuro-oncologists in detecting, classifying, and grading tumors more efficiently. Currently, deep learning technologies, particularly CNNs, have achieved remarkable results in the field of medical image-aided diagnosis. Through multi-layered convolutional and pooling operations, CNNs can progressively abstract features from low-level edge textures to high-level semantic representations, thereby accurately detecting and localizing brain tumors in MR images. Although existing deep learning models have made significant progress in brain tumor classification, many challenges remain. For example, medical MR images often suffer from issues such as low contrast, blurred tumor boundaries, and uneven grayscale information, and acquiring high-quality annotated samples is difficult. Furthermore, with the rise of Vision Transformers in the field of computer vision, while they demonstrate excellent performance on natural images, their applicability in the domain of small-sample medical images requires further validation. To address these issues, this study used a brain tumor MR image dataset comprising 4,264 images from 333 subjects to evaluate representative CNN and ViT-family models under a repeated patient-level validation protocol. The benchmark results were interpreted separately for models trained via random initialization and representative pretrained Transformer models evaluated via partial fine-tuning. Under the no-external-pretraining setting, DenseNet-121 achieved a favorable balance between classification performance and computational cost, whereas pretrained Transformer models remained competitive when external visual representations were available. On the basis of these findings, CAHA-Net was developed as a task-oriented refinement of DenseNet-121 by combining Contrast Limited Adaptive Histogram Equalization (CLAHE), FMix, and coordinate attention. CLAHE was used for local contrast enhancement, FMix expanded the sample space through spatially continuous mixed samples, and coordinate attention preserved directional positional cues during feature recalibration. In repeated patient-level ablation experiments, CAHA-Net achieved a macro-F1 score of 94.14% ± 1.16%, an AUC of 98.97% ± 0.48%, and an FPR of 1.66% ± 0.39%, providing a useful reference for brain tumor MRI classification research rather than a clinically validated diagnostic system. Related work Research based on convolutional neural networks Convolutional neural networks have become the mainstream method for medical image analysis because of their powerful feature extraction capabilities and fault tolerance. Early research focused primarily on improving classic architectures. N. Ali et al. 1 combined grayscale normalization and adaptive contrast enhancement preprocessing with variants of the AlexNet architecture to classify brain tumor images, achieving 96.4% accuracy. Al-Ani and Al-Shamma et al. 2 compared VGG-16, GoogLeNet, and ResNet-50 on 3,064 MR images for binary classification and reported that ResNet-50 yielded the best recognition results. Huang et al. 3 proposed DenseNet, which achieves a high degree of feature reuse through dense connections, significantly enhancing the model’s representational ability for complex pathological structures and laying the foundation for subsequent deep network optimization. In terms of model performance enhancement and lightweight exploration, Ali et al. 2 further explored lightweight models, employing GoogLeNet, Shuffle-Net, and NasNet-Mobile for feature extraction, combined with SVM classifiers, to achieve excellent results. Additionally, to address multi-class classification problems, T. Sadad et al. 4 compared “freezing” and “fine-tuning” transfer learning strategies. Experiments have shown that among architectures such as MobileNetV2, InceptionV3, ResNet50, DenseNet169, and NASNext, NASNext achieves the highest accuracy, reaching 98.6%. Nguyen et al. 5 combined VGG-16 with Grad-CAM and LIME interpretation techniques to classify COVID-19 and other lung anomalies (e.g., pleural thickening) on CT images while visualizing lesion areas and verifying the method’s effectiveness via experiments. In recent years, researchers have expanded upon traditional CNN architectures to explore 3D modeling, model ensembles, and multi-modal feature fusion. At the architectural level, Dai Zihang et al. 6 proposed CoAtNet, which successfully fused the inductive bias of CNNs with the global modeling capability of Transformers by vertically stacking convolutional layers and self-attention layers. The NeuroNet19 model proposed by Haque et al. 7 further strengthened interpretability research, enhancing the credibility of deep learning in clinical auxiliary diagnosis by making the decision process explicit. By constructing a large-scale medical dataset containing over 1 million image-mask pairs and utilizing a convolutional encoder to capture high-resolution anatomical details, Ma et al. 8 proposed the MedSAM, which solved the problem of the insufficient generalization ability of traditional CNNs when dealing with unknown lesions. In the fields of segmentation tasks and spatial modeling, the nnU-Net framework proposed by Isensee et al. 9 provides a standardized solution for medical image segmentation through adaptive configuration strategies. In addition, Gümüssoy et al. 10 employed the nnU-Net v2 architecture for 3D automatic segmentation of Cone Beam CT images, further verifying the high-precision potential of deep networks in handling complex anatomical structures. Recent studies have further innovated on the convolution operation itself to better handle specific anatomical structures. For example, Wu et al. 11 proposed Direction-Aware Convolution targeting, which targets the bronchial tree structure of the lung. By dynamically adjusting the kernel shape to enhance the extraction of slender tubular features, they achieved leading performance in airway segmentation tasks. These studies fully demonstrate the effectiveness of CNN architectures in capturing local features of MR images. Zhou et al. 12 proposed a latent representation learning framework for Alzheimer’s disease diagnosis with incomplete multi-modality neuroimaging and genetic data, highlighting the value of robust feature fusion under missing-modality conditions. In this context, Dao et al. 13 proposed LMDP-Net for longitudinal Alzheimer’s disease progression prediction by combining multimodal representation fusion, missing-visit imputation, and an information-retaining LSTM. Although designed for a different multimodal task, its information-flow strategy motivates the image-only adapted baseline LMDP-Net-2D used in this study. Ullah et al. 14 systematically integrated SE and spatial attention modules into several CNN backbones and reported that EfficientNetB5 with hybrid attention achieved strong medical image classification performance, providing the basis for the EffNetB5-SE-SA baseline. Research on ViT and novel architectures In recent years, large-scale models based on Vision Transformers have challenged the dominance of traditional CNNs in the field of natural images, but their application in brain tumor image recognition is still in the nascent stage. Springenberg et al. 15 conducted fine-tuning research on ViT and Swin-ViT architectures—including variants such as ConvNeXt-T, ViT-T/L, and Swin-T/L—on histopathology images, achieving favorable results. To overcome the drawbacks of standard ViT, such as a high computational burden and insufficient capture of local textures, Manzari et al. 16 proposed the MedViT architecture. By integrating a convolutional branch in parallel within the Transformer module, they effectively balanced global dependency modeling with local feature extraction, significantly reducing model parameters while enhancing robustness on medical datasets. From a broader architecture-design perspective, Ullah and Kim explored Kolmogorov–Arnold Network expansions in Vision Transformers, showing that replacing conventional MLP layers with KAN modules can improve knowledge retention in continual-learning image classification 17 . Solak 18 conducted a direct comparative study between ViTs and CNNs in binary classification tasks of brain tumor MR images. The experimental results provide direct evidence that ViT can surpass traditional CNNs in such tasks by leveraging its global attention mechanism, achieving the highest classification accuracy (92.59%). Reddy et al. 19 investigated the performance of various ViT variants in multi-class brain tumor classification under fine-tuning strategies. Rather than introducing new hybrid structures, this study focused on adapting standard, pretrained ViT models (e.g., ViT-B/16, ViT-B/32, ViT-L/16, and ViT-L/32) to brain tumor MR image classification tasks via fine-tuning. On a dataset containing four categories—glioma, meningioma, pituitary tumor, and no tumor—the fine-tuned ViT-L/16 model achieved an outstanding accuracy of 98.70%, proving that standard ViT architectures can achieve extremely high diagnostic precision through appropriate transfer learning. Perera et al. 20 proposed the SegFormer3D architecture, which extends ViT to 3D medical image segmentation. Through multi-scale attention learning, it outperformed some traditional CNN models on the BRaTs brain tumor dataset. Krishnan et al. 21 proposed a medical image-specific rotation-invariant ViT (RViT). To address standard ViT’s sensitivity to variable lesion orientations, they integrated rotation-invariant patch embedding into the framework, increasing rotational robustness. Ullah and Kim 22 proposed HDFE-ViT for brain tumor MRI classification, which fuses features extracted from multiple pretrained ViT variants and combines classical classifiers through ensemble learning. However, Transformer architectures typically have extremely high data volume requirements. In the absence of large-scale medical pre-training data, whether they possess advantages over CNN architectures with inductive bias properties still requires further comprehensive evaluation and validation. Liu et al. constructed a pure Transformer architecture, Swin-UNet, which is based on the Swin Transformer 23 and uses the shifted window mechanism to enhance local feature representation while maintaining linear computational complexity. Data augmentation and feature representation Researchers have recently begun to integrate multidimensional attention mechanisms with advanced data augmentation techniques to address core challenges in medical images, such as subtle lesion features, complex background anatomical structures, and extreme data distribution imbalances. In the domain of data preprocessing and augmentation, efforts have been directed toward augmenting image fidelity and broadening dataset diversity. Mishra A 24 reported that Contrast Limited Adaptive Histogram Equalization (CLAHE) effectively mitigates noise amplification by constraining local histogram slopes; this process sharpens the interface between tumor regions and healthy tissue, thereby facilitating precise segmentation. To circumvent the bottleneck of sample scarcity, Wali A et al. 25 proposed the StynMedGAN. Built upon the StyleGANv2 architecture, this model leverages regularization loss to synthesize high-fidelity, multi-modal medical imagery, thereby establishing a robust data foundation for downstream classification. Furthermore, to promote smoother decision boundaries, Park M et al. 26 implemented the Mix-up technique 27 , which synthesizes virtual samples via linear interpolation in both the pixel and label spaces. Concurrently, Harris et al. 28 introduced FMix, a method that uses frequency-domain masking to preserve spatial context more organically than conventional “cut-and-paste” heuristics. To address the convergence challenges posed by imbalanced data distributions further, the Focal Loss function (Lin et al.) 29 has emerged as a pivotal technique in the contemporary literature to mitigate learning bias. By introducing a dynamic modulating factor, this approach effectively neutralizes the gradient dominance typically exerted by easy-negative samples. Model architecture DenseNet model As the number of layers in CNNs increases, models become increasingly complex, leading to issues such as overfitting and vanishing gradients. Building upon the design philosophy of ResNet, Huang et al. 3 proposed a novel network architecture called DenseNet. This architecture maximizes information flow between layers by simplifying the form of shortcut connections. Specifically, DenseNet achieves efficient feature circulation and reuse by connecting each layer to all preceding layers. Within this structure, each layer not only receives the output features from all prior layers as input but also passes its own generated feature maps to all subsequent layers. Consequently, in a network with L layers, there are actually L(L + 1)/2 connections rather than the L connections found in traditional networks. Although this dense connection approach may intuitively increase the number of parameters, DenseNet actually uses fewer parameters than traditional networks do by avoiding redundant learning of identical feature map information. Furthermore, by enhancing the flow of information and gradients within the network, DenseNet promotes feature propagation and effectively mitigates the vanishing gradient problem. Each layer directly receives both loss function gradients and raw input data from preceding layers, establishing an implicit form of deep supervision that facilitates easier training. Dense connections also serve a regularizing function, improving model performance on small datasets and effectively preventing overfitting. The DenseNet architecture is illustrated in Fig. 1 . Fig. 1. Open in a new tab DenseNet network architecture. Attention mechanism Traditional attention mechanisms such as Squeeze-and-Excitation (SE) attention consider only inter-channel information, neglecting the importance of positional information. Attention mechanisms such as bottleneck attention modules (BAMs) and convolutional block attention modules (CBAM) obtain spatial attention through convolution, but they can capture only local positional information and fail to obtain the global receptive field of an image. This is particularly problematic for brain tumor MR images where key features are dispersed, often leading to information loss. To address this issue, Hou et al. 30 proposed the CA mechanism, whose implementation comprises two steps: dimensional information embedding and attention generation. Given an input X(C×H×W), where C denotes the number of feature map channels, H represents the feature map height, and W indicates the feature map width, each channel is encoded along the horizontal and vertical directions by pooling layers with kernel sizes (H, 1) and (1, W), respectively. This yields horizontal and vertical output features, as shown in Eq. ( 1 ): 1 where represents the input of the -th row and -th column in the -th channel and where and represent the feature map outputs along the horizontal and vertical directions, respectively. Second, the obtained coordinate information is concatenated and convolved to generate precise positional information containing the global receptive field, as shown in Eqs. ( 2 )-( 3 ): 2 3 where represents the convolution with kernel 1; and represent the convolution in the horizontal and vertical directions, respectively; represents the nonlinear activation function; represents the sigmoid function; represents the feature map generated after convolution and nonlinear activation; and represent the feature maps in the horizontal and vertical directions, respectively; and represents the feature map output in the -th row, -th column, and -th channel. The CA structure is shown in Fig. 2 . Fig. 2. Open in a new tab CA mechanism module. Data augmentation Data serve as the core driving force in deep learning training and are crucial for enhancing model performance. A sufficient amount of training data not only mitigates overfitting issues during training but also expands the parameter search space, helping models find global optima. However, in the field of brain tumors, publicly available and accurately annotated MR image data are scarce. Moreover, these images often suffer from low contrast, blurred tumor boundaries, or uneven grayscale information. Consequently, data augmentation has emerged as an effective method for expanding training samples. This paper employs Contrast-Limited Adaptive Histogram Equalization (CLAHE) and the FMix strategy for data augmentation. First, drawing inspiration from the improved CLAHE method proposed by Ke et al. 31 , this paper enhances image visual quality through local contrast enhancement, which is particularly effective for boosting low-contrast regions in medical images. The specific steps are as follows: (1) Color Space Conversion: Convert the original MR image from the RGB space to the HSV space and extract the brightness channel (V channel); (2) Histogram Equalization: Apply the CLAHE method to the V channel, redistributing brightness values to achieve more uniform overall brightness and enhanced contrast. CLAHE avoids the potential over-enhancement issues of traditional histogram equalization by limiting contrast. (3) Image reconstruction: The enhanced brightness channel is merged with the hue (H channel) and saturation (S channel) of the original image and then converted back to the RGB space to obtain the enhanced image. Equations ( 4 )-( 5 ) for the V and S channels in the HSV space are as follows: 4 5 The adaptive brightness conversion Eq. ( 6 ) is as follows, where is the adjusted brightness of the image, represents the actual brightness of the original image before adjustment, and is the brightness threshold. 6 As shown in Fig. 3 , the contrast of the CLAHE processed image is significantly improved, especially for low-contrast and blurry MR images, which can make the boundaries between the tumor area and surrounding normal tissues clearer, helping the DenseNet model extract and utilize feature information more effectively and thereby improving classification performance. Fig. 3. Open in a new tab Visualization of the CLAHE algorithm. Data mixing refers to randomly mixing multiple images to generate new training data. This paper selects the FMix algorithm to perform mixed augmentation on training samples. FMix is a data augmentation method based on the concept of linear mixing. It introduces random masks with spatial continuity in the frequency domain to perform a weighted combination of local regions of two images, thereby generating new training samples. Through this method, the mixing process is no longer limited to global linear interpolation of the entire image but can achieve finer-grained region-level information fusion while maintaining structural continuity. Specifically, two images and their corresponding labels are randomly selected from the training set, and linear interpolation is performed on the selected pair of images via Eqs. ( 7 )-( 9 ) to generate new image samples and their labels: 7 8 9 where the variable represents the randomly selected image vector in the dataset, represents the one-hot encoding vector of the semantic category probability corresponding to image , and . is the final generated image, and is the semantic category probability vector corresponding to . Brain tumor pathology images typically contain different types and scales of tumor regions, as well as complex normal brain tissue backgrounds. FMix combines local regions through spatially continuous masks during the mixing process, allowing the generated samples to maintain the overall structure and local morphological features of the original images while introducing multi-category feature information. Compared with simple global interpolation, this region-level mixing method is more conducive to learning the transition relationships between tumor regions and normal tissues as well as the discriminative features between different tumor types, expanding the distribution range of training data. Through the above method, the model can be exposed to more diverse tumor morphological changes and category combination patterns during training, thereby learning more robust and discriminative feature representations. This reduces the model’s dependence on specific sample distributions, enhancing the model’s generalization ability in the four-class brain tumor diagnosis task and lowering the risk of overfitting. Furthermore, FMix can maintain semantic consistency well at the image level, avoiding the problem of semantic destruction caused by unstructured mixing. The generated samples align more closely with the distribution characteristics of medical images. The visualization effect of the FMix algorithm is shown in Fig. 4 . Fig. 4. Open in a new tab Visualization of the FMix algorithm. (a) Image A, (b) Image B, (c) FMix Result. Algorithm design In the DenseNet model, dense blocks serve as the core feature extraction structure, which is composed of multiple layers interconnected through dense connections. Within each layer, the input features are processed through convolutional layers via 1 × 1 and 3 × 3 convolutional kernels to generate output feature maps. The pooled input feature maps and output feature maps are subsequently concatenated and passed to the next dense block. The input to each dense block preserves all the original feature information from the preceding dense block. Additionally, batch normalization and ReLU activation functions are applied before each convolutional layer to prevent gradient explosion. Nevertheless, owing to the complexity of brain tissue structures, accurate extraction of feature information from brain tumor images is essential for precise tumor classification. However, the DenseNet model design insufficiently accounts for spatial feature location information, placing excessive emphasis on feature extraction alone. This leads to a situation where after data augmentation, critical features in brain tumor pathology image slices—such as the tumor core size and distribution—tend to cluster unevenly toward the image periphery. Consequently, the extracted tumor features become incomplete, adversely affecting the model’s classification accuracy. Therefore, this paper introduces a CA mechanism based on the DenseNet-121 architecture. An enhanced CLAHE&FMix combination is applied at the input stage for data augmentation. A CA module is subsequently embedded after each dense block to construct the CA-DenseNet model. This enhances the network’s ability to perceive tumors in brain MR images, as shown in Fig. 5 . Fig. 5. Open in a new tab CAHA-Net architecture. The computational process is as follows: At the input layer, preprocessed 224 × 224 brain tumor images are fed into the network. At the feature extraction layer, shallow features are first extracted via a 7 × 7 convolution layer and a 3 × 3 max pooling layer. Four dense blocks are subsequently employed, each followed by four CA mechanism modules. Advanced features are then extracted through three transformation layers, enabling the reuse of both shallow and deep features. Within the four dense blocks, the number of densely connected layers is 6, 12, 24, and 16, with a growth rate of 12—meaning that the number of feature maps per layer increases by 12. The reduction factor for the transformation layers is set to 0.5, aiming to halve the number of channels output from the dense block layers. Finally, the feature maps undergo processing through a BatchNorm layer and a 7 × 7 average pooling layer to balance the feature dimensions. The classification task is completed by adapting the fully connected layer to accommodate sample requirements, computing category probabilities via the Softmax function, and selecting the maximum value as the output category label. Experimental results Data sources and preprocessing The experimental data in this paper are sourced from publicly accessible databases: the Brain Tumor Dataset and IXI Dataset. They are primarily categorized into four types: gliomas, meningiomas, pituitary tumors, and non-tumor cases, as shown in Fig. 6 . Fig. 6. Open in a new tab Brain MR image types. (a) glioma tumor, (b) meningioma tumor, (c) tumor-free, (d) pituitary tumor. Since the research objective is to distinguish different brain tumor types and non-tumor cases, this study formulates the task as a four-class classification problem involving gliomas, meningiomas, pituitary tumors, and non-tumor cases. The datasets underwent meticulous preprocessing to minimize inter-dataset variations and facilitate a more stable learning process. (1) During preprocessing, all the images were cropped and uniformly resized to 224 × 224 pixels, aligning with mainstream research standards, ensuring sufficient fine-grained spatial information capture while maintaining computational efficiency. Duplicate images with excessive similarity were removed. (2) All the images were converted to a lossless, uncompressed BMP format to minimize potential information loss during dataset refinement. (3) Channel normalization was applied to all images, employing regional interpolation methods during resizing to maximize information retention. After these steps were implemented, the image distribution was adjusted, resulting in a total of 4,264 MR images. In terms of pathological type, the dataset comprises three categories of brain tumors as well as normal brain images. Specifically, the glioma category included 1,426 images from 89 patients; the meningioma category included 708 images from 82 patients; the pituitary tumor category included 930 images from 62 patients; and the no-tumor category included 1,200 images from 100 patients. Given the limited sample size available, this study adopted a patient-level stratified repeated cross-validation protocol rather than a single fixed split. Specifically, the 333 subjects were evaluated via 3 repeats × 3 folds, yielding 9 matched training-validation splits. Within each repeat, patients were shuffled independently within each class and assigned to folds in a round-robin manner to maintain an approximately balanced class distribution across folds. All slices from the same patient were kept within the same fold, thereby preventing data leakage between the training and validation sets. A series of data augmentation techniques, including random rotation, horizontal and vertical flipping, normalization, contrast enhancement via improved CLAHE and FMix augmentation, were subsequently applied to the images. These methods aim to increase model training effectiveness and generalizability. Experimental environment and parameter settings The experiment was implemented via the PyTorch framework and Python 3.12, running on a Windows platform with CUDA 11.8. The hardware configuration consisted of an Intel i9-13980HX CPU and dual NVIDIA RTX 4070 laptop GPUs (8 GB VRAM). Two evaluation tracks were adopted to separate architecture-level comparisons from transfer-learning effects. In the first track, all benchmark models were trained from random initialization under the same patient-level validation protocol. This setting was used to assess the data efficiency and inductive biases of different architectures without introducing external visual pretraining. In the second track, representative ViT-family models, including DINOv3 Base, Swin Tiny, and ViT Tiny, were additionally evaluated with pretrained weights. A fixed partial fine-tuning strategy was used: the lower backbone layers, accounting for approximately 80% of the model parameters, were frozen, whereas the remaining task-adaptive layers were updated using only the brain tumor training folds. The results from these two tracks were reported separately, allowing the from-scratch comparisons and pretrained adaptation results to be interpreted under their respective assumptions. In addition, the training epochs were adjusted according to the network parameter size. The optimization strategies varied by model type: ViT-T and Swin-T employed stochastic gradient descent (momentum 0.9, weight decay 0.001), whereas the other networks used the Adam optimizer. For the training-from-scratch setting, the learning rate for all the models was uniformly set to 0.001, the training epochs were set to 60, and the batch size was set to 64. Considering the existing discrepancies in quantity and discrimination difficulty among different class samples in the brain tumor four-class classification task and to encourage the model to focus more on samples that are difficult to distinguish during training, this paper selects Focal Loss as the loss function to optimize the model, as shown in Eq. ( 10 ): 10 where represents the loss function, denotes the true label probability of sample , and represents the predicted label probability of sample . For the four-class classification task in this study, considering the potential sample distribution discrepancies among different tumor subtypes, a single accuracy metric is often insufficient to comprehensively measure the model’s recognition capability for each lesion category and is easily dominated by majority class samples. Therefore, this study adopts Macro-F1 as the core metric for model performance evaluation and optimal weight selection. During training, the validation set is evaluated at the end of each epoch, and model weights are updated and saved only when the current epoch’s Macro-F1 score on the validation set exceeds the historical maximum. With respect to the training strategy, given the potential noise during training, we adopt a method of selecting the best-performing model from multiple candidates rather than employing early stopping. This approach helps ensure that the selected model possesses stronger generalizability and robustness, thereby improving the overall training effectiveness. Evaluation criteria Performance metrics serve as fundamental tools for demonstrating the validity and reliability of specific algorithms or models. These metrics provide valuable insights into the performance of a given algorithm, enabling a comprehensive assessment of its operation. While deep learning is revolutionizing the field of brain tumor imaging, the domain currently lacks a comprehensive evaluation of advanced models on the basis of fundamental and complementary quality requirements, often limiting assessment to classification accuracy alone. To address this issue, we compiled common performance metrics from the literature and selected only those with significant relevance to classification tasks. For diagnostic performance, Macro-F1 was used as the primary metric because it assigns equal importance to each class and is suitable for imbalanced multi-class medical image classification. The AUC, Recall, Specificity, and FPR were used as secondary metrics to characterize the discrimination ability, sensitivity, and false-positive behavior. Diagnostic metrics are reported as the means ± standard deviations across the nine matched patient-level validation results from 3 repeats × 3 folds. The 95% confidence interval for macro-F1 was calculated via the t distribution with eight degrees of freedom. For computational efficiency, GPU memory consumption, parameter count, GFLOPs, model size, training time, and FPS were reported to describe the trade-off between predictive performance and resource cost. Table 1 presents these performance metrics, which serve as crucial benchmarks for evaluating the accuracy and effectiveness of different algorithms in brain tumor classification, facilitating a holistic assessment of algorithmic performance. In the table, TP (true positive) represents the number of correctly classified positive samples; FP (false positive) denotes the number of negative samples incorrectly classified as positive; TN (true negative) represents the number of correctly classified negative samples; and FN (false negative) indicates the number of positive samples incorrectly classified as negative. By utilizing these metrics, we can more accurately quantify model performance, ensuring a thorough evaluation of its effectiveness and reliability. Table 1. Evaluation metrics. Metric Formula Unit Function / Definition Macro-F1 [0,1] Calculates the arithmetic mean of the F1-score for each class to measure overall performance in multi-class tasks. 95% CI [0,1] The 95% confidence interval of the mean performance metric across repeated validation splits, used to quantify the uncertainty of the estimated Macro-F1. AUC — [0,1] Area Under the ROC Curve; measures the model’s ability to distinguish between different sample classes. Recall [0,1] Measures the model’s ability to correctly identify positive samples. Spec [0,1] Specificity; measures the model’s ability to correctly identify negative samples. FPR [0,1] False Positive Rate; the proportion of negative samples incorrectly predicted as positive. Train_T — h: m:s Time required to train the model. GPU_Mem — GB GPU memory occupied during training or inference. Params — M Total number of trainable parameters in the model. GFLOPs — — Number of floating-point operations required for a single forward inference pass. Size — MB Model file size in Megabytes FPS — — Frames per second, the number of samples the model can process per second during inference Open in a new tab Performance comparison and discussion First, we conducted classification experiments on the brain tumor MRI dataset via representative CNN architectures and ViT models. Following the repeated-evaluation strategy used by Springenberg et al. 15 , each model was evaluated with three repeats of three-fold patient-level cross-validation. In each repeat, patients were stratified by class and assigned to folds at the subject level so that slices from the same patient were kept within the same partition. The diagnostic metrics reported in Table 2 are summarized as the means and sample standard deviations across the nine validation results, with an additional 95% confidence interval provided for macro-F1. Table 2. Classification performance comparison. Model Epoch Macro-F1 95% CI AUC Recall Spec FPR DINOv3-B 47.0 ± 4.6 0.8610 ± 0.0200 0.8456–0.8764 0.9615 ± 0.0130 0.8602 ± 0.0215 0.9535 ± 0.0118 0.0465 ± 0.0118 NaFlexViT-B 45.0 ± 5.1 0.8042 ± 0.0308 0.7805–0.8279 0.9408 ± 0.0194 0.8015 ± 0.0331 0.9326 ± 0.0168 0.0674 ± 0.0168 ShViT-S4 49.0 ± 4.2 0.9034 ± 0.0165 0.8907–0.9161 0.9818 ± 0.0078 0.9049 ± 0.0174 0.9722 ± 0.0067 0.0278 ± 0.0067 ViT-T 23.0 ± 6.8 0.8038 ± 0.0319 0.7793–0.8283 0.9437 ± 0.0186 0.8010 ± 0.0340 0.9355 ± 0.0182 0.0645 ± 0.0182 ResNet-50 39.0 ± 3.7 0.9087 ± 0.0138 0.8981–0.9193 0.9836 ± 0.0065 0.9116 ± 0.0146 0.9740 ± 0.0059 0.0260 ± 0.0059 ResNet-152 42.0 ± 4.1 0.9048 ± 0.0155 0.8929–0.9167 0.9839 ± 0.0068 0.9081 ± 0.0162 0.9734 ± 0.0065 0.0266 ± 0.0065 ResNeXt-50 40.0 ± 3.8 0.9006 ± 0.0162 0.8881–0.9131 0.9816 ± 0.0074 0.9028 ± 0.0171 0.9711 ± 0.0069 0.0289 ± 0.0069 DenseNet-121 36.2 ± 13.2 0.9140 ± 0.0275 0.8929–0.9351 0.9864 ± 0.0086 0.9152 ± 0.0250 0.9755 ± 0.0089 0.0245 ± 0.0089 DenseNet-201 33.0 ± 4.9 0.9105 ± 0.0149 0.8990–0.9220 0.9859 ± 0.0066 0.9127 ± 0.0158 0.9750 ± 0.0061 0.0250 ± 0.0061 AlexNet 21.0 ± 3.2 0.8754 ± 0.0217 0.8587–0.8921 0.9702 ± 0.0118 0.8786 ± 0.0234 0.9608 ± 0.0109 0.0392 ± 0.0109 Swin-T 45.0 ± 5.5 0.7345 ± 0.0459 0.6992–0.7698 0.9026 ± 0.0315 0.7364 ± 0.0476 0.9068 ± 0.0279 0.0932 ± 0.0279 VGG-16 58.7 ± 2.3 0.8720 ± 0.0234 0.8540–0.8900 0.9684 ± 0.0127 0.8739 ± 0.0248 0.9596 ± 0.0117 0.0404 ± 0.0117 VSSD-T 35.0 ± 4.0 0.9098 ± 0.0146 0.8986–0.9210 0.9848 ± 0.0064 0.9125 ± 0.0152 0.9748 ± 0.0060 0.0252 ± 0.0060 DINOv3-B (PT) 44.0 ± 3.8 0.9248 ± 0.0102 0.9170–0.9326 0.9904 ± 0.0046 0.9272 ± 0.0110 0.9790 ± 0.0048 0.0210 ± 0.0048 Swin-T (PT) 32.0 ± 3.6 0.9206 ± 0.0110 0.9121–0.9291 0.9892 ± 0.0049 0.9238 ± 0.0118 0.9782 ± 0.0050 0.0218 ± 0.0050 ViT-T (PT) 31.0 ± 3.4 0.9183 ± 0.0123 0.9088–0.9278 0.9885 ± 0.0052 0.9215 ± 0.0130 0.9774 ± 0.0054 0.0226 ± 0.0054 Open in a new tab Note: PT denotes pretrained partial fine-tuning. Table 3 summarizes the performance of the selected models on the brain tumor dataset used in this study for the four-class classification task. Under the training-from-scratch setting, the CNN backbones generally achieved stronger and more stable performance than did the randomly initialized Transformer-family models. DenseNet-121 provided the most favorable balance between classification performance and computational cost among the from-scratch models, achieving a Macro-F1 of 0.9140 ± 0.0275 with a 95% confidence interval of 0.8929–0.9351. DenseNet-201 and VSSD Tiny reached comparable mean Macro-F1 values of 0.9105 ± 0.0149 and 0.9098 ± 0.0146, respectively. However, DenseNet-121 requires only 8.27 M parameters and 2.90 GFLOPs, whereas DenseNet-201 requires 20.26 M parameters and 4.39 GFLOPs. These results support the use of DenseNet-121 as the backbone under the no-external-pretraining setting. Table 3. Computational efficiency comparison. Model Train_T GPU_Mem Params GFLOPs Size FPS DINOv3-B 0:05:42 3.7 30.1 5.81 114.98 370 NaFlexViT-B 0:11:27 9.41 86 17.1 329.24 381.7 ShViT-S4 0:05:45 1.74 16.37 0.79 63.15 93 ViT-T 0:05:26 1.94 5.78 1.08 22.36 135.5 ResNet-50 0:04:34 5.65 25.35 4.13 97.01 285.8 ResNet-152 0:09:19 11.59 59.98 11.6 229.72 97.1 ResNeXt-50 0:05:38 7.24 24.82 4.29 95.05 285.8 DenseNet-121 0:06:26 4.77 8.27 2.9 58.65 110.2 DenseNet-201 0:06:19 12.64 20.26 4.39 78.64 58.7 AlexNet 0:01:24 0.33 2.83 0.66 10.81 1786 Swin-T 0:09:11 6.92 28.19 4.37 107.74 138.4 VGG-16 0:06:26 4.77 15.37 15.35 58.65 1105.2 VSSD-T 0:10:28 4.65 28.12 4.93 108.2 - DINOv3-B (PT) 0:03:34 0.40 30.10 5.81 114.98 345.4 Swin-T (PT) 0:02:59 1.24 28.19 4.37 107.74 144.0 ViT-T (PT) 0:02:36 0.44 5.77 1.08 22.39 443.6 Open in a new tab The results also indicate that the relative performance of Transformer-family models strongly depends on the training protocol. When trained from random initialization, DINOv3 Base, ViT-T, and Swin Tiny achieved lower Macro-F1 scores and greater cross-split variability than DenseNet-121. After introducing pretrained partial fine-tuning, however, the same model family became highly competitive. The DINOv3 base with partial fine-tuning achieves the highest mean Macro-F1 score among all benchmark models, reaching 0.9248 ± 0.0102 with a 95% confidence interval of 0.9170–0.9326. Swin Tiny and ViT Tiny with partial fine-tuning also reached Macro-F1 score of 0.9206 ± 0.0110 and 0.9183 ± 0.0123, respectively. These results suggest that the weaker from-scratch performance of Transformer models should be interpreted in relation to the availability of pretrained representations rather than as an inherent limitation of the architecture. Taken together, the benchmark results support DenseNet-121 as a compact and data-efficient backbone for the proposed DenseNet-based framework under the no-external-pretraining setting. Its dense feature reuse mechanism is well suited to limited-sample training, and its computational footprint remains moderate compared with that of deeper CNNs and several modern vision backbones. Moreover, the partial fine-tuning results show that pretrained Transformer models remain strong alternatives when external visual pretraining is available. Therefore, DenseNet-121 was selected as the backbone of CAHA-Net, with the subsequent model design centered on improving its task-specific representation through hybrid augmentation and attention coordinate. This study further comprehensively compares our model with well-performing CNN algorithms from the same domain that have been open-sourced in the past two years, as shown in Table 4 . The proposed model achieved favorable performance across Macro-F1, AUC, Recall, and FPR metrics. It maintained high recall while reducing the false positive rate, indicating a balanced performance profile under the current evaluation protocol. These findings suggest that CAHA-Net can improve the DenseNet-121 backbone for the present brain tumor MRI classification task. Table 4. Performance comparison of different algorithms. Model Epoch Macro-F1 95% CI AUC Recall Spec FPR EffNetB5-SE-SA 38.7 ± 5.5 0.9211 ± 0.0184 0.9070–0.9352 0.9887 ± 0.0060 0.9246 ± 0.0181 0.9784 ± 0.0062 0.0216 ± 0.0062 LMDP-Net-2D 5.0 ± 1.8 0.9348 ± 0.0128 0.9250–0.9446 0.9889 ± 0.0049 0.9360 ± 0.0131 0.9812 ± 0.0044 0.0188 ± 0.0044 NnUNetV2 52.0 ± 6.3 0.9296 ± 0.0141 0.9188–0.9404 0.9874 ± 0.0052 0.9324 ± 0.0145 0.9801 ± 0.0049 0.0199 ± 0.0049 CAHA-Net 44.6 ± 9.6 0.9414 ± 0.0116 0.9324–0.9503 0.9897 ± 0.0048 0.9399 ± 0.0129 0.9834 ± 0.0039 0.0166 ± 0.0039 Open in a new tab Note: The bold text represents the best results in each column. To further examine cross-dataset transferability, CAHA-Net was evaluated on three additional public brain tumor MRI datasets from Kaggle. Two settings were considered for each dataset: the fine-tuning from the pretrained CAHA-Net weights and training the same architecture from scratch. The transfer ACC denotes the accuracy obtained after fine-tuning the pretrained model, whereas the base ACC denotes the accuracy obtained by training CAHA-Net from scratch on the corresponding dataset. The reference ACC represents the best previously reported result available for the same Kaggle dataset and is included only as an external reference because differences in data splits, preprocessing, and evaluation protocols may limit direct comparability. As shown in Table 5 , CAHA-Net maintained high accuracy on the three additional public datasets under both the fine-tuning and training-from-scratch settings. Fine-tuning from the pretrained CAHA-Net weights achieved ACC values of 98.61%, 97.52%, and 92.70%, whereas training the same architecture from scratch yielded 98.92%, 98.31%, and 93.67%, respectively. The from-scratch setting slightly outperformed the fine-tuning setting on these datasets, suggesting that dataset-specific adaptation remained important despite the use of pretrained CAHA-Net weights. Compared with the reported reference results, CAHA-Net was competitive on the first two datasets but remained lower on the third dataset. These findings provide preliminary evidence of cross-dataset transferability on public MRI datasets, but further validation in independent multi-center clinical cohorts is still needed to assess real-world generalizability. Table 5. Migration effects on different brain tumor datasets. Dataset Transfer ACC% Base ACC% Reference ACC% Brain MR Images for Brain Tumor Detection 98.61 98.92 99.30 Brain Tumor Image Dataset 97.52 98.31 98.13 Medical Image DataSet: Brain Tumor Detection 92.70 93.67 95.88 Open in a new tab Note: The bold text represents the best results in each column. Analysis Ablation study On the basis of the comparative results in Sect. “ Experimental results ”, DenseNet-121 was selected as the backbone for the ablation study because it showed a favorable balance between classification performance and computational efficiency under the training-from-scratch setting. To examine the contribution of each component, eight variants were evaluated by progressively introducing CLAHE, FMix, and coordinate attention into the DenseNet-121 baseline. Each variant was assessed via three repeats of three-fold patient-level stratified cross-validation, resulting in nine matched validation results. Macro-F1 was used as the primary endpoint, while AUC, Recall, Specificity, FPR, and validation loss were analyzed as secondary indicators. The performance metrics from the ablation experiments are presented in Tables 6 and 7 . Table 6. Comparative analysis of ablation on different modules. Model Epoch Macro-F1 95% CI AUC Recall Spec FPR Val Loss Base 36.2 ± 13.2 0.9140 ± 0.0275 0.8929–0.9351 0.9864 ± 0.0086 0.9152 ± 0.0250 0.9755 ± 0.0089 0.0245 ± 0.0089 0.1135 ± 0.0540 Base+CLAHE 19.1 ± 8.3 0.9100 ± 0.0257 0.8902–0.9298 0.9856 ± 0.0092 0.9145 ± 0.0241 0.9745 ± 0.0081 0.0255 ± 0.0081 0.0983 ± 0.0309 Base + CA 38.0 ± 12.6 0.9225 ± 0.0258 0.9027–0.9424 0.9878 ± 0.0077 0.9242 ± 0.0244 0.9780 ± 0.0080 0.0220 ± 0.0080 0.1142 ± 0.0519 Base+CLAHE + CA 37.4 ± 11.3 0.9197 ± 0.0237 0.9015–0.9379 0.9879 ± 0.0064 0.9224 ± 0.0243 0.9773 ± 0.0077 0.0227 ± 0.0077 0.1067 ± 0.0435 Base+FMix 46.9 ± 9.2 0.9363 ± 0.0162 0.9238–0.9488 0.9875 ± 0.0068 0.9386 ± 0.0165 0.9822 ± 0.0056 0.0178 ± 0.0056 0.0811 ± 0.0330 Base+CLAHE+FMix 17.7 ± 6.7 0.9067 ± 0.0308 0.8830–0.9304 0.9853 ± 0.0077 0.9068 ± 0.0351 0.9732 ± 0.0095 0.0268 ± 0.0095 0.0962 ± 0.0330 Base+FMix + CA 43.2 ± 15.4 0.9355 ± 0.0186 0.9211–0.9498 0.9889 ± 0.0067 0.9354 ± 0.0176 0.9815 ± 0.0057 0.0185 ± 0.0057 0.0798 ± 0.0351 CAHA-Net 44.6 ± 9.6 0.9414 ± 0.0116 0.9324–0.9503 0.9897 ± 0.0048 0.9399 ± 0.0129 0.9834 ± 0.0039 0.0166 ± 0.0039 0.0753 ± 0.0220 Open in a new tab Note: The bold text represents the best results in each column. Table 7. Pairwise Macro-F1 comparison. Comparison Δ Macro-F1 p -value Base+CLAHE vs. Base −0.0040 0.539 Base + CA vs. Base 0.0086 0.0689 Base+CLAHE + CA vs. Base 0.0057 0.0470* Base+FMix vs. Base 0.0223 0.0062** Base+CLAHE+FMix vs. Base −0.0073 0.4676 Base+FMix + CA vs. Base 0.0215 0.0017** CAHA-Net vs. Base 0.0274 0.0087** Base+CLAHE + CA vs. Base + CA −0.0028 0.5533 Base+CLAHE+FMix vs. Base+FMix −0.0296 0.0099** Base+FMix + CA vs. Base+FMix −0.0008 0.7158 CAHA-Net vs. Base+CLAHE+FMix 0.0347 0.0044** CAHA-Net vs. Base+FMix 0.0051 0.2242 Open in a new tab Note: Δ Macro-F1 is calculated as the former configuration minus the latter configuration. P values were obtained via paired t tests on the nine matched patient-level validation splits. * p < 0.05; ** p < 0.01. CAHA-Net integrates three complementary operations within a DenseNet-121 backbone: local contrast enhancement, region-level sample mixing, and coordinate-aware feature recalibration. CLAHE improves local intensity contrast in low-contrast MR images, FMix expands the training distribution through spatially continuous mixed samples, and coordinate attention preserves directional positional information during feature aggregation. This design aligns the augmentation stage with the subsequent attention-guided feature extraction process, aiming to improve lesion-sensitive representation under limited-sample conditions. The augmentation-related results show that the two preprocessing and augmentation strategies play different roles. CLAHE alone did not provide a stable improvement over the baseline, suggesting that local contrast enhancement by itself was insufficient to improve classification robustness under the current protocol. In contrast, FMix produced the clearest independent gain among the tested components, improving Macro-F1 by 2.23% points over the baseline and outperforming it in all the matched validation splits. This finding indicates that spatially continuous region-level mixing was more effective than contrast enhancement alone in expanding the decision space of the classifier. However, directly combining CLAHE with FMix did not yield an additive effect; the CLAHE+FMix variant performed worse than FMix alone. This result suggests that enhancing local contrast before region-level mixing may also introduce intensity variations that are not consistently beneficial. Therefore, the augmentation strategy should be interpreted as a structured pipeline whose effectiveness depends on how contrast enhancement, sample mixing, and feature recalibration are coordinated rather than as a simple accumulation of preprocessing operations. The role of coordinate attention becomes clearer when it is interpreted in relation to the augmentation pipeline. As an isolated architectural modification, coordinate attention produced favorable but moderate improvement, and its independent effect was not strong enough to fully explain the final performance gain. This is consistent with the nature of the module: coordinate attention does not create new training samples but guides the network to preserve directional positional information and suppress diffuse background responses during feature aggregation. Its value was most evident in the full CAHA-Net configuration, where it improved the unstable CLAHE+FMix setting and contributed to the lowest FPR and validation loss among the ablation variants. Thus, coordinate attention is better understood as a stabilizing feature-recalibration component that helps the model use augmented samples more effectively rather than as a standalone source of large performance improvement. Taken together, the ablation results support the rationale of CAHA-Net as a task-oriented integration of augmentation and coordinate-aware feature recalibration. FMix provided the main independent performance gain by increasing sample diversity, whereas coordinate attention improved the stability of the fully augmented model by guiding feature responses toward lesion-relevant regions. CLAHE did not show a stable independent benefit, but within the complete design, it serves as part of the contrast-enhancement stage before spatial mixing and attention-based recalibration. The full CAHA-Net achieved the highest mean Macro-F1 score, the lowest FPR, and the lowest validation loss among the evaluated variants. Nevertheless, its additional improvement over FMix alone was not statistically confirmed. Therefore, the contribution of CAHA-Net should be interpreted as an incremental but coherent refinement of the DenseNet-121 backbone rather than as a claim that each component contributes equally or that their combination guarantees a strong synergistic effect. Visual analysis Additionally, to more intuitively demonstrate the role of the CA mechanism in the feature extraction process, this paper uses gradient-weighted class activation mapping (Grad-CAM) 32 to visualize the model’s class-discriminative activation patterns, as shown in Fig. 7 . Fig. 7. Open in a new tab Visualization Results. (a) Original image, (b) DenseNet, (c) CAHA-Net. The first column in the figure shows the original MR image of the brain tumor, with the white areas indicating the lesion regions. The second and third columns display the visualization heatmaps of the original DenseNet model and the CAHA-Net model proposed in this paper, respectively. In the heatmaps, redder and deeper colors indicate that the feature weight of that region in the model’s decision-making process is greater. Grad-CAM visualization was further used to compare the activation behavior of DenseNet-121 and CAHA-Net. Across the displayed examples, CAHA-Net showed more compact activation around lesion-related regions, whereas DenseNet-121 exhibited broader responses that extended into surrounding areas. This difference is consistent with the coordinate attention module, which preserves directional positional cues during feature aggregation. Given the image-level classification setting of this study, the visualization results are used as qualitative evidence for comparing activation behavior rather than as a localization benchmark. The differences in activation can be further understood from the functional roles of the proposed components. CLAHE enhances local intensity contrast and may make lesion boundaries more distinguishable at the input level, whereas FMix exposes the model to region-level variations between the tumor and background areas during training. On this basis, coordinate attention further guides feature aggregation by preserving directional positional cues. The resulting activation maps suggest that CAHA-Net relies less on diffuse surrounding responses and forms more lesion-sensitive representations than the baseline DenseNet-121 does. This visual evidence complements the ablation results, where the full model achieves the best average Macro-F1 score and the lowest FPR among the evaluated variants, supporting the role of the augmentation-attention pipeline in improving classification behavior. Conclusion This study investigated deep learning-based brain tumor MRI classification via representative CNN backbones, Transformer-family models, and modern vision architectures. Under the training-from-scratch setting, the CNN backbones achieved favorable data efficiency on the limited-sample MRI dataset, and DenseNet-121 provided a strong balance between classification performance and computational cost. Moreover, the partial fine-tuning results revealed that the pretrained Transformer models remained competitive when external visual representations were available. These findings indicate that model performance in small-sample medical image classification should be interpreted in relation to the training protocol, model capacity, and availability of pretrained weights. The proposed CAHA-Net was developed as a task-oriented refinement of the DenseNet-121 backbone by integrating local contrast enhancement, region-level mixed-sample augmentation, and coordinate-aware feature recalibration. The ablation results indicate that FMix was the main independent contributor to performance improvement, whereas coordinate attention helped stabilize feature representation within the complete augmentation-attention pipeline. The full CAHA-Net configuration achieved the highest mean Macro-F1, the lowest FPR, and the lowest validation loss among the tested ablation variants, although its additional gain over FMix alone was not statistically confirmed. Cross-dataset experiments on additional public brain tumor MRI datasets further provided preliminary evidence of public dataset transferability across public data sources, supporting the potential of CAHA-Net as a basis for subsequent validation in larger and more heterogeneous clinical cohorts. Overall, this study provides a structured evaluation of multiple visual backbones and a focused improvement over DenseNet-121 for brain tumor MRI classification. Rather than presenting CAHA-Net as a clinically validated diagnostic system, the present work positions it as a compact and task-oriented model that may serve as a useful reference for computer-aided diagnosis research. Further validation under multi-center, multi-scanner, and prospective clinical settings will be necessary before its practical deployment can be assessed. This study has several limitations. (1) Although repeated patient-level cross-validation was used and additional public datasets were included for transferability analysis, the experiments were still based mainly on publicly available MRI datasets. These datasets may share similar acquisition or preprocessing characteristics and cannot be used as substitutes for validation in independent multi-center clinical cohorts. (2) The pretrained Transformer experiments were designed as representative partial fine-tuning references rather than exhaustive hyperparameter optimization of all the pretrained models. (3) Grad-CAM visualization was used to analyze activation behavior, but no expert-annotated lesion masks or quantitative localization metrics were available to evaluate attention localization systematically. Addressing these limitations warrants further research. Future work should extend the evaluation to multi-center and multi-scanner cohorts and include prospective testing to better characterize model robustness under real-world distribution shifts. Multimodal fusion involving MRI, CT, PET, and genomic information may also be explored to provide a more comprehensive representation of tumor characteristics. In addition, self-supervised and small-sample learning strategies, such as contrastive learning, masked image modeling, and meta-learning, could be investigated to reduce dependence on large annotated datasets and improve adaptation to heterogeneous medical imaging scenarios. Author contributions conceptualization, H.Q.; methodology, R.G.; formal analysis, J.H.; data curation, X.W.; supervision, C.L.; writing—original draft preparation, X.J.; writing—review and editing, Y.H. Funding This research was supported by the Fujian Provincial Natural Science Foundation of China (2024J01903 and 2025J01393) and the Key Project of the Education Department of Fujian Province ( JZ230054 ). Data availability The data and code used in this article are stored on the following website: https://github.com/Jiajun-H/CAHA-Net. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Yaling Han, Email: z0001605@zuel.edu.cn. Xuchu Jiang, Email: xuchujiang@zuel.edu.cn. References 1. Ali, N. A. et al. Design of automated computer-aided classification of brain tumor using deep learning[M]. Intelligent and Interactive Computing: Proceedings of IIC 2018 . Singapore: Springer Singapore, : 285–291. (2019). 2. Al-Ani, N. & Al-Shamma, O. Implementing a novel low complexity CNN model for brain tumor detection[C]. 2022 8th International Conference on Contemporary Information Technology and Mathematics (ICCITM). IEEE , 358–363. (2022). 3. Huang, G. et al. Densely connected convolutional networks[C]. Proceedings of the IEEE conference on computer vision and pattern recognition . 4700–4708. (2017). 4. Sadad, T. et al. Brain tumor detection and multi-classification using advanced deep learning techniques[J]. Microsc. Res. Tech. 84 (6), 1296–1308 (2021). [ DOI ] [ PubMed ] [ Google Scholar ] 5. Nguyen, H. T. et al. Interpreting Results of VGG-16 for COVID-19 Diagnosis on CT Images[C]. International Conference on Computational Collective Intelligence. Cham : Springer Nature Switzerland, 133–145. (2024). 6. Dai, Z. et al. Coatnet: Marrying convolution and attention for all data sizes[J]. Adv. Neural. Inf. Process. Syst. 34 , 3965–3977 (2021). [ Google Scholar ] 7. Haque, R. et al. NeuroNet19: an explainable deep neural network model for the classification of brain tumors using magnetic resonance imaging data[J]. Sci. Rep. 14 (1), 1524 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 8. Ma, J. et al. Segment anything in medical images[J]. Nat. Commun. 15 (1), 654 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 9. Isensee, F. et al. nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation[J]. Nat. Methods . 18 (2), 203–211 (2021). [ DOI ] [ PubMed ] [ Google Scholar ] 10. Gümüssoy, I. et al. Automated 3D segmentation of the hyoid bone in CBCT using nnU-Net v2: a retrospective study on model performance and potential clinical utility[J]. BMC Med. Imaging . 25 (1), 217 (2025). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 11. Wu, Q., Wang, Y. & Zhang, Q. Direction-Aware Convolution for Airway Tubular Feature Enhancement Network[J]. Med. Image. Anal. , 103882 (2025). [ DOI ] [ PubMed ] 12. Zhou, T. et al. Latent representation learning for Alzheimer’s disease diagnosis with incomplete multi-modality neuroimaging and genetic data[J]. IEEE Trans. Med. Imaging . 38 (10), 2411–2422 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 13. Dao, D. P. et al. Longitudinal Alzheimer’s disease progression prediction with modality uncertainty and optimization of information flow[J]. IEEE J. biomedical health Inf. 29 (1), 259–272 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 14. Ullah, Z. et al. Systematic Integration of Attention Modules into CNNs for Accurate and Generalizable Medical Image Classification[J]. Mathematics 13 (22), 3728 (2025). [ Google Scholar ] 15. Springenberg, M. et al. From modern CNNs to vision transformers: Assessing the performance, robustness, and classification strategies of deep learning models in histopathology[J]. Med. Image. Anal. 87 , 102809 (2023). [ DOI ] [ PubMed ] [ Google Scholar ] 16. Manzari, O. N. et al. MedViT: a robust vision transformer for generalized medical image classification[J]. Comput. Biol. Med. 157 , 106791 (2023). [ DOI ] [ PubMed ] [ Google Scholar ] 17. Ullah, Z. & Kim, J. Exploring Kolmogorov–Arnold Network Expansions in Vision Transformers for Mitigation of Catastrophic Forgetting in Continual Learning[J]. Mathematics 13 (18), 2988 (2025). [ Google Scholar ] 18. Solak, A. A Comparative Analysis of Vision Transformers and Transfer Learning for Brain Tumor Classification[J]. Duzce Univ. J. Sci. Technol. 13 (1), 558–572 (2025). [ Google Scholar ] 19. Reddy, C. K. K. et al. A fine-tuned vision transformer based enhanced multi-class brain tumor classification using MRI scan imagery[J]. Front. Oncol. 14 , 1400341 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 20. Perera, S., Navard, P. & Yilmaz, A. Segformer3d: an efficient transformer for 3d medical image segmentation[C]. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition . 4981–4988. (2024). 21. Krishnan, P. T. et al. Enhancing brain tumor detection in MRI with a rotation invariant Vision Transformer[J]. Front. neuroinformatics . 18 , 1414925 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 22. Ullah, Z. & Kim, J. Hierarchical deep feature fusion and ensemble learning for enhanced brain tumor MRI classification[J]. Mathematics 13 (17), 2787 (2025). [ Google Scholar ] 23. Liu, Z. et al. Swin transformer: Hierarchical vision transformer using shifted windows[C]. Proceedings of the IEEE/CVF international conference on computer vision. 10012–10022. (2021). 24. Mishra, A. Contrast limited adaptive histogram equalization (CLAHE) approach for enhancement of the microstructures of friction stir welded joints[J]. (2021). arXiv preprint arXiv:2109.00886 . 25. Wali, A. et al. StynMedGAN: Medical images augmentation using a new GAN model for improved diagnosis of diseases[J]. J. Intell. Fuzzy Syst. 44 (6), 10027–10044 (2023). [ Google Scholar ] 26. Park, M. & Kim, J. Self-Training with Entropy-Based Mixup for Low-Resource Chest X-ray Classification[J]. Appl. Sci. 13 (12), 7198 (2023). [ Google Scholar ] 27. Zhang, H. et al. mixup: Beyond empirical risk minimization[J]. (2017). arXiv preprint arXiv:1710.09412 . 28. Harris, E. et al. Fmix: Enhancing mixed sample data augmentation[J]. arXiv preprint arXiv:2002.12047 , (2020). 29. Lin, T. Y. et al. Focal loss for dense object detection[C]. Proceedings of the IEEE international conference on computer vision . 2980–2988. (2017). 30. Hou, Q., Zhou, D. & Feng, J. Coordinate attention for efficient mobile network design[C]. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 13713–13722. (2021). 31. Ke, P. P., Chen, S. & Li, K. R. A Brain Tumor Magnetic Resonance Image Segmentation Algorithm Based on CA-Net[J]. Intell. Comput. Appl. 12 (09), 208 (2022). [ Google Scholar ] 32. Selvaraju, R. R. et al. Grad-cam: Visual explanations from deep networks via gradient-based localization[C]. Proceedings of the IEEE international conference on computer vision. 618–626. (2017). Associated Data This section collects any data citations, data availability statements, or supplementary materials included in this article. Data Availability Statement The data and code used in this article are stored on the following website: https://github.com/Jiajun-H/CAHA-Net. Articles from Scientific Reports are provided here courtesy of Nature Publishing Group ACTIONS View on publisher site PDF (2.3 MB) Cite Collections Permalink RESOURCES Similar articles Cited by other articles Links to NCBI Databases Follow NCBI NCBI on X (formerly known as Twitter) NCBI on Facebook NCBI on LinkedIn NCBI on GitHub NCBI RSS feed Connect with NLM NLM on X (formerly known as Twitter) NLM on Facebook NLM on YouTube National Library of Medicine 8600 Rockville Pike Bethesda, MD 20894 Web Policies FOIA HHS Vulnerability Disclosure Help Accessibility Careers NLM NIH HHS USA.gov Back to Top

Related documents

Record · ID 263164 · SHA-256 8778598f91425770
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive