Abstract
Pneumonia detection using chest radiographs remains challenging because image quality, patient characteristics, acquisition protocols, and institutional practices can influence diagnostic interpretation. Deep learning systems offer opportunities to support radiological assessment; however, their diagnostic reliability may decrease when applied to populations and imaging environments different from those used during model development. This study evaluates the diagnostic performance, generalizability, predictive uncertainty, and computational feasibility of three deep learning architectures for binary pneumonia classification. The investigated approaches include a lightweight convolutional neural network, a transfer learning model based on ResNet50, and a hybrid architecture combining convolutional feature extraction with Transformer-based attention mechanisms. Models were developed using a publicly available chest radiograph dataset and evaluated on an independent internal test cohort and external datasets without retraining. Diagnostic performance was assessed using accuracy, sensitivity, specificity, F1-score, and the area under the receiver operating characteristic curve. Predictive uncertainty was estimated using repeated stochastic inference, with a deferral strategy designed to identify examinations requiring additional expert assessment. The hybrid architecture achieved the highest internal discrimination performance, with an area under the receiver operating characteristic curve of 0.962, compared with 0.945 for ResNet50 and 0.875 for the lightweight model. External evaluation demonstrated reduced performance relative to internal testing, highlighting the challenges associated with differences in patient populations and imaging distributions. The proposed uncertainty-aware framework provides an additional mechanism for identifying potentially ambiguous examinations and directing them toward radiologist review. These findings support further investigation of deep learning as a decision-support approach for pneumonia assessment, while emphasizing the need for independent clinical validation and human-reader comparison before practical implementation.