Pneumonia remains a major cause of morbidity and mortality worldwide, and reliable interpretation of chest X-ray (CXR) images can be challenging because of visual overlap among pulmonary abnormalities and variability in image characteristics. In this study proposes a self-supervised learning (SSL)-based Vision Transformer (ViT) framework for automated three-class classification of COVID-19, normal, and pneumonia CXR images. To examine potential image-level artifacts and dataset integrity, a forensic analysis pipeline incorporating Error Level Analysis (ELA), Noise Residual Analysis (NRA), and perceptual hashing was employed. Perceptual hash analysis identified 230 near-duplicate image pairs, all occurring within the same class, with no cross-class near-duplicate pairs or exact duplicates among 4,800 images. The proposed ViT was first pretrained using SimCLR on unlabeled training images and subsequently fine-tuned for supervised classification, with augmentation applied exclusively to the training data and validation/test images remaining completely unseen during pretraining and downstream optimization. On the held-out test set, the proposed model achieved 98.12% accuracy (95% CI 97.42–98.64), with 98.13% precision, 98.12% recall, 98.12% F1-score, 97.19% MCC, and 99.85% AUC. Stratified five-fold cross-validation further demonstrated stable performance with 98.27% mean accuracy and 99.93% mean AUC. Independent external validation yielded accuracies of 60.42% and 74.30% across two datasets, indicating the presence of dataset and domain-related variability. Ablation experiments demonstrated the contribution of SSL, transformer depth, augmentation, patch configuration, and classification-head design. Integrated Gradients further provided interpretable localization of model-relevant pulmonary regions. Overall, the findings demonstrate the effectiveness of SSL-based ViT learning for CXR classification while highlighting the importance of forensic assessment, external validation, and interpretability for developing more reliable computer-aided diagnostic systems.
No takes yet. Share an insight, caveat, or question.
Hanzala et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: