An Attention-Enhanced Hybrid Deep Learning Framework for Explainable Pneumonia Detection from Chest X-Ray Images
Abstract
Chest X-ray (CXR) imaging is not particularly easy to interpret, due to the subtle appearance of the disease on CXR, and is prone to inter-observer variation, it is still regarded as the main diagnostic imaging modality for pneumonia, worldwide. Despite thepromising results of deep learning models for automated pneumonia diagnosis, current convolutional architectures use only a single depth-based feature representation, and are mostly opaque, non-interpretable classifiers, which compromises the reliability and trust in clinical use. In this paper, we present PneumoFusion-Net, a multi-level convolutional feature extraction coupled with channel and spatial attention refinement framework to focus on the regions of the lungs relevant for diagnosis and ignore irrelevant background information. The extracted features from the shallow, intermediate and deep layers of a ResNet50 backbone are further refined using attention modules and merged into a unified representation for subsequent classification, while the Grad-CAM is directly incorporated in the pipeline to produce visual explanations for each prediction. The proposed model was trained and tested on the Kaggle chest X-ray pneumonia dataset which is publicly available consisting of 5,856 images. Experimental results show that the PneumoFusion-Net obtains test accuracy of 92.00%, precision of 0.92, recall of 0.92 and F1 of 0.92, while has a significantly smaller train-test accuracy gap of 2.60% compared to the VGG16, ResNet50, DenseNet121 and MobileNetV2 baselines,showing better generalization performance. The results indicate that multi-level attention fusion and built-in explainability are a practical and clinically reliable approach to automated screening of pneumonia.