Dynamic Fine-Tuning Strategy of Deep Learning Models for Lung Disease Classification on Chest X-ray Images
Abstract
Lung diseases remain a leading cause of life-threatening illnesses worldwide, particularly in developing countries with limited healthcare resources. In recent years, deep convolutional neural networks (CNNs) have demonstrated strong potential in the automatic interpretation of chest X-ray (CXR) images. However, existing approaches often rely on rigid two-stage fine-tuning or fixed-step progressive unfreezing strategies, which may fail to effectively adapt pretrained representations or destabilize optimization, especially when applied to imbalanced real-world datasets. This study proposes a validation-driven dynamic fine-tuning strategy for transfer learning that adaptively unfreezes network layers based on convergence signals observed on the validation set rather than predefined training epochs. By coupling the timing and depth of adaptation to generalization behavior, the proposed method enables controlled knowledge transfer while mitigating catastrophic forgetting and improving training stability. Experiments were conducted on a large-scale, real-world clinical dataset comprising 15,416 CXR images collected at An Giang Regional General Hospital, Vietnam. The proposed strategy was systematically evaluated across multiple CNN backbones, including Xception, DenseNet121, EfficientNetV2S, InceptionV3, MobileNet, ResNet50, and VGG16. Performance was assessed using overall accuracy and macro-F1 score to address class imbalance. Results demonstrate consistent improvements across all architectures, with a mean accuracy gain of 3.18% compared to conventional fine-tuning (p = 0.02). MobileNet achieved the best performance with 85.1% accuracy and 66.8% macro-F1, while maintaining a compact model size of 73.05 MB. These findings indicate that validation-driven dynamic fine-tuning provides a stable, statistically significant, and deployment-feasible transfer learning mechanism suitable for real-world clinical environments.
Downloads
References
World Health Organization, ‘Fourth WHO consultation on the translation of tuberculosis research into global policy guidelines: meeting report’, 2024.
P. Jackson, S. Z. Muyanja, and T. Siddharthan, ‘Health Equity and Respiratory Diseases in Low- and Middle-Income Countries’, Clin. Chest Med., vol. 44, no. 3, pp. 623–634, Sep. 2023, doi: https://doi.org/10.1016/j.ccm.2023.03.015.
C. Ortiz-Toro, A. García-Pedrero, M. Lillo-Saavedra, and C. Gonzalo-Martín, ‘Automatic detection of pneumonia in chest X-ray images using textural features’, Computers in Biology and Medicine, vol. 145, p. 105466, 2022, doi: 10.1016/j.compbiomed.2022.105466.
A. Hage Chehade, N. Abdallah, J. M. Marion, M. Hatt, M. Oueidat, and P. Chauvet, ‘A Systematic Review: Classification of Lung Diseases from Chest X-Ray Images Using Deep Learning Algorithms’, 2024, Springer. doi: https://doi.org/10.1007/s42979-024-02751-2
G. F. Abbott, ‘Challenging Chest Radiograph Interpretation’, in Diseases of the Chest, Heart and Vascular System 2025-2028: Diagnostic Imaging, Springer, 2025, pp. 169–187. doi: 10.1007/978-3-031-83872-9_14.
I. Pershin, T. Mustafaev, D. Ibragimova, and B. Ibragimov, ‘Changes in Radiologists’ Gaze Patterns Against Lung X-rays with Different Abnormalities: a Randomized Experiment’, Journal of Digital Imaging, vol. 36, no. 3, pp. 767–775, Jan. 2023, doi: 10.1007/s10278-022-00760-2.
E. Kotei and R. Thirunavukarasu, ‘A Comprehensive Review on Advancement in Deep Learning Techniques for Automatic Detection of Tuberculosis from Chest X-ray Images’, Jan. 28, 2024. doi: 10.1007/s11831-023-09987-w.
A. W. Salehi et al., ‘A Study of CNN and Transfer Learning in Medical Imaging: Advantages, Challenges, Future Scope’, Mar. 29, 2023, MDPI. doi: 10.3390/su15075930.
S. Fayaz, S. Z. Ahmad Shah, N. M. ud din, N. Gul, and A. Assad, ‘Advancements in Data Augmentation and Transfer Learning: A Comprehensive Survey to Address Data Scarcity Challenges’, Recent Advances in Computer Science and Communications, vol. 17, no. 8, pp. 14–35, Nov. 2024, doi: 10.2174/0126662558286875231215054324.
H. E. Kim, A. Cosa-Linan, N. Santhanam, M. Jannesari, M. E. Maros, and T. Ganslandt, ‘Transfer learning for medical image classification: a literature review’, 2022. doi: 10.1186/s12880-022-00793-7.
G. Ayana, K. Dese, A. M. Abagaro, K. C. Jeong, S.-D. Yoon, and S. Choe, ‘Multistage transfer learning for medical images’, Artificial Intelligence Review, vol. 57, no. 9, p. 232, 2024. https://doi.org/10.1007/s10462-024-10855-7
J. C. Y. Seah et al., ‘Effect of a comprehensive deep-learning model on the accuracy of chest x-ray interpretation by radiologists: a retrospective, multireader multicase study’, The Lancet Digital Health, vol. 3, no. 8, pp. e496–e506, 2021, doi: 10.1016/S2589-7500(21)00106-0.
G. Wang, P. Wang, J. Cong, K. Liu, and B. Wei, ‘BB-GCN: A Bi-modal Bridged Graph Convolutional Network for Multi-label Chest X-Ray Recognition’, 2023,
doi: https://doi.org/10.48550/arXiv.2302.11082
Y. Jin, H. Lu, W. Zhu, and W. Huo, ‘Deep learning based classification of multi-label chest X-ray images via dual-weighted metric loss’, Computers in Biology and Medicine, vol. 157, p. 106683, May 2023, doi: 10.1016/j.compbiomed.2023.106683.
M. Blain et al., ‘Determination of disease severity in COVID-19 patients using deep learning in chest X-ray images’, vol. 27, no. 1, p. 20. doi: 10.5152/dir.2020.20205
S. Sajed, A. Sanati, J. E. Garcia, H. Rostami, A. Keshavarz, and A. Teixeira, ‘The effectiveness of deep learning vs. traditional methods for lung disease diagnosis using chest X-ray images: A systematic review’, Applied Soft Computing, vol. 147, p. 110817, Nov. 2023, doi: 10.1016/j.asoc.2023.110817.
S. Sharma and K. Guleria, ‘A Deep Learning based model for the Detection of Pneumonia from Chest X-Ray Images using VGG-16 and Neural Networks’, in Procedia Computer Science, 2022, pp. 357–366. doi: 10.1016/j.procs.2023.01.018.
A. Tekerek and I. A. M. Al-Rawe, ‘A Novel Approach for Prediction of Lung Disease Using Chest X-ray Images Based on DenseNet and MobileNet’, Wireless Personal Communications, pp. 1–15, May 2023, doi: 10.1007/s11277-023-10489-y.
H. Nakrani, E. Q. Shahra, S. Basurra, R. Mohammad, E. Vakaj, and W. A. Jabbar, ‘Advanced Diagnosis of Cardiac and Respiratory Diseases from Chest X-Ray Imagery Using Deep Learning Ensembles’, Journal of Sensor and Actuator Networks, vol. 14, no. 2, p. 44, 2025, doi: 10.3390/jsan14020044.
N. Spolaôr et al., ‘Fine-tuning pre-trained neural networks for medical image classification in small clinical datasets’, Multimedia Tools and Applications, vol. 83, no. 9, pp. 27305–27329, 2024, doi: 10.1007/s11042-023-16529-w.
C. Bu et al., ‘Layer-Wise Learning Rate Optimization for Task-Dependent Fine-Tuning of Pre-Trained Models: An Evolutionary Approach’, vol. 4, no. 4, pp. 1–23. https://doi.org/10.1145/3689827
H. E. Kim, A. Cosa-Linan, N. Santhanam, M. Jannesari, M. E. Maros, and T. Ganslandt, ‘Transfer learning for medical image classification: a literature review’, 2022. doi: 10.1186/s12880-022-00793-7.
M. Byra, ‘Breast mass classification with transfer learning based on scaling of deep representations’, Biomed. Signal Process. Control, vol. 69, p. 102828, 2021. https://doi.org/10.1016/j.bspc.2021.102828
M. Abadi et al., ‘TensorFlow: A system for large-scale machine learning’, May 2016, [Online]. https://doi.org/10.48550/arXiv.1605.08695
N. Spolaôr et al., ‘Fine-tuning pre-trained neural networks for medical image classification in small clinical datasets’, Multimed. Tools Appl., vol. 83, no. 9, pp. 27305–27329, 2024, doi: 10.1007/s11042-023-16529-w.
C. Bu et al., ‘Layer-Wise Learning Rate Optimization for Task-Dependent Fine-Tuning of Pre-Trained Models: An Evolutionary Approach’, vol. 4, no. 4, pp. 1–23. https://doi.org/10.1145/3689827
L. Prechelt, ‘Early Stopping - But When?’, in Proceedings of Machine Learning Research, 1998, pp. 55–69. doi: 10.1007/3-540-49430-8_3.
L. N. Smith, ‘Cyclical Learning Rates for Training Neural Networks’, in 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), IEEE, Mar. 2017, pp. 464–472. doi: 10.1109/WACV.2017.58.
K. Alshamrani and H. A. Alshamrani, ‘An Efficient Dual-Sampling Approach for Chest CT Diagnosis’, pp. 239–253. Doi: https://doi.org/10.2147/jmdh.s472170
E. Chamseddine, N. Mansouri, M. Soui, and M. Abed, ‘Handling class imbalance in COVID-19 chest X-ray images classification: Using SMOTE and weighted loss’, vol. 129, p. 109588. doi: https://doi.org/10.1016/j.asoc.2022.109588
M. Byra, ‘Breast mass classification with transfer learning based on scaling of deep representations’, Biomedical Signal Processing and Control, vol. 69, p. 102828, 2021. doi: https://doi.org/10.1016/j.bspc.2021.102828
T. Geroski, O. Pavić, L. Dašić, D. Milovanović, M. Petrović, and N. Filipović, ‘SoftLungX: leveraging transfer learning with convolutional neural networks for accurate respiratory disease classification in chest X-ray images’, Journal of Big Data, vol. 11, no. 1, p. 146, 2024. doi: https://doi.org/10.1186/s40537-024-01018-0
S. Roy, M. Tyagi, V. Bansal, and V. Jain, ‘Svd-clahe boosting and balanced loss function for covid-19 detection from an imbalanced chest x-ray dataset’, Computers in Biology and Medicine, vol. 150, p. 106092, 2022. doi: https://doi.org/10.1016/j.compbiomed.2022.106092
Y.-X. Wu, K. Du, X.-J. Wang, and F. Min, ‘Misclassification-guided loss under the weighted cross-entropy loss framework’, Knowledge and Information Systems, vol. 66, no. 8, pp. 4685–4720, 2024.
D. R. Beddiar, M. Oussalah, U. Muhammad, and T. Seppänen, ‘A deep learning based data augmentation method to improve COVID-19 detection from medical imaging’, vol. 280, p. 110985. doi: https://doi.org/10.1016/j.knosys.2023.110985
D. A. Dablain, C. Bellinger, B. Krawczyk, and N. V Chawla, ‘Efficient augmentation for imbalanced deep learning’, in 2023 IEEE 39th International Conference on Data Engineering (ICDE), 2023, pp. 1433–1446. doi: https://doi.ieeecomputersociety.org/10.1109/ICDE55515.2023.00114
F. Chollet, ‘Xception: Deep learning with depthwise separable convolutions’, in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 1251–1258. doi: https://doi.org/10.1109/cvpr.2017.195
M. Tan and Q. V. Le, ‘EfficientNetV2: Smaller Models and Faster Training’, in Proceedings of Machine Learning Research, PMLR, 2021, pp. 10096–10106. doi: https://doi.org/10.48550/arXiv.2104.00298
C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, ‘Rethinking the Inception Architecture for Computer Vision’, in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2016, pp. 2818–2826. doi: 10.1109/CVPR.2016.308. https://doi.org/10.48550/arXiv.1512.00567
M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen, ‘MobileNetV2: Inverted Residuals and Linear Bottlenecks’, in 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, IEEE, Jun. 2018, pp. 4510–4520. doi: 10.1109/CVPR.2018.00474.
K. He, X. Zhang, S. Ren, and J. Sun, ‘Deep residual learning for image recognition’, in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2016, pp. 770–778. doi: 10.1109/CVPR.2016.90.
K. Simonyan and A. Zisserman, ‘Very deep convolutional networks for large-scale image recognition’, in 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, 2015. doi: https://doi.org/10.48550/arXiv.1409.1556
M. Abadi et al., ‘TensorFlow: A system for large-scale machine learning’, May 2016. https://doi.org/10.48550/arXiv.1605.08695
M. Watson et al., ‘KerasCV and KerasNLP: Multi-framework Models’, Journal of Machine Learning Research, vol. 25, no. 375, pp. 1–10, 2024. doi: 10.1007/s42979-024-02763-0
U. Chutia, A. S. Tewari, J. P. Singh, and V. K. Raj, ‘Classification of Lung Diseases Using an Attention-Based Modified DenseNet Model’, Journal of Imaging Informatics in Medicine, vol. 37, no. 4, pp. 1625–1641, Mar. 2024, doi: 10.1007/s10278-024-01005-0.
N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, ‘SMOTE: Synthetic Minority Over-sampling Technique’, Journal of Artificial Intelligence Research, vol. 16, pp. 321–357, Jun. 2002, doi: 10.1613/jair.953.
Haibo He, Yang Bai, E. A. Garcia, and Shutao Li, ‘ADASYN: Adaptive synthetic sampling approach for imbalanced learning’, in 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence), IEEE, Jun. 2008, pp. 1322–1328. doi: 10.1109/IJCNN.2008.4633969.
Copyright (c) 2026 Phuoc-Hai Huynh, Thi-Diem Truong

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).


.png)
.png)
.png)
.png)
.png)