Semi-Supervised Pneumonia Detection Via Contrastive Representation Learning: A SimCLRv2 Framework with Knowledge Distillation
摘要
Pneumonia remains a significant global health concern, with chest X-ray imaging serving as a primary diagnostic tool. However, conventional deep learning approaches for pneumonia detection rely heavily on large-scale labeled datasets, which are often limited, class-imbalanced, and geographically narrow in scope. In this work, we propose a four-stage semi-supervised learning framework leveraging SimCLRv2, a contrastive representation learning method, augmented by a lightweight student model trained through knowledge distillation. We construct a new, diverse chest X-ray dataset of 9243 images balanced between pneumonia and normal classes, aggregated from multiple public sources to mitigate the bias prevalent in existing datasets such as the Kermany dataset. The dataset is partitioned into labeled and unlabeled subsets to support both supervised baselines and self-supervised training. Our pipeline begins with self-supervised pretraining on the unlabeled subset using SimCLRv2 with a ResNet50 encoder, followed by staged classifier training and encoder fine-tuning. Finally, a MobileNetV2-based student model is distilled from the fine-tuned teacher, offering improved inference efficiency with minimal performance trade-off. We benchmark the proposed architecture against two strong supervised baselines: (1) a fuzzy attention-based FA-Net model, and (2) an ensemble of DenseNet169, MobileNetV2, and Vision Transformer. Results on a held-out test set show that SimCLRv2 Stage 3 (fine-tuned encoder) achieves 95% accuracy, which is comparable to FA-Net (96%) and the Ensemble CNN (94%) while requiring significantly fewer labeled samples. Additionally, the Stage 4 student model achieves 87% accuracy, validating the effectiveness of label-efficient training via knowledge distillation. These findings underscore the promise of combining self-supervised contrastive learning with student–teacher distillation to develop scalable, high-performance medical image classifiers, especially in low-resource or label-scarce clinical environments.