Magnification-independent breast cancer diagnosis using a GWO-enhanced vision transformer with multi-stage stain normalization.
Journal:
Scientific reports
Published Date:
Mar 4, 2026
Abstract
Breast cancer diagnosis from histopathological images remains a critical yet challenging task due to staining variability, magnification differences, and complex tissue morphology. This study presents a comprehensive preprocessing, balancing, and classification framework for the BreakHis dataset, integrating advanced stain normalization, magnification-wise augmentation, and an optimized Vision Transformer architecture. A four-stage normalization pipeline comprising CLAHE, histogram matching, Shades-of-Gray correction, and Macenko stain normalization was developed to standardize color distribution and enhance structural clarity across 7909 images. To address severe class imbalance, a targeted magnification-specific augmentation strategy expanded the dataset to 11,848 images with equal benign and malignant representation. A Vision Transformer (ViT) model was designed for each of the four magnifications (40X, 100X, 200X, 400X), and further optimized using the Grey Wolf Optimizer (GWO) to automatically tune hyperparameters such as transformer depth, attention heads, embedding dimensions, dropout, and learning rate. Experimental results demonstrate high and consistent performance across magnifications, with accuracies of 92.1%, 92.9%, 93.5%, and 94.0%, respectively. Cross-validation reveals minimal variance, confirming model robustness and generalization. The proposed GWO-ViT framework establishes a reliable, magnification-invariant, and computationally efficient solution for automated breast cancer histopathology classification, offering strong potential for clinical integration.
Authors
Keywords
No keywords available for this article.