# DCS-ST for Classification of Breast Cancer Histopathology Images with Limited Annotations
## 1 Introduction  
Histopathology images of breast cancer are often captured under weakly labeled conditions. These present significant analytical challenges impairing downstream vision tasks such as automated classification, lesion detection, and clinical diagnostic assistance [1, 2]. As one of the most prevalent and life-threatening cancers worldwide, breast cancer demands early and accurate diagnosis to improve patient outcomes, with histopathology images serving as the gold standard due to their rich cellular and tissue detail. However, annotating these images relies heavily on pathologists' expertise and time, resulting in a critical scarcity of labeled data. This data insufficiency hampers the robustness of conventional deep learning models, which typically require vast annotated datasets for effective training [3, 4]. In recent years, Transformer-based models like the Swin Transformer [5] have shown remarkable success in high-resolution image tasks, leveraging their hierarchical structure and shifted window mechanism to efficiently capture local and global features, makingthem highly suitable for analyzing complex histopathology images. Yet, in scenarios with limited labeled data, optimizing these models to handle diverse tissue structures and pathological patterns remains a formidable challenge. Traditional approaches often depend on hand-crafted feature extraction rules, which struggle to adapt to the complexity and variability of histopathology images [6, 7]. To address this, we propose the Dynamic Cross-Scale Swin Transformer (DCS-ST) cite b25, a robust approach tailored for classifying breast cancer histopathology images under weakly labeled conditions. Building on the Swin Transformer architecture, DCS-ST leverages a small set of labeled data alongside a larger pool of unlabeled data, employing a semi-supervised learning strategy with pseudo-labeling to generate high-confidence labels for training. Our method introduces two novel components: a Dynamic Window Predictor and a Cross-Scale Attention Module. The Dynamic Window Predictor uses a convolutional layer to predict window sizes for each image region adaptively, enabling the model to adjust its attention mechanism based on content dynamically. The Cross-Scale Attention Module integrates multi-scale features via a multi-head attention mechanism, significantly enhancing the model's ability to discern intricate patterns, such as normal, benign, in situ carcinoma, and invasive carcinoma, across varying spatial resolutions. Compared to the standard Swin Transformer, DCS-ST exhibits superior feature representation and classification stability when labeled data is scarce. We evaluate DCS-ST on multiple benchmark datasets, including BreakHis [8], Mini-DDSM [9], and ICIAR2018 BACH Challenge [10], covering two-class, three-class, and four-class breast cancer classification tasks. For the ICIAR2018 dataset, which includes four classes (normal, benign, in situ carcinoma, and invasive carcinoma), we simulate real-world weakly labeled scenarios by partitioning the dataset into 80% for training (with only 5% labeled and 95% unlabeled) and 20% for testing, using stratified sampling to ensure class balance. Experimental results demonstrate that DCS-ST consistently outperforms existing methods across key metrics, including AUC-ROC [11], balanced accuracy [12], F1 score [13], and Cohen's Kappa [14], delivering high-quality classification outcomes even with minimal labeled data, while avoiding overfitting issues common in supervised methods and instability seen in unsupervised ones. Our contributions are summarized as follows:  
* We propose the Dynamic Cross-Scale Swin Transformer (DCS-ST), which leverages dynamic window prediction, cross-scale attention, and semi-supervised learning for robust histopathology image classification under limited annotations. * We design innovative Dynamic Window Predictor and Cross-Scale Attention Modules to enhance the model's ability to capture complex tissue features across scales.