The Implications of Varying Batch-Size in the Classification of Patch-Based Lung Nodules Using Convolutional Neural Network Architecture on Computed Tomography Images

. In recent years, the research on deep Convolutional Neural Networks (CNNs) has led to remarkable advancements in image categorization and segmentation. This paper presents a new Computer-Aided Detection (CAD) system utilizing convolutional neural networks and Computed Tomography (CT) image segmentation techniques to address the same problem of diagnostic lung nodule detection in low-dose CT scans. To simplify the approach, the system utilizes CNN for the classification of the malignant nodule. Specifically, divide each CT scan into several patches, with nodules and the remainder of the image falling into separate groups. Utilizing CT images from the Lung Image Database Consortium and Image Database Resource Initiative, the CNN models are evaluated. The overall accuracy metric measures the percentage of correctly classified instances (both benign and malignant) out of the total number of instances. From the results, it is observed that the overall accuracy generally ranges from 93% to 96% for different batch sizes. According to the findings, the most advanced model can achieve a detection accuracy of 96% with 256 batch size. © 2024 Journal of Biomedical Photonics & Engineering.


Introduction
Lung cancer is the leading cause of cancer-related mortality, as reported by 2021 statistics from the American Cancer Society.The rate of lifespan of cancer patients can be greatly enhanced through careful monitoring for any signs of the disease.Computed Tomography (CT) is frequently applied by radiologists in the evaluation of lung cancer because of its high sensitivity to detect pulmonary nodules [1].Lung cancer death can be reduced more effectively than with chest X-ray (radiograph) screening because of its higher detection rate [2].Despite the high sensitivity of CT scans [3] in detecting nodules, it is still not easy for a radiologist to inform whether a nodule is benign or malignant in the procedure.According to the National Lung Screening Trial Research Team [4], monitoring using low-dose CT scans [5] lowered lung carcinoma deaths by 15-20%.Radiation exposure is increased because of unnecessary CT scans [6] instructed after a false positive diagnosis.In this research, a Convolutional Neural Network (CNN) [7] is proposed to identify whether a nodule is malignant or not, which will aid radiologists in making an accurate diagnosis of lung cancer.Deep learning, especially CNNs has transformed the world of medical imaging delivering remarkable advancements in pathology detection and classification.The use of CNNs in the patch-based method has proved effective not only for improving detection accuracy but J of Biomedical Photonics & Eng 10(1) 2024 4 Mar 2024 © J-BPE 010305-2 also minimizing time and resource consumption.Nevertheless, optimizing CNN architectures including finding an optimal batch size during the training process still proves to be a complicated issue.Optimization is essential to balance between computational resources and learning complex features in CT images that can help to improve diagnostic performance.
The major issue in using CNNs for lung nodule detection is the fact that there are different applications of nodules appearance and a large amount of data present within CT scans.Some of the drawbacks in this approach includes high false-positive, variable sensitivity resulting diagnostic oversight and unwarranted anxiety among patients.The selection of the batch size during CNN training plays a significant role as it influences the model generalizes, its stability in training and rate at which the convergence is occurring.An under-optimized batch size may cause suboptimal learning, which affects the ability of a system to differentiate between nodular and nonnodular patches, whereby its clinical usability is compromised.
The objective of this research is to determine the effects of size on the CNN architecture for classification lung nodules in patch-based CT images.The goals include identifying the best batch size that offers a trade-off between computational efficiency and high accuracy in classification, minimizing false positives and negatives on nodule detection.In attaining these objectives, the study aims to develop a more accurate and cost-effective CNN based Computer Aided Diagnosis (CAD) systems that can be easily integrated into clinical workflows for early detection or lung cancer.Hence, improving patient outcomes as well allocation of health care resources was also implied.
The structure of the paper is as follows: Section 2 is the literature review that can be considered a starting point of research to understand the problems.Section 3 methodology analyses the experimental design and data analysis.Section 4 discusses the findings in detail then concludes by an implication discussion.Lastly Section 5 ends with conclusion and future exploration.

