Weakly Semi-supervised Whole Slide Image Classification by Two-level Cross Consistency Supervision

Linhao Qu, Shiman Li, Xiaoyuan Luo, Shaolei Liu, Qinhao Guo, Manning Wang, Zhijian SongarXiv 2025 · DOI

TL;DR

This paper introduces Weakly Semi-supervised Whole Slide Image Classification (WSWC), a new learning paradigm for digital pathology where only a small fraction of gigapixel images have slide-level labels. To solve this, the authors propose CroCo, a dual-branch framework that enforces cross-consistency at both the slide (bag) and patch (instance) levels, allowing models to achieve state-of-the-art performance—and sometimes even outperform fully supervised models—using significantly less labeled data.

The Challenge of Gigapixel Pathology

In digital pathology, Whole Slide Images (WSIs) are massive, often containing billions of pixels. Because of their size, they are typically processed using Multiple Instance Learning (MIL), where a slide is treated as a "bag" and small image patches are "instances."

Comparison of learning paradigms in WSI classification. (A) Weakly supervised learning uses extensive labeled slides. (B) Weakly semi-supervised learning uses few labeled and many unlabeled slides. (C) Standard SSL consistency. (D) Proposed CroCo dual-branch consistency.

The primary bottleneck is labeling. A pathologist might spend 30 minutes reviewing a single slide to provide a label. While standard MIL works with slide-level labels (weak supervision), it usually assumes every training slide is labeled. In reality, labs often have a few labeled slides and a mountain of unlabeled ones. Standard semi-supervised learning (SSL) techniques designed for natural images fail here because they don't account for the complex relationship between a slide's global label and its constituent local patches.

Methods: The CroCo Framework

The authors introduce CroCo (Cross Consistency), which utilizes a heterogeneous dual-branch architecture to bridge the gap between labeled and unlabeled data. Crucially, both branches share the same instance encoder, ensuring they learn a unified feature space.

The CroCo architecture featuring bag-level and instance-level cross-consistency. The framework utilizes a shared encoder with two distinct classification heads (bag-based and instance-based) that supervise each other via cross-entropy (CE) losses.

The framework consists of two distinct paths:

  1. The Bag-based Branch: Uses an attention mechanism to weight patches and aggregate them into a single slide-level feature for classification.
  2. The Instance-based Branch: Predicts a label for every individual patch and then aggregates these predictions (e.g., via max-pooling) to decide the slide's label.

Two-Level Cross-Consistency

Instead of just looking at the final slide prediction, CroCo forces the two branches to "agree" at two different scales:

  • Bag-level: The slide-level predictions of one branch serve as pseudo-labels for the other.
  • Instance-level: This is the novel part. The attention scores from the bag-branch (which indicate how "important" a patch is) are used as pseudo-labels to train the instance-branch. Conversely, the instance-branch’s patch predictions act as supervision for the bag-branch’s attention module.

Key Insights and Ideas

  • Heterogeneity as a Strength: By using two different types of classifiers (attention-based vs. instance-based), the model avoids the "echo chamber" effect where a model simply reinforces its own biases. The different architectures provide diverse perspectives on the data.
  • Solving the "Lazy" Attention Problem: In standard MIL, an attention module often becomes "lazy"-it finds the single easiest patch to identify a disease and ignores the rest. By enforcing instance-level consistency with the second branch, CroCo forces the model to identify all relevant positive regions.
  • The Power of Negative Bags: In MIL, if a slide is negative, every single patch in it is guaranteed to be negative. CroCo exploits this "dense" information to provide strong, ground-truth supervision even in a semi-supervised setting.

Experimental Results

The framework was evaluated on four distinct datasets: CIFAR-10-MIL, Camelyon16 (breast cancer), TCGA Lung Cancer, and a Clinical Cervical Dataset.

  • Surpassing Full Supervision: On the Camelyon16 dataset, with only 50% of the labels, CroCo achieved slide-level performance comparable to a model trained on 100% of the data.
  • Superior Localization: Remarkably, with only 10% labeled data, CroCo’s ability to identify cancerous patches (instance-level AUC) actually outperformed the fully supervised baseline trained on 100% of the labels.
  • Robustness: CroCo consistently beat adapted versions of popular SSL algorithms like FixMatch and Mean Teacher across all tested medical datasets.

Limitations and Future Work

The authors acknowledge that CroCo currently lacks an advanced filtering strategy for pseudo-labels. In many SSL frameworks, low-confidence pseudo-labels are discarded to prevent the model from learning "noise." Integrating a confidence-based thresholding or a more sophisticated noise-reduction mechanism could further stabilize training. Additionally, while the dual-branch approach is efficient, it does increase the computational overhead during the training phase compared to single-branch MIL.

Summary updated

BibTeX
@misc{qu2025weakly,
  author = {Linhao Qu and Shiman Li and Xiaoyuan Luo and Shaolei Liu and Qinhao Guo and Manning Wang and Zhijian Song},
  title = {{Weakly Semi-supervised Whole Slide Image Classification by Two-level Cross Consistency Supervision}},
  year = {2025},
  eprint = {2504.12132},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.12132},
}
Figure