Abstract
Hematoxylin and Eosin (H&E) staining is a cornerstone of pathological analysis, offering reliable visualization of cellular morphology and tissue architecture for cancer diagnosis, subtyping, and grading. Immunohistochemistry (IHC) staining provides molecular insights by detecting specific proteins within tissues, enhancing diagnostic accuracy, and improving treatment planning. However, IHC staining is costly, time-consuming, and resource-intensive, requiring specialized expertise. To address these limitations, this study proposes HistoStainAlign, a novel deep learning framework that predicts IHC staining patterns directly from H&E whole-slide images (WSIs) by learning joint representations of morphological and molecular features. The framework integrates paired H&E and IHC embeddings through a contrastive training strategy, capturing complementary features across staining modalities without patch-level annotations or tissue registration. The model was evaluated on gastrointestinal and lung tissue WSIs with three commonly used IHC stains: P53, PD-L1, and Ki-67. HistoStainAlign achieved weighted F1 scores of 0.735 [95% Confidence Interval (CI): 0.670-0.799], 0.830 [95% CI: 0.772-0.886], and 0.723 [95% CI: 0.607-0.836], respectively for these three IHC stains. Embedding analyses demonstrated the robustness of the contrastive alignment in capturing meaningful cross-stain relationships. Comparisons with a baseline model further highlight the advantage of incorporating contrastive learning for improved stain pattern prediction. This study demonstrates the potential of computational approaches to serve as a pre-screening tool, helping prioritize cases for IHC staining and improving workflow efficiency.
Introduction
In clinical pathology, Hematoxylin and Eosin (H&E) staining remains the gold standard for assessing tissue morphology and cellular architecture. However, to understand the molecular drivers of a tumor—such as identifying candidates for immunotherapy—clinicians rely on Immunohistochemistry (IHC). While IHC provides critical molecular insights, it is resource-intensive, expensive, and consumes precious tissue samples.
Recent efforts to predict IHC biomarkers directly from H&E slides using AI have been hindered by the requirement for "registered" images. Pixel-perfect alignment between H&E and IHC slides is difficult to achieve due to tissue deformation during processing. HistoStainAlign addresses this by employing a registration-free approach, learning to align the mathematical representations (embeddings) of different staining modalities in a shared latent space.
Methods
HistoStainAlign sidesteps the registration problem by focusing on slide-level feature alignment rather than spatial overlap. The framework is built upon Prov-GigaPath, a foundational pathology model pre-trained on over a billion image tiles.
The model is optimized using a triple-loss training strategy:
- Inter-modality Loss: A symmetric contrastive loss that aligns paired H&E and IHC embeddings while separating unpaired ones.
- Intra-modality Loss: A self-supervised masking task that ensures feature consistency even when 50% of image patches are hidden.
- Class-based Loss: A supervised loss to ensure accurate prediction of biomarker status (e.g., High vs. Low expression).
Datasets
The framework was evaluated using internal datasets from Dartmouth-Hitchcock Medical Center focusing on three key biomarkers: P53 (esophageal tissue), PD-L1 (lung tumor resections), and Ki-67 (gastrointestinal biopsies). Additionally, the public ACROBAT dataset (breast cancer) was utilized for auxiliary pre-training to enhance feature learning for the Ki-67 task.
Results and Key Insights
HistoStainAlign consistently outperformed baseline models, including versions of GigaPath that lacked the contrastive alignment strategy.
- PD-L1 Prediction: The model achieved a weighted F1 score of 0.830 and an AUC of 0.780, representing a statistically significant improvement over fine-tuned baselines.
- P53 and Ki-67 Prediction: The framework achieved F1 scores of 0.735 and 0.723, respectively.
- Cross-Domain Generalization: Pre-training on the ACROBAT breast cancer dataset improved performance on gastrointestinal tissue, suggesting the model captures transferable biological features across different organs.
- Embedding Alignment: Cosine similarity analysis confirmed that the contrastive loss successfully produced tighter alignment between paired H&E and IHC embeddings compared to standard fine-tuning methods.
Discussion and Conclusion
While the results are promising, the study notes that the internal datasets were relatively small and the tasks were framed as binary classifications. Future work will focus on scaling to larger datasets and predicting continuous biomarker percentages to better reflect clinical practice.
HistoStainAlign demonstrates that registration-free cross-modality learning is a viable path for predicting molecular biomarkers from standard H&E slides. By serving as a pre-screening tool, this technology can help pathologists prioritize cases for expensive IHC staining, ultimately streamlining diagnostic workflows and improving patient care efficiency.
Summary updated