Interpretable multi-class lung disease classification from chest x-ray images using attention-enhanced deep learning
Abstract
Accurate and interpretable multi-class recognition of lung diseases from chest x-ray (CXR) images remains challenging because different pulmonary conditions can present with overlapping radiographic patterns, making reliable automated diagnosis difficult in clinical screening and decision support. This study aims to develop an interpretable CXR-based multi-class lung disease classification framework using attention-enhanced deep learning and to compare its performance with standard transfer learning and baseline CNN models. The work contributes a comparative benchmark of attention mechanisms, including convolutional block attention module (CBAM), squeeze-and-excitation (SE), self-attention, and spatial-channel attention, together with statistical significance analysis and explainability using Grad-CAM, Score-CAM, and attention heatmaps. It also provides a structured evaluation pipeline across EfficientNet-B0, ResNet50, DenseNet121, MobileNetV2, and a basic CNN. Experiments were conducted on a three-class CXR dataset containing Normal, Lung Opacity, and Viral Pneumonia images. Images were divided into training, validation, and test sets, and deep models were trained using transfer learning with optimized hyperparameters. Model performance was assessed using accuracy, precision, recall, F1-score, ROC-AUC, Matthews correlation coefficient, and Cohen’s kappa. Statistical validation was performed using McNemar tests, Friedman testing, and module-level comparative analysis. Among the attention-enhanced models, the SE-based model achieved the best test performance, with accuracy of 0.9425 and macro F1-score of 0.9438, followed closely by CBAM and spatial-channel attention. Across the compared models, the Friedman test showed a statistically significant global difference in performance (chi-square = 112.13, p < 0.001). Explainability results further showed that the proposed attention-based models focused on clinically relevant chest regions. Attention-enhanced deep learning is effective for robust and interpretable multi-class lung disease classification from CXR images. In particular, SE-based attention provided the strongest overall performance, while statistical testing confirmed meaningful differences among model groups. These findings support the use of interpretable attention mechanisms for practical AI-assisted thoracic image analysis.