ViT-Stain: Vision transformer-driven virtual staining for skin histopathology via global contextual learning

Read full text
Authors: Muhammad Thaqif Ghulam Hussain, Asim Waris, Muhammad Usman Akram, Muhammad Jawad Khan, Muhammad Zeeshan Asaf, Amber Javaid, Syed Omer Gilani, Fawwaz Hazzazi
Cited by: 6
References: 54

Abstract

Current virtual staining approaches for histopathology slides use convolutional neural networks (CNNs) and generative adversarial networks (GANs). These approaches rely on local receptive fields, struggle to capture global context, and long-range tissue dependencies. This limitation can introduce artifacts in fine textures and cause loss of subtle morphological details. We propose a novel vision transformer-driven virtual staining framework (ViT-Stain) that translates unstained skin tissue images into hematoxylin and eosin (H&E)-equivalent images. The transformer's self-attention enables ViT-Stain to capture long-range dependencies, preserve global context, and maintain fine textures. We trained ViT-Stain on the E-Staining DermaRepo dataset, which pairs unstained and H&E-stained whole-slide images (WSIs). We validated our model using metrics including SSIM, PSNR, FID, KID, LPIPS, and a novel histology-specific fidelity index (HSFI). Three board-certified pathologists provided feedback for qualitative evaluations. ViT-Stain outperforms leading CNN and GAN models, including Pix2Pix, CycleGAN, CUTGAN, and DCLGAN. It achieves an overall diagnostic concordance of 85% with virtual H&E-stains (Fleiss' κ = 0.88). However, the model requires longer training (about 93 hours on A100 GPUs) and inference times (about 2.9 minutes). Our work advances AI-driven diagnostic reproducibility for high-fidelity clinical settings and aligns with the World Health Organization (WHO) global health goals.

Fields of Study & Subjects

AI in cancer detection Cutaneous Melanoma Detection and Management Digital Imaging for Blood Diseases

Publication details

Journal / source
PLoS ONE
Publisher
Public Library of Science (PLoS)
Volume
21
Issue
2
Pages
e0341311–e0341311
Publication date
2 February 2026
Language
EN