Out-of-distribution (OOD) detection is a critical capability for the safe deployment of machine learning models in medical imaging, where systems inevitably encounter data from diverse sources that differ from the training distribution. This study presents a comprehensive comparative analysis of three representation learning paradigms—Joint Embedding Predictive Architecture (JEPA), Masked Autoencoder (MAE), and supervised learning—for chest X-ray out-of-distribution detection.
Using the TB Chest Radiography Database as in-distribution data and the Montgomery and Shenzhen tuberculosis datasets as out-of-distribution test sets, we evaluate OOD detection performance, cross-dataset generalization, and robustness to common image corruptions. Our experimental results demonstrate that self-supervised methods significantly outperform supervised learning on energy-based OOD detection, achieving 77–87% AUROC compared to 58–61% for supervised approaches. Furthermore, MAE exhibits exceptional robustness to contrast perturbations, maintaining 98.3% classification AUC under severe corruption where JEPA and supervised methods degrade to 67–76%. Mahalanobis distance-based detection achieves near-perfect performance (95–99% AUROC) across all methods, suggesting that distribution-aware scoring can compensate for representation differences.