Swin Transformer V2 for Invasive Ductal Carcinoma Classification in Histopathological Imaging

Puguh Aiman Ariyanto, Untari Novia Wisesty

Abstract


Breast cancer is the second leading cause of mortality in women globally, with Invasive Ductal Carcinoma being the most dominant subtype that requires accurate diagnosis to increase patient life expectancy. Conventional diagnosis based on manual histopathological examinations is time-consuming, prone to misinterpretation, and exhibits significant inter-observer variability. This study implemented the Swin Transformer V2 architecture for the automatic classification of Invasive Ductal Carcinoma on 277,524 histopathological images, each measuring 50×50 pixels, which were resized to 256×256 pixels with geometric augmentation. The model was trained using AdamW optimization with a learning rate of 1 × 10⁻⁴, weight decay of 1 × 10⁻⁴, a batch size of 16, and mixed precision (FP16) for five epochs at a 70:20:10 data sharing ratio. The data augmentation includes a 50% probability of a random horizontal flip and a maximum of 10 degrees of random rotation to improve the model's generalization capabilities. Evaluation of 27,754 independent test samples resulted in an accuracy of 92.82%, an accuracy of 88.48%, a recall of 86.05%, an F1-score of 87.25%, and an AUC of 0.91. A hierarchical window attention-shifted mechanism with residual post-normalization has been shown to be effective in extracting local and global features from complex microscopic images. The results show that Swin Transformer V2 has significant potential as a diagnostic aid system to enhance the efficiency and accuracy of early breast cancer detection in clinical pathology practice.

Keywords


Deep learning; Invasive Ductal Carcinoma; Breast cancer; Histopathological Images; Swin Transformer V2

References


A. Ibrahim, H. Torkey, and A. El-Sayed, "Invasive Ductal Carcinoma (IDC) Nuclei Classification using Mask RCNN," Menoufia J. Electron. Eng. Res., vol. 34, no. 2, pp. 20–30, 2025, doi: 10.21608/mjeer.2025.351724.1103.

A. Zeynali, M. A. Tinati, and B. M. Tazehkand, “Hybrid CNN-Transformer Architecture With Xception-Based Feature Enhancement for Accurate Breast Cancer Classification,” IEEE Access, vol. 12, no. December, pp. 189477–189493, 2024, doi: 10.1109/ACCESS.2024.3516535.

M. Thahiruddin, "CNNs vs. Hybrid Transformers for Brain Tumor Classification on the BRISC Dataset," J. Apl. Technology. Inf. and Manaj., vol. 6, no. 1, pp. 24–33, 2025, doi: 10.31102/jatim.v6i1.3545.

O. Tanimola, O. Shobayo, O. Popoola, and O. Okoyeigbo, "Breast Cancer Classification Using Fine-Tuned SWIN Transformer Model on Mammographic Images," Analytics, vol. 3, no. 4, pp. 461–475, 2024, doi: 10.3390/analytics3040026.

S. Tummala, J. Kim, and S. Kadry, "BreaST-Net: Multi-Class Classification of Breast Cancer from Histopathological Images Using Ensemble of Swin Transformers," Mathematics, vol. 10, no. 21, 2022, doi: 10.3390/math10214109.

B. Jiang, L. Bao, S. He, X. Chen, Z. Jin, and Y. Ye, "Deep learning applications in breast cancer histopathological imaging: diagnosis, treatment, and prognosis," Breast Cancer Res., vol. 26, no. 1, 2024, doi: 10.1186/s13058-024-01895-6.

Z. Liu et al., "Swin Transformer V2: Scaling Up Capacity and Resolution," Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2022-June, pp. 11999–12009, 2022, doi: 10.1109/CVPR52688.2022.01170.

B. Guo, X. Li, M. Yang, J. Jonnagaddala, H. Zhang, and X. S. Xu, "Predicting microsatellite instability and key biomarkers in colorectal cancer from H&E-stained images : achieving state-of-the-art predictive performance with fewer data using Swin Transformer," no. May, pp. 223–235, 2023, doi: 10.1002/cjp2.312.

J. Saeed and M. Hussein, "Empowering Ovarian Cancer Subtype Classification with Parallel Swin Transformers and WSI Imaging," vol. 21, no. 6, pp. 1006–1014, 2024.

V. Sreelekshmi, K. Pavithran, and J. J. Nair, "SwinCNN : An Integrated Swin Transformer and CNN for Improved Breast Cancer Grade Classification," IEEE Access, vol. 12, no. May, pp. 68697–68710, 2024, doi: 10.1109/ACCESS.2024.3397667.

S. Tummala, J. Kim, and S. Kadry, "BreaST-Net: Multi-Class Classification of Breast Cancer from Histopathological Images Using Ensemble of Swin Transformers," Mathematics, vol. 10, no. 21, pp. 1–7, 2022, doi: 10.3390/math10214109.

B. Yuan, Y. Hu, Y. Liang, Y. Zhu, and L. Zhang, "Comparative analysis of convolutional neural networks and transformer architectures for breast cancer histopathological image classification," vol. 999, no. June, pp. 1–17, 2025, doi: 10.3389/fmed.2025.1606336.

Y. Vishwakarma and A. A. Waoo, "Swin Transformer for Breast Cancer Classification using Histopathology Images," vol. 11, no. 3, pp. 120–127, 2023.

A. Stanisławek, "Breast Cancer—Epidemiology, Risk Factors, Classification, Prognostic Markers, and Current Treatment Strategies—An Updated Review," pp. 1–30, 2021.

G. Aji Mahesa, "Classification of Histological Images of Breast Cancer Using the CNN Ensemble Method," J. Repos., vol. 4, no. 3, pp. 373–384, 2022, doi: 10.22219/repositor.v4i3.1497.

H. C. Tang, Y. Dong, T. Huang, M. F. Han, and J. Fu, "Foreign object detection for transmission lines based on Swin Transformer V2 and YOLOX," Vis. Comput., vol. 40, no. 5, pp. 3003–3021, 2024.

P. Examination, "Utilization of Deep Neural Networks in tasks of classification and semantic segmentation of medical images of colon and breast cancer," no. January, pp. 1–3, 2024.

B. Yang et al., "Transformer-based multiple instance learning network with 2D positional encoding for histopathology image classification Introduction," Complex Intell. Syst., vol. 11, no. 5, pp. 1–17, 2025, doi: 10.1007/s40747-025-01779-y.

J. Wang et al., "Progression from ductal carcinoma in situ to invasive breast cancer: molecular features and clinical significance," Signal Transduct. Target. Ther., vol. 9, no. 1, 2024, doi: 10.1038/s41392-024-01779-3.

Z. Liu et al., "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows," pp. 1–11, 2021.

M. A. Rahmadi, H. Nasution, L. Mawar, N. Sihombing, R. Nasution, and M. Sari, "The Effect of Anxiety on Breast Cancer Treatment Adherence," J. Ilm. Health Sciences. and Medicine., vol. 3, no. 1, 2025.

D. S. Dizon and A. H. Kamal, "Cancer statistics 2024: All hands on deck," CA Cancer J. Clin, vol. 74, no. 1, 2024, doi: 10.3322/caac.21824.

Breastcancer.org, "Your Guide to the Breast Pathology Repor," 2024.

S. S. Kumar, "Advancements in medical image segmentation: A review of transformer models," Comput. Electr. Eng., vol. 123, 2025, doi: 10.1016/j.compeleceng.2025.110099.

S. Liu and B. Min, "DCS-ST for Classification of Breast Cancer Histopathology Images with Limited Annotations," Appl. Sci., vol. 15, no. 15, pp. 1–9, 2025, doi: 10.3390/app15158457.




DOI: http://dx.doi.org/10.24014/ijaidm.v8i3.38606

Refbacks

  • There are currently no refbacks.


Office and Secretariat:

Big Data Research Centre
Puzzle Research Data Technology (Predatech)
Laboratory Building 1st Floor of Faculty of Science and Technology
UIN Sultan Syarif Kasim Riau

Jl. HR. Soebrantas KM. 18.5 No. 155 Pekanbaru Riau – 28293
Website: http://predatech.uin-suska.ac.id/ijaidm
Email: ijaidm@uin-suska.ac.id
e-Journal: http://ejournal.uin-suska.ac.id/index.php/ijaidm
Phone: 085275359942

Click Here for Information


Journal Indexing:

Google Scholar | ROAD | PKP Index | BASE | ESJI | General Impact Factor | Garuda | Moraref | One Search | Cite Factor | Crossref | WorldCat | Neliti  | SINTA | Dimensions | ICI Index Copernicus 

IJAIDM Stats