UNIStainNet: Foundation-Model-Guided
Virtual IHC Staining from H&E

Jillur Rahman Saurav1, Thuong Le Hoai Pham1, Pritam Mukherjee2, Paul Yi2, Brent A. Orr3, Jacob M. Luber2

1University of Texas at Arlington   2Department of Radiology, St. Jude Children's Research Hospital   3Department of Pathology, St. Jude Children's Research Hospital

Cross-stain generation: one H&E input produces HER2, Ki67, ER, and PR

A single H&E input generates four IHC stains using one unified model. The model learns stain-specific patterns: membrane staining for HER2, nuclear punctate for Ki67, and diffuse nuclear for ER and PR.


Abstract

We present UNIStainNet, a deep learning framework for virtual immunohistochemistry (IHC) staining from standard hematoxylin & eosin (H&E) histopathology images. Our approach uses a SPADE-UNet generator conditioned on dense spatial features from a frozen UNI pathology foundation model (ViT-L/16), enabling the generator to leverage fine-grained tissue morphology for accurate stain prediction. A FiLM-based stain embedding allows a single unified 42M-parameter model to generate all four clinically important breast cancer biomarkers — HER2, Ki67, ER, and PR — in a single forward pass. Our misalignment-aware loss suite (perceptual loss, DAB intensity supervision, unconditional discriminator) is specifically designed for the inherent spatial shifts between consecutive tissue sections used for training. UNIStainNet achieves state-of-the-art results on both the BCI and MIST benchmarks, with Pearson-R > 0.92 across all four stains.


Method

The 512×512 H&E input is encoded by a convolutional encoder while a frozen UNI ViT-L/16 extracts dense spatial features via 4×4 sub-crop tiling, yielding 1,024 spatially-resolved tokens at 32×32 resolution. The SPADE+FiLM decoder modulates each layer using both spatially-resolved UNI features (via SPADE) and stain-specific embeddings (via FiLM), allowing a single set of decoder weights to produce any of the four target IHC stains.

UNIStainNet architecture

Figure 1. UNIStainNet architecture. Left: overall pipeline with H&E encoder, UNI spatial conditioning branch, stain embedding, and SPADE+FiLM decoder. Right: detail of the SPADE+FiLM normalization block combining spatial UNI features (γs, βs) and stain-specific FiLM parameters (γc, βc).


Results

Quantitative Results (MIST, Unified Model)

Stain FID ↓ KID×1k ↓ Pearson-R ↑ DAB KL ↓
HER234.52.20.9290.166
Ki6727.21.80.9270.119
ER29.21.80.9490.182
PR29.01.10.9430.171

Multi-Stain Generation

Ground truth vs generated IHC for all four stains

Figure 2. Multi-stain generation on MIST. Each row shows a different stain: H&E input (left), ground truth IHC (center), and UNIStainNet output (right). The model produces membrane staining for HER2, nuclear punctate patterns for Ki67, and diffuse nuclear staining for ER and PR.

Comparison with Baselines

Visual comparison with baselines on BCI

Figure 3. Visual comparison on BCI (H&E → HER2). ASP generates near-zero DAB signal (appearing mostly blue/purple), while UNIStainNet preserves the expected brown chromogen staining patterns.

Visual comparison on MIST

Figure 4. Comparison on MIST across methods.


BibTeX

@article{saurav2026unistainnet, title={UNIStainNet: Foundation-Model-Guided Virtual Staining of H\&E to IHC}, author={Saurav, Jillur Rahman and Pham, Thuong Le Hoai and Mukherjee, Pritam and Yi, Paul and Orr, Brent A and Luber, Jacob M}, journal={arXiv preprint arXiv:2603.12716}, year={2026} }