Virtual Stain Translation from H&E to PD-L1 IHC with Latent Conditional Flow Matching
Abstract
PD-L1 immunohistochemistry (IHC) is a critical pathology assay that guides immunotherapy treatment strategy, but consumes scarce tissue samples and yields results that can vary across different PD-L1 assays. Hematoxylin and eosin (H&E) stains are comparatively cheap and easy to acquire. Thus, developing “virtual staining” systems that can accurately infer PD-L1 IHC images from existing H&E images would enable reproducible, cheap, rapid, and easily deployed assessment of PD-L1 expression. While virtual staining models have been proposed for other proteins in breast cancer, most models have focused on other cancer types. Here, we present Flow Stain Translator (FlowSTAIT), a conditional flow matching model trained to infer accurate PD-L1 IHC staining patterns from pathology foundation model (PFM) embeddings of H&E images. FlowSTAIT is trained on a large, curated dataset of aligned H&E and PD-L1 IHC whole slide images from 902 lung cancer patients. Compared with two virtual staining models retrained on our dataset, it achieves the lowest Fréchet image distances and competitive tile-level DAB stain correlation. These results suggest that PFM-conditioned flow matching is a viable paradigm for virtual staining. When FlowSTAIT is evaluated on H&E images from held-out patients, we find that it infers PD-L1 IHC images that have realistic morphology and staining profiles, recapitulating variation in PD-L1 intensity that may be relevant for clinical scoring.