Article contents
A Conditional Positional Encoding and Channel Attention Guided Swin Transformer for Breast Cancer Classification Using MRI and Mammography
Abstract
Automated breast cancer image classification remains challenging when MRI and mammography images must be handled within a single compact architecture while preserving both local lesion texture and global contextual information. This study proposes CPCA-SwinNet, a parameter-efficient Swin Transformer-based framework for benign and malignant breast cancer classification. The model incorporates a Conditional Positional Encoding module using 3 × 3 depthwise convolution to provide resolution-adaptive spatial bias and a Channel Attention Gate that recalibrates feature responses through average- and max-pooling with shared bottleneck transformation. Key training hyperparameters were selected through an offline Grey Wolf Optimizer search, followed by final training with cosine-annealed AdamW. A balanced dataset of 3,800 images was assembled from Breast Cancer MRI, Duke Breast Cancer MRI, and CBIS-DDSM, comprising 1,860 benign and 1,940 malignant images, and split into 70% training, 10% validation, and 20% testing subsets. On the held-out test set of 760 images, CPCA-SwinNet achieved 98.82% accuracy, 99.23% sensitivity, 98.39% specificity, 98.85% F1-score, 0.9763 Matthews correlation coefficient, and 0.9964 AUC-ROC. Five-fold cross-validation yielded 98.77 ± 0.21% accuracy and 0.9962 ± 0.0008 AUC-ROC. Ablation analysis showed a 2.77 percentage-point improvement over the baseline Swin-T model, and McNemar’s test indicated significant gains over nine baseline models after Bonferroni correction. With 31.2 million parameters, CPCA-SwinNet maintains the efficiency profile of Swin-T while improving classification performance. External multi-institutional and prospective validation remains necessary before clinical use.
Article information
Journal
Journal of Computer Science and Technology Studies
Volume (Issue)
6 (3)
Pages
193-218
Published
Copyright
Copyright (c) 2024 https://creativecommons.org/licenses/by/4.0/
Open access

This work is licensed under a Creative Commons Attribution 4.0 International License.

Aims & scope
Call for Papers
Article Processing Charges
Publications Ethics
Google Scholar Citations
Recruitment