# A Novel Convolutional Neural Network Algorithm for Histopathological Lung Cancer Detection
## 2 Materials and Methods
### Training
#### 2.3.1 Neural Networks  
Based on the popular CNN architectures and the reviewed studies, three algorithms to be tested with the prepared dataset were selected: AlexNext, GoogLeNet, and ResNet-50. Furthermore, the authors designed and developed 13 additional architectures called CancerDetecNN versions. These architectures were created from scratch with the objective of improving the accuracy of lung cancer detection while also reducing computational costs. These novel architectures were designed to have fewer layers and parameters than the popular CNN models previously tested while maintaining high performance on the dataset. **AlexNet**  
Built by [PERSON] and his team, AlexNet was presented in 2012 during the ImageNet Large Scale Visual Recognition Challenge (ILSVRC). AlexNet's architecture consists of eight layers, of which five are convolutional layers and the other three are fully connected layers. The input image has a dimension of 224 \(\times\) 224 \(\times\) 3 pixels, and the output of the last layer is fed to a 1000-way softmax, which produces a distribution over the 1000 class labels. When participating in the competition, AlexNet achieved the best results, setting the percentage of test images for which the correct label was not in the top 5 predicted labels to 15.3% (top-5 error rate) [32]. **GoogLeNet**  
In 2014, [PERSON] and his team presented GoogLeNet, which consists of 22 layers (27 layers if counting pooling), of which 9 are inception modules. These modules are made up of an average pool layer, a convolution layer, two fully connected layers, and a linear layer with a softmax activation function. The inception modules perform a classification based on the inputs and add the calculated loss to the network's total loss. GoogLeNet was used in both challenges of the ILSVRC in 2014 (detection and classification). The best model was achieved in the seventh version, with 144 crops and a top-5 error rate of 6.67% [33]. **ResNet**  
One year later, in 2015, he and his team introduced ResNet with the concept of shortcut connection, which involves skipping one or more layers with the aim of performing identity mapping. The original ResNet had 34 layers, but it was later conducted experiments with 50, 101, and 152 layers. In contrast to VGG networks, ResNet's majority of layers have 3 \(\times\) 3 pixels filters, with batch normalization used after each convolution and before activation. If a convolution layer has a stride of 2, it is downsampled. The shortcut connections were inserted when the input and output had the same dimensions. ResNet achieved the best result in the classification challenge, with a top-5 error rate of 3.57% for the test dataset [34]. Transfer learning, a technique where pre-trained weights on a large dataset are used to improve performance on a smaller and related dataset, was also considered for the ResNet since it showed the best top-5 error rate among the three CNNs selected [35]. Even  
Figure 5: Training workflow. Having the dataset prepared (**a**), the neural networks are trained using a 10-fold cross-validation technique (**b**). Subsequently, the performance of the models is evaluated on a separate test dataset (**c**). though the dataset of ImageNet is not comparable to the one used in this study, it can provide a useful starting point for training the model. Therefore, training using weights from pre-training in the ImageNet dataset will be performed in addition to the training from scratch. **CancerDetecNN**  
The authors developed CancerDetecNN in 13 different versions with incremental changes to the architecture in each version:  
* **Version 0:** Composed of 3 layers, the model has the input dimensions set as 512 \(\times\) 512 \(\times\) 3 pixels. It starts with a convolution layer with a 3 \(\times\) 3 pixels kernel size, 32 filters, 2 \(\times\) 2 pixels strides, and the activation function is the rectified linear unit (ReLU).