Literature Review
Several methods have been proposed for classifying lung nodules.However, there is a need for a method that can reliably identify a malignant tumor, thereby reducing the possibility of a wrong diagnosis.Deep reinforcement learning [8], generative adversarial networks [9], and CNNs [10,11] are highlighted as effective deep learning architectures.Among them, CNN has performed better than other DL architectures.To extract the most effective features for classification, most machine learning algorithms must first examine the connection between the data and the class label.Choosing appropriate features is crucial to the success of a classification system [12].However, CNNs use a sequential approach to feature extraction and classification.Furthermore, CNN [13] has demonstrated the highest performance in the classification of biomedical images.There are several advantages of using CNN to determine whether lung nodules [14] are malignant.CNN has shown better results than most traditional models at identifying these tumors [15].To classify lung nodules, CNN architecture's convolution, pooling, and fully connected layer combine the feature extraction and classification phases into a single step.Since CNN [16] is more effective than other deep learning architectures for classifying lung nodules, researchers are primarily interested in refining this particular architecture.The classification of biomedical images using CNN features has improved over that using manually crafted features such as histogram, texture, etc. [17].Early identification is essential in the process of diagnosing carcinoma and can enhance one's chances of surviving the disease over the long term [18].Because of this, research on the identification and classification of lung cancer has developed into a significant field in recent years.CNNs have been used in several studies for lung cancer classification and detection to establish a dependable procedure.This section will provide an overview of a few.Deep residual networks were used in the method that was proposed by Bhatia et al. [19] to detect lung cancer and extract features.The UNet and ResNet models are used to extract features, and these features are then given into a variety of classifiers.Additionally, XGBoost and Random Forest, in addition to the individual forecasts, can predict the likelihood that a CT scan will reveal malignancy.The accuracy of the research work is determined to be 84% when applied to the Lung Image Database Consortium and the Image Database Resource Initiative (LIDC-IDRI) dataset.
Kriegsmann et al. [20] investigated the various types of lung carcinoma in connection via the University Clinic Heidelberg.The authors received support from the tissue bank of the National Center of Tumor Diseases, which curated, digitised, annotated, and extracted image patches from the Institute of Pathology Archive for 30 skeletal muscles to serve as controls.The authors investigated multiple configurations of CNN architectures for the purpose of classification.They asserted that the InceptionV3 CNN architecture, which was optimised, yielded the highest accuracy in classification among all the configurations that were tested.Dou et al. [21] came up with a novel strategy for the automatic detection of pulmonary nodules using volumetric CT scans.Their method makes use of 3D CNN to cut down on the number of false positives.The LUNA16 Challenge involved the analysis of a dataset [22], and it was successful in achieving the highest possible score (0.827) on the competition's competition performance metric.

Dataset
In this work, experiments were conducted for both training and evaluation using data from the LIDC-IDRI dataset [23].There are 1018 cases in the LIDC-IDRI, all of which are thoracic CT scans for lung cancer screening with annotated lesions.These lesions were classified into three groups by size and by four experienced radiologists namely nodule 3 mm, nodule > 3mm andnon-nodule [24].Each of the four radiologists tagged each nodule with information about its texture, malignancy, and calcification, and this information is included in an XML file that is attached to each patient's file.The 512  512 pixel images, with 65 to 764 slices, are all in line with the Digital Imaging and Communications in Medicine (DICOM) standard for medical imaging.
The scanned data is divided into two groups such as training and testing to assess the effectiveness of the proposed CNNs' architecture more accurately.The weights of the convolutional, fully connected, and softmax layers were all updated based on the training set.Hyper-parameters like the learning rate, the number of kernels, and kernel size of each unit, were all adjusted using the validation set.Each component of the CAD system, including the CNN, was put through its paces using the testing set to determine their performance.

Loss Function Categorical Cross entropy
The LUNA16 [25] competition provided some of the preprocessed data sets used in this research and its samples are shown in Fig. 1.It is made up of 6691 different images and their respective classes.

