Adaptive Supervised PatchNCE Loss for Learning H&E-to-IHC Stain Translation with Inconsistent Groundtruth Image Pairs

Fangda Li, Zhiqiang Hu, Wen Chen, Avinash KakMICCAI 2023 · DOI · OpenReview

TL;DR

This paper introduces a novel loss function, Adaptive Supervised PatchNCE (ASP), to improve H&E-to-IHC stain translation for medical diagnostics. By leveraging contrastive learning and an adaptive weighting scheme, ASP effectively handles inconsistencies in ground truth image pairs, leading to more accurate and robust stain translation.

What Problem Does This Paper Address?

Histopathology relies heavily on staining techniques to visualize cellular and molecular information for disease diagnosis. Hematoxylin and Eosin (H&E) staining is cost-effective and reveals tissue morphology, while Immunohistochemical (IHC) staining highlights specific molecular markers (like proteins) crucial for treatment planning. However, IHC staining is expensive and labor-intensive. Researchers are exploring H&E-to-IHC stain translation to leverage the readily available H&E images to predict IHC staining, thereby reducing costs and improving accessibility.

The core challenge in this translation is the lack of perfectly aligned H&E and IHC image pairs. Because it's impossible to re-stain the exact same tissue slice, paired images are derived from adjacent slices. This leads to inherent inconsistencies due to slight morphological differences, staining variations, and imaging artifacts. Existing methods often struggle with these "noisy" ground truth pairs, either by avoiding them altogether or by relying on expert annotations, which can be time-consuming and subjective. This paper aims to directly address these inconsistencies in ground truth pairs for more reliable H&E-to-IHC translation.

Methods

The paper proposes a new loss function called Adaptive Supervised PatchNCE (ASP). This loss builds upon the Supervised PatchNCE (SP) loss, which itself is a variant of the PatchNCE loss.

  • PatchNCE: This is a patch-based contrastive learning objective. It aims to ensure consistency between an input image and its generated output by encouraging patches in the same spatial location across the two images to have similar embeddings (representations) in a learned feature space, while pushing dissimilar patches apart.
  • Supervised PatchNCE (SP): Instead of comparing the input to the generated image, SP compares the ground truth IHC image to the generated IHC image. The anchor is an embedding of a patch from the generated image, the positive is the embedding of the corresponding patch from the ground truth image, and negatives are embeddings of other patches. This makes it suitable for learning from potentially inconsistent ground truth.
  • Adaptive Supervised PatchNCE (ASP): This is the core innovation. ASP further refines SP by introducing an adaptive weighting scheme. The idea is that if a patch in the generated image and its corresponding patch in the ground truth image have very different embeddings (low cosine similarity), it indicates a high degree of inconsistency in the ground truth at that location. ASP down-weights the contribution of these inconsistent patches to the overall loss, allowing the model to focus more on reliable regions.
  • Weight Scheduling: To ensure the adaptive weighting is effective, ASP also incorporates a scheduling function. This function gradually enforces the adaptive weighting as training progresses. Early in training, when the network's embeddings are still unreliable, the weights are more uniform. As training advances, the adaptive weighting becomes more pronounced, allowing the network to learn more robustly from consistent regions.

Datasets

The authors introduce a new dataset called the Multi-IHC Stain Translation (MIST) dataset. This dataset contains aligned H&E-IHC patches for four key IHC stains used in breast cancer diagnosis: HER2, Ki67, ER, and PR. They also evaluate their method on the Breast Cancer Immunohistochemical (BCI) challenge dataset.

Key Insights and Ideas

  • Leveraging Inconsistent Ground Truth: The paper's central insight is that even with imperfectly aligned H&E-IHC pairs, the corresponding patches likely share the same diagnostic label. This allows for the use of contrastive learning, which is more robust to noise than traditional pixel-wise losses like MSE.
  • Adaptive Weighting for Robustness: The adaptive weighting scheme in ASP is crucial. By identifying and down-weighting regions with high ground truth inconsistency, the model can learn more effectively and avoid being misled by noisy labels. This is a significant improvement over methods that treat all ground truth pixels equally.
  • Contrastive Learning's Advantage: The paper highlights that contrastive losses are inherently relative. They punish dissimilarities between anchor and positive samples relative to anchor and negative samples. This relative nature makes them more resilient to absolute errors or inconsistencies in the ground truth compared to methods that rely on direct pixel-wise comparisons.
  • Importance of Scheduling: The adaptive weighting needs careful application. The paper's insight into scheduling the weights based on training progress is key to preventing premature bias and allowing the network to learn reliable embeddings before applying strict adaptive filtering.

Key Results

The proposed ASP loss, particularly with a linear scheduling function (LASP), consistently outperforms existing image-to-image translation methods on multiple datasets and IHC stains.

  • Quantitative Improvements: The paper presents tables showing that their method achieves superior SSIM (Structural Similarity Index Measure) scores and lower FID (Fréchet Inception Distance) and KID (Kernel Inception Distance) values compared to baselines like CycleGAN, Pix2Pix, and PyramidP2P. For instance, on the MISTHER2 dataset, their LASP method achieves an FID of 51.4 and KID of 12.4, which are significantly better than many other methods.
  • Qualitative Improvements: Visual comparisons (e.g., in Figure 5) demonstrate that the generated IHC images using ASP are more accurate in capturing pathological representations and are more consistent than those generated without it or with the SP loss alone.

Limitations and Future Work

  • Computational Cost: While not explicitly stated as a limitation, contrastive learning methods can be computationally intensive.
  • Hyperparameter Tuning: The paper mentions that premature reinforcement of adaptive weighting can lead to inferior convergence, suggesting that careful tuning of the scheduling function and weighting parameters is important.
  • Future Work: The authors hope their work and the newly released MIST dataset will spur further research into accurate H&E-to-IHC stain translation. They also suggest exploring different adaptive strategies and scheduling functions.

Summary updated

BibTeX
@misc{li2023adaptive,
  author = {Fangda Li and Zhiqiang Hu and Wen Chen and Avinash Kak},
  title = {{Adaptive Supervised PatchNCE Loss for Learning H\&E-to-IHC Stain Translation with Inconsistent Groundtruth Image Pairs}},
  year = {2023},
  eprint = {2303.06193},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.06193},
}
Figure