HistDiT: A Structure-Aware Latent Conditional Diffusion Model for High-Fidelity Virtual Staining in Histopathology
Organizations: Edge Hill University, Ormskirk, L39 4QP, United Kingdom · University of Nottingham Malaysia, 43500 Semenyih, Malaysia · University of Southampton Malaysia, 79100 Iskandar Puteri, Malaysia · Cancer Research Malaysia, , 47500 Subang Jaya, Malaysia
Abstract
Immunohistochemistry (IHC) is essential for assessing specific immune biomarkers like Human Epidermal growth-factor Receptor 2 (HER2) in breast cancer. However, the traditional protocols of obtaining IHC stains are resource-intensive, time-consuming, and prone to structural damages. Virtual staining has emerged as a scalable alternative, but it faces significant challenges in preserving fine-grained cellular structures while accurately translating biochemical expressions. Current state-of-the-art methods still rely on Generative Adversarial Networks (GANs) or standard convolutional U-Net diffusion models that often struggle with "structure and staining trade-offs". The generated samples are either structurally relevant but blurry, or texturally realistic but have artifacts that compromise their diagnostic use. In this paper, we introduce HistDiT, a novel latent conditional Diffusion Transformer (DiT) architecture that establishes a new benchmark for visual fidelity in virtual histological staining. The novelty introduced in this work is, a) the Dual-Stream Conditioning strategy that explicitly maintains a balance between spatial constraints via VAE-encoded latents and semantic phenotype guidance via UNI embeddings; b) the multi-objective loss function that contributes to sharper images with clear morphological structure; and c) the use of the Structural Correlation Metric (SCM) to focus on the core morphological structure for precise assessment of sample quality. Consequently, our model outperforms existing baselines, as demonstrated through rigorous quantitative and qualitative evaluations.
Figures & tables
| Method/Model | MSE | PSNR(dB) | SSIM | SCM | LPIPS | FID |
|---|---|---|---|---|---|---|
| Cycle GAN [ 4 ] ρ | 1892.00 | 15.98 | 0.372 | 0.447 | 0.624 | 188.33 |
| Pix2Pix [ 5 ] ρ | 1560.26 | 17.08 | 0.303 | 0.391 | 0.769 | 160.39 |
| Pyramid Pix2Pix [ 6 ] ρ | 1348.54 | 19.61 | 0.397 | 0.473 | 0.466 | 167.40 |
| ASP [ 7 ] ρ | — | — | 0.5032 | — | — | — |
| Syn Diff [ 8 ] z | — | 14.28 2.52 | 0.32 0.1 | — | — | — |
| PST-Diff [ 9 ] z | — | 16.75 4.20 | 0.38 0.1 | — | — | — |
| HER-2 Scale | IQA Metrics | cycleGAN [ 4 ] | Pyr. Pix2Pix [ 6 ] | cond. Diff [ 19 ] | HistDiT |
|---|---|---|---|---|---|
| Level 0 (38) | PSNR | 15.92 | 17.96 | 16.75 | 22.49 |
| SSIM | 0.3587 | 0.3758 | 0.4595 | 0.5172 | |
| LPIPS | 0.5210 | 0.4683 | 0.5161 | 0.3945 | |
| Level 1+ (235) | PSNR | 16.84 | 19.92 | 15.89 | 23.22 |
| SSIM | 0.3712 | 0.4099 | 0.4027 | 0.5046 | |
| LPIPS | 0.5185 | 0.4467 | 0.5790 | 0.3836 |
| Method/Model | MSE | PSNR(dB) | SSIM | SCM | LPIPS | FID |
|---|---|---|---|---|---|---|
| Cycle GAN [ 4 ] ρ | 4190.52 | 11.91 | 0.174 | 0.209 | 0.553 | 125.7 |
| Pix2Pix [ 5 ] ρ | 3485.20 | 12.74 | 0.150 | 0.194 | 0.614 | 128.1 |
| Pyramid Pix2Pix [ 6 ] ρ | 2986.44 | 14.24 | 0.165 | 0.214 | 0.543 | 107.4 |
| ASP [ 7 ] ρ | — | — | 0.1945 | — | — | 54.28 |
| Conditional Diff. [ 19 ] z | 6252.98 | 11.13 | 0.168 | 0.254 | 0.564 | 82.6 |
| HistDiST [ 21 ] z | — | — | 0.2059 | — | — | — |
| Model Configuration | PSNR(dB) | SSIM | SCM | LPIPS | FID |
|---|---|---|---|---|---|
| Pyramid Pix2Pix [ 6 ] ρ | 19.61 | 0.397 | 0.473 | 0.466 | 167.40 |
| HistDiT (Semantics only) z | 16.39 | 0.423 | 0.492 | 0.553 | 81.51 |
| HistDiT (Spatial only with Cross-Attention) z | 18.58 | 0.416 | 0.560 | 0.452 | 62.38 |
| HistDiT (Spatial [Concatenation], Semantics) z | 20.63 | 0.449 | 0.521 | 0.438 | 56.80 |
| HistDiT (Spatial [Cross-Attention], Semantics) z | 21.43 | 0.477 | 0.540 | 0.412 | 49.15 |
Virtual Staining
Virtual staining uses AI to predict histochemical or immunohistochemical appearances from unstained or differently stained tissue images.
See all 18 papers