Proposed CNN Architecture
The CNN learns to map a given image into its corresponding category by identifying some abstract features.The complexity increases when the number of detected features increases [26].The network then makes use of these distinguishing characteristics to predict the appropriate image category [27].Normalization, convolution, activation, pooling, fully connected layers, and a classifier are the fundamental functionalities in the proposed CNN architecture as shown in Fig. 2.
As per the original data [9], the convolutional layer is considered as the central processing unit of the neural network, responsible for executing the convolution operation on the input image in case the input layer or the feature map obtained from the preceding layers.The pooling layer is a technique for down sampling that aids in achieving spatial invariance after a convolution layer.The techniques of pooling that employ the highest and mean values are denoted as "max" and "average" pooling, correspondingly.All activation functions utilised by the nodes in the convolutional layer are nonlinear in nature.Non-linear mapping is a powerful technique that enables the conversion of data that is intrinsically incomparable along a linear axis into data that can be more readily classified along a linear axis.
The output stage of the process involves the incorporation of one or more fully connected layers, which serve the purpose of classifying the input data.The flattened input is fed into the fully connected layer to enable its propagation to every neuron.The Softmax Classifier serves as the ultimate activation function in a neural network by allotting decimal probabilities to each class in a multiple-class problem.

Experimental Setup
The proposed CNN architecture comprises ten convolutional layers in two dimensions, six Max-pooling layers, three fully connected layers, and one flattening layer.The activation functions employed are ReLu and Sigmoid.Experiment-specific parameter values are listed in Table 1.

Experimental Setup
The experiments were conducted on a GPU NVIDIA-MX450, an i5-1135G7 processor, and Windows, and utilized Python libraries like Keras and TensorFlow for the pre-processing stage, Augmentation, and CNN.From the Kaggle dataset, lung nodule patches were extracted and split in the ratio of 67:33 for training and purposes.There were 4482 lung CT images in the training datasets, and 2209 CT images in the testing datasets.The present study examines the performance parameters, namely accuracy, precision, recall, and F1-score, of the proposed CNN architecture when applied to lung nodule detection from images.The study examined the impact of varying batch sizes, specifically 32, 64, 256, and 512, on the architecture of deep learning.
The findings indicate that there is a positive correlation between batch size and accuracy, with the highest accuracy observed at a batch size of 256.However, a decrease in performance has been observed for a batch size of 512.A 96% accuracy rate is an excellent result for the CNN model.Table 2 summarizes the various metrics, such as accuracy, recall, precision, and F1-score, that were investigated in this work to measure overall performance.Training and validation accuracy and loss curves are shown in Fig. 3 and Fig. 4 respectively.It follows that when the total number of epochs increases, the accuracy improves while the loss goes down.While Fig. 3 shows the training and validation accuracy curve for different batch sizes, Fig. 4 describes the accuracy and validation loss curve for batch sizes of 32, 64, 256, and 512.
Table 2 depicts the confusion matrix of the proposed CNN architecture obtained for the identification of lung cancer, with different batch sizes.In Table 2 the term batch size refers to the quantity of data samples that are processed in a single iteration during the training phase.True positive (TP) denotes the instances where a CNN successfully identifies lung cancer cases as positive, meaning the model correctly detects the malignancy in lung cancer.
The term true negative (TN) refers to the quantity of instances in which the CNN architecture accurately identified non-lung cancer cases as negative.These occurrences pertain to individuals who were accurately recognised as negative for lung carcinoma.The false positives (FP) metric denotes the count of instances where non-lung cancer cases were erroneously identified as positive.The instances mentioned above pertain to individuals who were erroneously diagnosed with lung cancer despite the absence of the disease.The term false negatives (FN) refers to instances where the CNN architecture misclassified lung cancer cases as negative.These occurrences pertain to individuals who were erroneously classified as negative for lung cancer despite the presence of the disease.Formulae for accuracy, precision, recall, F1-score are illustrated in Eqs. ( 1)-( 4).Table 3 shows the overall accuracy of CNN model obtained is 95% for batch size 64 and data type benign, suggesting that 95% of the occurrences (both benign and malignant) in this batch were properly identified.For non-threatening conditions, the accuracy is 95%.This means that 95% of the time, the cases were accurately labelled as benign.In circumstances where there is no harm done, 97% of patients are recalled.This means that 97% of truly benign situations were accurately identified by the model.For non-malignant conditions, the F1-score is 96%.This score incorporates both accuracy and reliability to provide a comprehensive evaluation of harmless-classification efficiency.For malignant data with batch size of 64 has an overall accuracy of 95%.Accuracy for cancer diagnoses is 95%.Malignant cases have a 91% recall rate and F1-score is 93%.

