[Paper Review] Towards better understanding and better generalization of few-shot classification in histology images with contrastive learning
This paper proposes a contrastive learning (CL) and latent augmentation (LA) framework for few-shot classification in histology images, leveraging self-supervised representation learning and unsupervised semantic transfer to improve generalization. Experiments show CL models generalize significantly better than supervised models on unseen histology classes, with LA consistently boosting performance across cross-domain tasks.
Few-shot learning is an established topic in natural images for years, but few work is attended to histology images, which is of high clinical value since well-labeled datasets and rare abnormal samples are expensive to collect. Here, we facilitate the study of few-shot learning in histology images by setting up three cross-domain tasks that simulate real clinics problems. To enable label-efficient learning and better generalizability, we propose to incorporate contrastive learning (CL) with latent augmentation (LA) to build a few-shot system. CL learns useful representations without manual labels, while LA transfers semantic variations of the base dataset in an unsupervised way. These two components fully exploit unlabeled training data and can scale gracefully to other label-hungry problems. In experiments, we find i) models learned by CL generalize better than supervised learning for histology images in unseen classes, and ii) LA brings consistent gains over baselines. Prior studies of self-supervised learning mainly focus on ImageNet-like images, which only present a dominant object in their centers. Recent attention has been paid to images with multi-objects and multi-textures. Histology images are a natural choice for such a study. We show the superiority of CL over supervised learning in terms of generalization for such data and provide our empirical understanding for this observation. The findings in this work could contribute to understanding how the model generalizes in the context of both representation learning and histological image analysis. Code is available.
Motivation & Objective
- Address the challenge of limited annotated histology data in clinical applications by enabling few-shot learning.
- Study few-shot and generalized few-shot learning in histology images under realistic domain shifts (near-, middle-, and out-of-domain).
- Investigate the impact of shot selection (same vs. different WSI) on few-shot performance.
- Improve model generalization and label efficiency by combining contrastive learning with latent augmentation.
- Provide empirical insights into why contrastive learning outperforms supervised learning in non-iconic, multi-object histology images.
Proposed method
- Pre-train a representation encoder using contrastive learning (SimCLR-style) on a large base dataset without labels.
- Apply latent augmentation (LA) to transfer semantic variations from the base dataset into the latent space in an unsupervised manner.
- Use the pre-trained CL encoder as a feature extractor for few-shot classification, fine-tuned on few labeled samples from novel classes.
- Perform K-means clustering on normalized latent features across multiple layers (stage-2 to stage-4) of ResNet-18 to visualize feature agglomeration.
- Generate similarity heatmaps using cosine similarity between global pooled features and local features to analyze attention patterns.
- Evaluate performance using H-mean, base, and novel class accuracy across three cross-domain tasks on NCT, LC-25K, and PAIP datasets.
Experimental results
Research questions
- RQ1Does contrastive learning generalize better than supervised learning in few-shot histology image classification, especially under domain shift?
- RQ2How does latent augmentation improve few-shot generalization by exploiting unlabeled data in the base dataset?
- RQ3Why does the generalization gap between CL and supervised models increase in histology images compared to natural images?
- RQ4How do attention patterns and feature clustering differ between CL and supervised models in multi-object, multi-texture histology images?
- RQ5Does shot selection (same WSI vs. different WSI) affect few-shot performance, and how do CL and LA mitigate this?
Key findings
- Contrastive learning models outperform supervised models by a large margin in generalization to unseen histology classes, achieving 65.74% H-mean on the NCT dataset.
- The proposed method with CL and LA achieves 75.77% H-mean, a significant improvement over the baseline (65.74%), demonstrating consistent gains from both components.
- Latent augmentation consistently improves performance across all three cross-domain tasks, with gains observed even when the novel class is from a different domain.
- The generalization gap between CL and supervised models is larger in histology images than in natural images, indicating CL's superior ability to capture transferable representations in complex, multi-object tissues.
- Visualization shows that CL models attend more effectively to discriminative local features (e.g., nuclei, tumor cells) compared to supervised models, which often fail to encode non-dominant but informative regions.
- L2-normalization of the classifier improves performance, with the best result (75.77% H-mean) achieved when both training and inference use L2-normalized features.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.