[Paper Review] SimTriplet: Simple Triplet Representation Learning with a Single GPU
SimTriplet proposes a simple triplet contrastive learning method for pathological images that leverages spatially adjacent patches as positive pairs, maximizing both intra-sample and inter-sample similarity without negative samples. Trained on a single 16GB GPU using mixed-precision training, it achieves 10.58% better performance than supervised learning and 2.13% better than SimSiam, even with only 1% labeled data.
Contrastive learning is a key technique of modern self-supervised learning. The broader accessibility of earlier approaches is hindered by the need of heavy computational resources (e.g., at least 8 GPUs or 32 TPU cores), which accommodate for large-scale negative samples or momentum. The more recent SimSiam approach addresses such key limitations via stop-gradient without momentum encoders. In medical image analysis, multiple instances can be achieved from the same patient or tissue. Inspired by these advances, we propose a simple triplet representation learning (SimTriplet) approach on pathological images. The contribution of the paper is three-fold: (1) The proposed SimTriplet method takes advantage of the multi-view nature of medical images beyond self-augmentation; (2) The method maximizes both intra-sample and inter-sample similarities via triplets from positive pairs, without using negative samples; and (3) The recent mix precision training is employed to advance the training by only using a single GPU with 16GB memory. By learning from 79,000 unlabeled pathological patch images, SimTriplet achieved 10.58% better performance compared with supervised learning. It also achieved 2.13% better performance compared with SimSiam. Our proposed SimTriplet can achieve decent performance using only 1% labeled data. The code and data are available at https://github.com/hrlblab/SimTriple.
Motivation & Objective
- To address the high computational cost and limited accessibility of contrastive learning in medical imaging, especially for resource-constrained settings.
- To exploit the multi-view nature of whole-slide images (WSIs) by treating nearby patches as positive pairs, beyond standard self-augmentation.
- To eliminate the need for negative samples in contrastive learning by focusing on positive triplet pairs from adjacent tissue patches.
- To enable effective training on a single GPU with 16GB memory using mixed-precision training, increasing accessibility for medical AI research.
- To evaluate the method’s performance on limited labeled data, demonstrating strong few-shot generalization in pathological image classification.
Proposed method
- The method uses a triplet-based loss that maximizes similarity between two augmented views of the same patch (intra-sample) and between two views from adjacent patches (inter-sample), both treated as positive pairs.
- It employs a SimSiam-style architecture with stop-gradient operation to prevent collapse, avoiding the need for momentum encoders or negative pairs.
- Adjacent image patches from the same WSI are used as positive pairs, leveraging spatial proximity to ensure semantic similarity.
- The model is trained with a batch size of 128 on a single 16GB GPU using mixed-precision training to improve efficiency and memory usage.
- Three augmentation views are generated per adjacent pair: two from one patch and one from its neighbor, forming the triplet input.
- The final loss function combines both intra-sample and inter-sample similarity objectives to enhance feature discrimination.
Experimental results
Research questions
- RQ1Can a contrastive learning method that avoids negative samples achieve superior performance in medical image representation learning?
- RQ2Can the multi-view nature of pathological images—specifically, spatially adjacent patches—be effectively leveraged to improve self-supervised representation learning?
- RQ3Can a contrastive learning model be trained efficiently on a single GPU with 16GB memory while maintaining high performance?
- RQ4How does the performance of the proposed method compare to supervised learning and SimSiam when only a small fraction of labeled data is available?
- RQ5Does the inclusion of inter-sample positive pairs (adjacent patches) improve representation quality beyond intra-sample augmentation alone?
Key findings
- SimTriplet achieved a macro F1 score of 0.6477 and balanced accuracy of 0.7171, outperforming supervised learning (F1: 0.5146, balanced accuracy: 0.6113) by 10.58% in performance gain.
- It surpassed SimSiam trained on 79,000 images (F1: 0.6267, balanced accuracy: 0.6988) by 2.13% in F1 score and 1.83% in balanced accuracy.
- With only 1% of labeled data, SimTriplet achieved a balanced accuracy of 0.7090, outperforming SimSiam (0.7085) and demonstrating strong few-shot generalization.
- The method maintained high performance across all data ratios (1% to 100%), with balanced accuracy of 0.7280 at 25% labeled data, indicating robustness to data scarcity.
- The use of adjacent patch pairs as positive samples significantly enhanced representation learning, as evidenced by the consistent performance gains over SimSiam and supervised baselines.
- Training on a single 16GB GPU with mixed-precision was sufficient to achieve state-of-the-art results, demonstrating high accessibility and efficiency.
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.