Ablation Study
Three experiments were conducted in the ablation study of a CNN model with 256 batch size by eliminating different Conv2D layers that contained different features as presented in Table 4.The findings revealed that eliminating the 512-feature, the Conv2D layer had little effect on accuracy as precision and recall remained high.The removal of the Conv2D layer with 256 features resulted in a moderate loss of accuracy but still ensured good precision and recall rates.Removing the Conv2D layer containing 128 features increased the accuracy by sacrificing a little bit of precision.These results demonstrate the relative stability of the model to removal of some features, providing information about feature importance for accuracy, precision, and recall.
The proposed CNN model demonstrates the superiority over the existing state-of-the-art architectures in the lung cancer classification task, providing an Accuracy of 96%, which is the highest among the compared methods is shown in Table 5.It shows a balanced performance considering precision and recall rates of 95.5% and 95% respectively.
The results from Shafi et al. [30], combined CNN and Support Vector Machine (SVM), with a comparable balance across metrics, reaching 94% accuracy.The traditional architectures such as DenseNet121 [28] and basic CNNs used by Zhang et al. [28] and Karthika et al. [29] proved to be less effective in this case.The comparison emphasizes the potential of the proposed CNN approach in enhancing diagnostic accuracy for lung cancer.

Conclusion
This paper presented a deep learning-based approach to pulmonary nodule detection using CNNs for different batch sizes.The research focusing on the classification of benign and malignant nodules from CT scan images.The proposed system consists of two main components namely, the extraction of relevant patches from CT images and the subsequent application of a CNN to classify these patches, aiming to assist in the diagnosis of pulmonary nodules.Utilizing CT images for lung carcinoma detection, the proposed approach demonstrated promising results, achieving an overall accuracy of 96% with a batch size of 256.However, it is important to acknowledge that the performance of the model, particularly in the identification of malignant nodules, is constrained by the limited size of the available training dataset.This limitation underscores the need for access to larger and more diverse datasets to enhance the model's diagnostic capabilities.
The adaptability of the deep learning architectures used in this study suggests the possibility of extending this approach to the detection and diagnosis of other lung diseases, provided that sufficient training data is J of Biomedical Photonics & Eng 10(1) 2024 4 Mar 2024 © J-BPE 010305-8 available.By expanding the scope and scale of the training datasets, future work can explore the full potential of deep learning techniques in improving diagnostic processes for a wider range of pulmonary conditions.Another promising avenue is the exploration of more advanced deep learning architectures and techniques, such as Generative Adversarial Networks (GANs) for data augmentation, or few-shot learning approaches, which could offer new ways to overcome the challenges of limited training data.

Fig. 1
Fig. 1 Samples of patch-based lung nodules used in the proposed CNN architecture (Here X and Y axes represent image size in pixels).

Fig. 2
Fig. 2 Architecture of the proposed CNN model for the classification of patch based lung nodules.
Given a batch size of 32, the proposed CNN accurately detected 760 instances of true positive cases.The dataset comprised 1295 instances of true negative cases.The study identified a total of 63 instances of false positive cases, indicating that a few patients who did not have lung cancer were erroneously categorized as positive.Finally, the study identified 91 instances of false negatives.The area under the curve (AUC) is used to evaluate the efficacy of a binary classification model.A higher AUC value suggests superior discrimination and overall model performance.When it comes to differentiating between positive and negative instances in lung nodule detection, the CNN model demonstrates strong AUC values across all batch sizes.An AUC of 99 is reached with a batch size of 256, demonstrating excellent discrimination by the model at that point in time.The AUC values for the receiver operating characteristic (ROC) curves of the CNN model for different batch sizes are shown in Fig. 5.

Table 1
Proposed CNN parameters for the classification of patch-based lung nodules.

Table 2
Confusion matrix of CNN architecture with different batch sizes for the classification of patch based lung nodules.

Table 4
An Ablation study of different convolutional features of proposed CNN model with a batch size of 256.

Table 5
Performance comparison of proposed method with state-of-the-art architecture for the classification of patch based lung nodules.