Table of Contents
Fetching ...

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

Jillur Rahman Saurav, Thuong Le Hoai Pham, Pritam Mukherjee, Paul Yi, Brent A. Orr, Jacob M. Luber

Abstract

Virtual immunohistochemistry (IHC) staining from hematoxylin and eosin (H&E) images can accelerate diagnostics by providing preliminary molecular insight directly from routine sections, reducing the need for repeat sectioning when tissue is limited. Existing methods improve realism through contrastive objectives, prototype matching, or domain alignment, yet the generator itself receives no direct guidance from pathology foundation models. We present UNIStainNet, a SPADE-UNet conditioned on dense spatial tokens from a frozen pathology foundation model (UNI), providing tissue-level semantic guidance for stain translation. A misalignment-aware loss suite preserves stain quantification accuracy, and learned stain embeddings enable a single model to serve multiple IHC markers simultaneously. On MIST, UNIStainNet achieves state-of-the-art distributional metrics on all four stains (HER2, Ki67, ER, PR) from a single unified model, where prior methods typically train separate per-stain models. On BCI, it also achieves the best distributional metrics. A tissue-type stratified failure analysis reveals that remaining errors are systematic, concentrating in non-tumor tissue. Code is available at https://github.com/facevoid/UNIStainNet.

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

Abstract

Virtual immunohistochemistry (IHC) staining from hematoxylin and eosin (H&E) images can accelerate diagnostics by providing preliminary molecular insight directly from routine sections, reducing the need for repeat sectioning when tissue is limited. Existing methods improve realism through contrastive objectives, prototype matching, or domain alignment, yet the generator itself receives no direct guidance from pathology foundation models. We present UNIStainNet, a SPADE-UNet conditioned on dense spatial tokens from a frozen pathology foundation model (UNI), providing tissue-level semantic guidance for stain translation. A misalignment-aware loss suite preserves stain quantification accuracy, and learned stain embeddings enable a single model to serve multiple IHC markers simultaneously. On MIST, UNIStainNet achieves state-of-the-art distributional metrics on all four stains (HER2, Ki67, ER, PR) from a single unified model, where prior methods typically train separate per-stain models. On BCI, it also achieves the best distributional metrics. A tissue-type stratified failure analysis reveals that remaining errors are systematic, concentrating in non-tumor tissue. Code is available at https://github.com/facevoid/UNIStainNet.
Paper Structure (29 sections, 7 equations, 6 figures, 6 tables)

This paper contains 29 sections, 7 equations, 6 figures, 6 tables.

Figures (6)

  • Figure 1: UNIStainNet architecture.(a) Overview: The H&E image is split into $4\!\times\!4$ sub-crops and processed by a frozen UNI ViT-L/16 to produce multi-scale spatial maps. A CNN encoder compresses the H&E input through a self-attention bottleneck; the SPADE+FiLM decoder then receives UNI spatial maps via SPADE modulation, edge features via concatenation, and a stain embedding via FiLM, with encoder skip connections preserving fine-grained detail. An unconditional multi-scale discriminator provides adversarial training. (b) SPADE+FiLM block detail: at each decoder stage, edge and skip features are concatenated and convolved, then modulated by UNI spatial maps (spatially-varying $\gamma_s, \beta_s$) and the stain embedding (channel-wise $\gamma_c, \beta_c$), combined additively after instance normalization.
  • Figure 2: Unified multi-stain generation on MIST. Four randomly sampled validation images per stain (HER2, Ki67, ER, PR). Columns: H&E input, ground truth IHC, and UNIStainNet output. A single model produces stain-specific expression patterns: membrane (HER2), punctate nuclear (Ki67), and diffuse nuclear (ER/PR).
  • Figure 3: Representative qualitative comparison on MIST HER2. Additional randomly sampled comparisons are provided in the supplementary material (Section D).
  • Figure 4: Qualitative comparison on BCI (one sample per HER2 class). Columns: H&E input, ground truth IHC, ASP li2023asp, PSPStain liu2024pspstain, and UNIStainNet. Our method preserves tissue morphology and produces correctly graded DAB staining across all HER2 levels.
  • Figure 5: Tissue-type stratified failure analysis via CONCH lu2024avisionlanguage zero-shot classification. (a,b) Failure rate and mean DAB KL by tissue type on MIST (4,000 images, 4 stains, macro-averaged) and BCI (977 images). (c,d) Representative examples: invasive carcinoma produces lower error, while adipose and necrotic regions produce higher error.
  • ...and 1 more figures