# RandStainNA: Learning Stain-Agnostic Features from Histology Slides by Bridging Stain Augmentation and Normalization

arXiv: https://arxiv.org/abs/2206.12694 · HTML: https://mlsanity.com/paper/2206.12694/

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 26 references that are in the map.
- First posted on arXiv 25 Jun 2022.

## Builds on (most cited first, 14 of 14)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://mlsanity.com/paper/2103.14030/) (2021)
- [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://mlsanity.com/paper/1905.11946/) (2019)
- [Searching for MobileNetV3](https://mlsanity.com/paper/1905.02244/) (2019)
- [Quantifying the effects of data augmentation and stain color normalization in convolutional neural networks for computational pathology](https://mlsanity.com/paper/1902.06543/) (2019)
- [StainGAN: Stain Style Transfer for Digital Histological Images](https://mlsanity.com/paper/1804.01601/) (2018)
- [Whole-Slide Mitosis Detection in H&E Breast Histology Using PHH3 as a Reference to Train Distilled Stain-Invariant Convolutional Networks](https://mlsanity.com/paper/1808.05896/) (2018)
- [CIA-Net: Robust Nuclei Instance Segmentation with Contour-aware Information Aggregation](https://mlsanity.com/paper/1903.05358/) (2019)
- [ColorNet: Investigating the importance of color spaces for image classification](https://mlsanity.com/paper/1902.00267/) (2019)
- [Structure-Preserving Multi-Domain Stain Color Augmentation using Style-Transfer with Disentangled Representations](https://mlsanity.com/paper/2107.12357/) (2021)
- [Pix2Pix-based Stain-to-Stain Translation: A Solution for Robust Stain Normalization in Histopathology Images Analysis](https://mlsanity.com/paper/2002.00647/) (2020)
- [The importance of stain normalization in colorectal tissue classification with convolutional networks](https://mlsanity.com/paper/1702.05931/) (2017)
- [Multimarginal Wasserstein Barycenter for Stain Normalization and Augmentation](https://mlsanity.com/paper/2006.14566/) (2020)

## Built on by (most cited first, 30 of 32)

- [Virchow2: Scaling Self-Supervised Mixed Magnification Models in Pathology](https://mlsanity.com/paper/2408.00738/) (2024)
- [Benchmarking Self-Supervised Learning on Diverse Pathology Datasets](https://mlsanity.com/paper/2212.04690/) (2022)
- [Hibou: A Family of Foundational Vision Transformers for Pathology](https://mlsanity.com/paper/2406.05074/) (2024)
- [Domain Generalization for Medical Image Analysis: A Review](https://mlsanity.com/paper/2310.08598/) (2023)
- [PathAlign: A vision-language model for whole slide images in histopathology](https://mlsanity.com/paper/2406.19578/) (2024)
- [Data-Centric Foundation Models in Computational Healthcare: A Survey](https://mlsanity.com/paper/2401.02458/) (2024)
- [Self-supervised Representation Learning From Random Data Projectors](https://mlsanity.com/paper/2310.07756/) (2023)
- [Domain-specific optimization and diverse evaluation of self-supervised models for histopathology](https://mlsanity.com/paper/2310.13259/) (2023)
- [Data-Efficient Multimodal Fusion on a Single GPU](https://mlsanity.com/paper/2312.10144/) (2023)
- [Improving Performance in Colorectal Cancer Histology Decomposition using Deep and Ensemble Machine Learning](https://mlsanity.com/paper/2310.16954/) (2023)
- [Self-Supervision Enhances Instance-based Multiple Instance Learning Methods in Digital Pathology: A Benchmark Study](https://mlsanity.com/paper/2505.01109/) (2025)
- [SCORPION: Addressing Scanner-Induced Variability in Histopathology](https://mlsanity.com/paper/2507.20907/) (2025)
- [A Laplacian Pyramid Based Generative H&E Stain Augmentation Network](https://mlsanity.com/paper/2305.14301/) (2023)
- [SRA: A Novel Method to Improve Feature Embedding in Self-supervised Learning for Histopathological Images](https://mlsanity.com/paper/2410.17514/) (2024)
- [Histopathology Multi-modal Embedding for Pathology Composed Retrieval](https://mlsanity.com/paper/2502.07221/) (2025)
- [MorphGen: Morphology-Guided Representation Learning for Robust Single-Domain Generalization in Histopathological Cancer Classification](https://mlsanity.com/paper/2509.00311/) (2025)
- [Towards Cellular-Scale Interpretability in Pathology Foundation Models for Biomarker Assessment](https://mlsanity.com/paper/2511.05150/) (2025)
- [Are nuclear masks all you need for improved out-of-domain generalisation? A closer look at cancer classification in histopathology](https://mlsanity.com/paper/2411.09373/) (2024)
- [A protocol for evaluating robustness to H&E staining variation in computational pathology models](https://mlsanity.com/paper/2603.12886/) (2026)
- [CytoSyn: a Foundation Diffusion Model for Histopathology -- Tech Report](https://mlsanity.com/paper/2603.18089/) (2026)
- [FedStain: Modeling Higher-Order Stain Statistics for Federated Domain Generalization in Computational Pathology](https://mlsanity.com/paper/2605.14590/) (2026)
- [Improving Stain Invariance of CNNs for Segmentation by Fusing Channel Attention and Domain-Adversarial Training](https://mlsanity.com/paper/2304.11445/) (2023)
- [Stain Consistency Learning: Handling Stain Variation for Automatic Digital Pathology Segmentation](https://mlsanity.com/paper/2311.06552/) (2023)
- [Understanding Stain Separation Improves Cross-Scanner Adenocarcinoma Segmentation with Joint Multi-Task Learning](https://mlsanity.com/paper/2409.13246/) (2024)
- [LSA: Latent Style Augmentation Towards Stain-Agnostic Cervical Cancer Screening](https://mlsanity.com/paper/2503.06563/) (2025)
- [Pathology Image Restoration via Mixture of Prompts](https://mlsanity.com/paper/2503.12399/) (2025)
- [Learning Semantic Directions for Feature Augmentation in Domain-Generalized Medical Segmentation](https://mlsanity.com/paper/2507.23326/) (2025)
- [Shortcut Learning in Glomerular AI: Adversarial Penalties Hurt, Entropy Helps](https://mlsanity.com/paper/2604.07936/) (2026)
- [Physics-Grounded Adversarial Stain Augmentation with Calibrated Coverage Guarantees](https://mlsanity.com/paper/2605.13889/) (2026)
- [Mitigating Batch Effects in Histopathology via Language-Mediated Robust Embedding Generation](https://mlsanity.com/paper/2606.28697/) (2026)

## Abstract (arXiv)

Stain variations often decrease the generalization ability of deep learning based approaches in digital histopathology analysis. Two separate proposals, namely stain normalization (SN) and stain augmentation (SA), have been spotlighted to reduce the generalization error, where the former alleviates the stain shift across different medical centers using template image and the latter enriches the accessible stain styles by the simulation of more stain variations. However, their applications are bounded by the selection of template images and the construction of unrealistic styles. To address the problems, we unify SN and SA with a novel RandStainNA scheme, which constrains variable stain styles in a practicable range to train a stain agnostic deep learning model. The RandStainNA is applicable to stain normalization in a collection of color spaces i.e. HED, HSV, LAB. Additionally, we propose a random color space selection scheme to gain extra performance improvement. We evaluate our method by two diagnostic tasks i.e. tissue subtype classification and nuclei segmentation, with various network backbones. The performance superiority over both SA and SN yields that the proposed RandStainNA can consistently improve the generalization ability, that our models can cope with more incoming clinical datasets with unpredicted stain styles. The codes is available at https://github.com/yiqings/RandStainNA.
