Systematic Hyperparameter Optimization of Convolutional Neural Networks for Pneumonia Detection from Chest X-rays
Abstract
Pneumonia remains a major global health challenge. It is responsible for millions of deaths annually, making it one of the leading causes of mortality worldwide, particularly in low- and middle-income countries, where access to early and accurate diagnosis is often limited. Convolutional neural networks (CNNs) have shown strong potential in medical image classification. However, the performance of these deep learning models depends primarily on the choice of hyperparameters, which determine how effectively the models learn. This study investigates the interaction between multi-factor hyperparameters, which is a major gap in large-scale optimization for medical imaging. The goal is to systematically evaluate these interactions in order to develop a CNN diagnostic model with improved pneumonia detection accuracy. Using the RSNA Pneumonia Detection Challenge dataset, four pre-trained CNN architectures (VGG16, ResNet50, InceptionV3, and MobileNetV2) were trained and tested. Our methodology progressed from single-factor ablation to multi-factor interaction analysis. Two optimization approaches, Random Search (RS) and Bayesian Optimization (BO), were applied across five key hyperparameters: learning rate, epoch count, batch size, dropout rate, and optimizer. Results revealed that learning rate and optimizer had the greatest impact on classification accuracy. InceptionV3 was found to be the best-performing model (learning rate 0.001, batch size 64, dropout 0.1, 40 epochs, Adam optimizer), with a test F1-score of 92.5% and recall of 91.8%. BO consistently outperformed RS in improving CNN performance for pneumonia detection. Overall, these findings highlight that systematic, dataset-specific hyperparameter tuning can greatly enhance the reliability of CNN-based pneumonia detection from chest X-rays.
Keywords:
convolutional neural network, hyperparameter optimization, pneumonia detection, chest X-ray, medical imaging, deep learningPublished Online
How to Cite
Issue
Section
License
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License 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). As soon as the paper is accepted, finally submitted and edited, the paper will appear in the "OnlineFirst" page of the journal, thus from this point no other internet-based publication is necessary.
