A Chest X-ray Pneumonia Classification Method Integrating Multi-Scale Dilated Attention and Class-Imbalance Optimization
DOI:
https://doi.org/10.54097/x83v4q22Keywords:
YOLO11n-cls, Chest X-ray Image Classification, Multi-scale Dilated Attention, Class-imbalance Learning, Pneumonia-assisted DiagnosisAbstract
Faint pneumonia lesions with indistinct edges and skewed data distributions create major obstacles for CXR classification. CXP-MSDA is developed to tackle both difficulties by combining multi-scale dilated attention and imbalance-aware optimization. This architecture uses ResNet18 as the front-end extractor and inherits the deep feature pipeline of YOLO11n-cls to enrich high-level semantic representations. A multi-scale dilated attention (MSDA) block is embedded within the classification head. Sparse sampling across local windows with varied dilation rates enlarges the receptive field and supports better cross-scale context learning. Focal loss is adopted to reduce the overwhelming gradient contribution from simple samples and ease bias brought by uneven class distribution. Comparative evaluations run on the binary Kermany dataset and three-class Cohen dataset against YOLO11n-cls and other popular baselines. Measured against YOLO11n-cls, accuracy gains of 3.85% and 0.90% are achieved on Kermany and Cohen respectively, while recall hits 97.73% and 98.00%. Such outcomes verify that the presented approach boosts classification performance on public CXR benchmarks and maintains stable predictions under imbalanced settings.
Downloads
References
[1] Holste, G., et al. (2024). Towards long-tailed, multi-label disease classification from chest X-ray: overview of the CXR-LT challenge. Medical Image Analysis, 97, 103224. https://doi.org/10.1016/j.media.2024.103224. DOI: https://doi.org/10.1016/j.media.2024.103224
[2] Chen, C., Isa, N. A. M., Liu, X., Ding, J., & Lu, L. (2026). MSA-Net: multi-scale attention-based DenseNet for multi-label chest X-ray image classification. Biomedical Signal Processing and Control, 113, 109069. https://doi.org/10.1016/j.bspc.2026.109069. DOI: https://doi.org/10.1016/j.bspc.2025.109069
[3] Slimi, H., Balti, A., Abid, S., & Sayadi, M. (2025). Trustworthy pneumonia detection in chest X-ray imaging through attention-guided deep learning. Scientific Reports, 15(1), 40029. https://doi.org/10.1038/s41598-025-94627-3. DOI: https://doi.org/10.1038/s41598-025-23664-x
[4] Huang, G., Liu, Z., van der Maaten, L., & Weinberger, K. Q. (2017). Densely connected convolutional networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 4700–4708. https://doi.org/10.1109/CVPR.2017.243. DOI: https://doi.org/10.1109/CVPR.2017.243
[5] Tan, M., & Le, Q. V. (2019). EfficientNet: rethinking model scaling for convolutional neural networks. Proceedings of the 36th International Conference on Machine Learning, 97, 6105–6114.
[6] Liu, Z., et al. (2022). A ConvNet for the 2020s. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 11976–11986. https://doi.org/10.1109/CVPR52688.2022.01167. DOI: https://doi.org/10.1109/CVPR52688.2022.01167
[7] Gorbachev, S., Dixit, A., Mani, A., & Wang, Z. (2026). Hybrid deep learning framework MedFusionNet assists multilabel biomedical risk stratification from imaging and tabular data. Communications Medicine, 6(1), 47. https://doi.org/10.1038/s43856-026-00892-7. DOI: https://doi.org/10.1038/s43856-025-01334-3
[8] Xie, Y., Zhu, B., Jiang, Y., Zhao, B., & Yu, H. (2025). Diagnosis of pneumonia from chest X-ray images using YOLO deep learning. Frontiers in Neurorobotics, 19, 1576438. https://doi.org/10.3389/fnbot.2025.1576438. DOI: https://doi.org/10.3389/fnbot.2025.1576438
[9] Mahdiani, M. R. (2025). Progressive multi-scale attention neural network for pneumonia classification in chest X-rays. Informatics in Medicine Unlocked, 55, 101646. https://doi.org/10.1016/j.imu.2025.101646. DOI: https://doi.org/10.1016/j.imu.2025.101646
[10] Lin, M., et al. (2025). CXR-LT 2024: a MICCAI challenge on long-tailed, multi-label, and zero-shot disease classification from chest X-ray. Medical Image Analysis, 106, 103739. https://doi.org/10.1016/j.media.2025.103739. DOI: https://doi.org/10.1016/j.media.2025.103739
[11] Xu, Z., & Zhang, H. (2026). Pneumonia detection from enhanced chest X-ray images based on Double SGAN model. Scientific Reports, 16(1), 9922. https://doi.org/10.1038/s41598-026-84217-1. DOI: https://doi.org/10.1038/s41598-026-39785-w
[12] Zhou, X. (2014). Classification method for medical images based on HOG features and SVM. China Medical Devices, 29(2), 132–133. (in Chinese).
[13] Deng, Q., Lei, Y., & Tian, F. (2020). Optimized convolutional neural network method for classification of pneumonia images. Journal of Computer Applications, 40(1), 71–76. (in Chinese)
[14] Rajpurkar, P., et al. (2017). CheXNet: radiologist-level pneumonia detection on chest X-rays with deep learning. arXiv preprint arXiv:1711.05225.
[15] Wang, L., Lin, Z. Q., & Wong, A. (2020). COVID-Net: a tailored deep convolutional neural network design for detection of COVID-19 cases from chest X-ray images. Scientific Reports, 10(1), 19549. https://doi.org/10.1038/s41598-020-76550-z. DOI: https://doi.org/10.1038/s41598-020-76550-z
[16] Rao, S., Zeng, Z., & Zhang, J. (2025). Robust multiclass pneumonia classification via multi-head attention and transfer learning ensemble. Applied Sciences, 15(21), 11426. https://doi.org/10.3390/app152111426. DOI: https://doi.org/10.3390/app152111426
[17] Woo, S., Park, J., Lee, J.-Y., & Kweon, I. S. (2018). CBAM: convolutional block attention module. Proceedings of the European Conference on Computer Vision, 3–19. https://doi.org/10.1007/978-3-030-01234-2_1. DOI: https://doi.org/10.1007/978-3-030-01234-2_1
[18] Jiao, J., et al. (2023). DilateFormer: multi-scale dilated transformer for visual recognition. IEEE Transactions on Multimedia, 25, 8906–8919. https://doi.org/10.1109/TMM.2023.3251192. DOI: https://doi.org/10.1109/TMM.2023.3243616
[19] Hellín, C. J., et al. (2024). Unraveling the impact of class imbalance on deep-learning models for medical image classification. Applied Sciences, 14(8), 3419. https://doi.org/10.3390/app14083419. DOI: https://doi.org/10.3390/app14083419
[20] Cai, Z., Wei, T., Lin, L., Chen, H., & Tang, X. (2024). BPaCo: balanced parametric contrastive learning for long-tailed medical image classification. Proceedings of Medical Image Computing and Computer-Assisted Intervention, 383–393. https://doi.org/10.1007/978-3-031-72114-4_37. DOI: https://doi.org/10.1007/978-3-031-72378-0_36
[21] Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. (2016). You only look once: Unified, real-time object detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 779–788. https://doi.org/10.1109/CVPR.2016.91. DOI: https://doi.org/10.1109/CVPR.2016.91
[22] Yao, S., Chen, Y., Tian, X., Jiang, R., & Ma, S. (2020). An improved algorithm for detecting pneumonia based on YOLOv3. Applied Sciences, 10(5), 1818. https://doi.org/10.3390/app10051818. DOI: https://doi.org/10.3390/app10051818
[23] Hasib, U. A., et al. (2025). YOLOv8 framework for COVID-19 and pneumonia detection using synthetic image augmentation. Digital Health, 11, 20552076251341092. https://doi.org/10.1177/20552076251341092. DOI: https://doi.org/10.1177/20552076251341092
[24] Kermany, D., Zhang, K., & Goldbaum, M. (2018). Labeled optical coherence tomography (OCT) and chest X-ray images for classification. Mendeley Data (Version 2). https://doi.org/10.17632/rscbjbr9sj.2.
[25] Cohen, J. P., et al. (2020). COVID-19 image data collection: prospective predictions are the future. Machine Learning for Biomedical Imaging, 1, 1–38. DOI: https://doi.org/10.59275/j.melba.2020-48g7
[26] Mujahid, M., et al. (2022). Pneumonia classification from X-ray images with Inception-V3 and convolutional neural network. Diagnostics, 12(5), 1280. https://doi.org/10.3390/diagnostics12051280. DOI: https://doi.org/10.3390/diagnostics12051280
[27] Reshan, M. S. A., et al. (2023). Detection of pneumonia from chest X-ray images utilizing MobileNet model. Healthcare, 11(11), 1561. https://doi.org/10.3390/healthcare11111561. DOI: https://doi.org/10.3390/healthcare11111561
[28] Jiang, Z., & Chen, L. (2022). Multisemantic level patch merger vision transformer for diagnosis of pneumonia. Computational and Mathematical Methods in Medicine, 2022, 7852958. https://doi.org/10.1155/2022/7852958. DOI: https://doi.org/10.1155/2022/7852958
[29] Saber, A., et al. (2025). Efficient and accurate pneumonia detection using a novel multi-scale transformer approach. Sensors, 25(23), 7233. https://doi.org/10.3390/s25237233. DOI: https://doi.org/10.3390/s25237233
[30] Goodwin, B. D., Jaskolski, C., Zhong, C., & Asmani, H. (2020). Intra-model variability in COVID-19 classification using chest X-ray images. arXiv preprint arXiv:2005.02167.
[31] Gazda, M., Plavka, J., Gazda, J., & Drotar, P. (2021). Self-supervised deep convolutional neural network for chest X-ray classification. IEEE Access, 9, 151972–151982. https://doi.org/10.1109/ACCESS.2021.3127575. DOI: https://doi.org/10.1109/ACCESS.2021.3125324
[32] Selvaraju, R. R., et al. (2017). Grad-CAM: Visual explanations from deep networks via gradient-based localization. Proceedings of the IEEE International Conference on Computer Vision, 618–626. https://doi.org/10.1109/ICCV.2017.74. DOI: https://doi.org/10.1109/ICCV.2017.74
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

