Adaptation of Weakly Supervised Localization in Histopathology by Debiasing Predictions

Alexis Guichemerre, Banafsheh Karimian, Soufiane Belharbi, Natacha Gillet, Nicolas Thome, Pourya Shamsolmoali, Mohammadhadi Shateri, Luke McCaffrey, Éric Granger · DOI

Abstract: Weakly Supervised Object Localization (WSOL) models enable joint classification and region-of-interest localization in histology images using only image-class supervision. When deployed in a target domain, distributions shift remains a major cause of performance degradation, especially when applied on new organs or institutions with different staining protocols and scanner characteristics. Under stronger cross-domain shifts, WSOL predictions can become biased toward dominant classes, producing highly skewed pseudo-label distributions in the target domain. Source-Free (Unsupervised) Domain Adaptation (SFDA) methods are commonly employed to address domain shift. However, because they rely on self-training, the initial bias is reinforced over training iterations, degrading both classification and localization tasks. We identify this amplification of prediction bias as a primary obstacle to the SFDA of WSOL models in histopathology. This paper introduces SFDA-DeP, a method inspired by machine unlearning that formulates SFDA as an iterative process of identifying and correcting prediction bias. It periodically identifies target images from over-predicted classes and selectively reduces the predictive confidence for uncertain (high entropy) images, while preserving confident predictions. This process reduces the drift of decision boundaries and bias toward dominant classes. A jointly optimized pixel-level classifier further restores discriminative localization features under distribution shift. Extensive experiments on cross-organ and -center histopathology benchmarks (GlaS, CAMELYON-16, CAMELYON-17) with several WSOL models show that SFDA-DeP consistently improves classification and localization over state-of-the-art SFDA baselines.

The Challenge: Domain Shift and the "Rich Get Richer" Trap

In digital pathology, Weakly Supervised Object Localization (WSOL) is a powerful tool. These models are trained using only image-level labels (e.g., "cancer present") but learn to localize specific tumor regions. However, these models often fail when deployed in new environments—such as a different medical center with unique staining protocols or a different organ—due to domain shift.

Under these conditions, models develop a "prediction bias," often over-predicting the most frequent class (typically cancer). Standard Source-Free Domain Adaptation (SFDA) methods attempt to adapt to new data without the original source data by using "self-training." Unfortunately, if the initial model is biased, self-training acts as an echo chamber. The model reinforces its own incorrect, biased predictions, leading to a total collapse in both diagnostic accuracy and localization precision.

Comparison of prediction distributions: (a) high bias in source models, (d) bias amplification in traditional SFDA, and (c) bias reduction achieved by SFDA-DeP.

SFDA-DeP: Debiasing via Machine Unlearning

To break this cycle, researchers introduced SFDA-DeP (Source-Free Domain Adaptation by Debiasing Predictions). Inspired by the concept of machine unlearning, the framework teaches the model to selectively "forget" the uncertain knowledge that drives bias.

The method follows an iterative three-step process:

  1. Partitioning Sets: The model identifies images from over-predicted classes. It separates them into a "forget set" (high-uncertainty/high-entropy images) and a "retain set" (high-confidence images).
  2. Debiasing via Unlearning:
    • The retain set is used for standard learning to preserve discriminative power.
  3. The forget set is trained with a "negative cross-entropy" loss. This effectively tells the model to reduce its confidence in these uncertain, biased predictions, pushing decision boundaries back toward a balanced state.
  4. Localization Anchoring: To prevent the loss of spatial features during classification debiasing, a lightweight pixel-level classifier is added. This head is trained using the model's own Class Activation Maps (CAMs) as pseudo-labels, ensuring tumor boundaries remain sharp.

Experimental Results

The researchers evaluated SFDA-DeP on major benchmarks including GlaS (colon), CAMELYON16, and CAMELYON17 (breast lymph nodes). The method consistently outperformed state-of-the-art SFDA baselines across both ResNet-50 and Transformer architectures.

  • Classification Accuracy: On challenging CAMELYON17 centers where baselines often collapsed to 50% (random chance), SFDA-DeP maintained high accuracy, reaching up to 86.2%.
  • Localization (PxAP): For the DeepMIL model, SFDA-DeP improved localization scores by +20.2 points over standard SFDA-DE.
  • Training Stability: The method shows robust performance across different learning rates and hyperparameter settings, though it does exhibit some sensitivity to the "forgetting ratio."
Training and test classification accuracy across different learning rates and hyperparameter 'm' values, demonstrating the stability of the SFDA-DeP approach.

Conclusion and Future Directions

SFDA-DeP addresses a fundamental flaw in unsupervised adaptation for histopathology. By identifying and correcting prediction bias through selective unlearning, it prevents the model from collapsing into a biased state. While the method introduces some computational overhead and hyperparameter sensitivity, its ability to produce clean, accurate tumor localizations in new domains marks a significant step toward deployable medical AI. Future work will explore extending this debiasing approach to multi-class problems and other imaging modalities like MRI and CT.

Summary updated

BibTeX
@misc{guichemerre2026adaptation,
  author = {Alexis Guichemerre and Banafsheh Karimian and Soufiane Belharbi and Natacha Gillet and Nicolas Thome and Pourya Shamsolmoali and Mohammadhadi Shateri and Luke McCaffrey and Éric Granger},
  title = {{Adaptation of Weakly Supervised Localization in Histopathology by Debiasing Predictions}},
  year = {2026},
  eprint = {2603.12468},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.12468},
}
Figure