# A Novel Convolutional Neural Network Algorithm for Histopathological Lung Cancer Detection
## 4 Conclusions and Future Work  
The development of systems for optimizing lung cancer diagnosis is a burgeoning field, with several research approaches emerging to enhance the present procedures. Following this idea, the study presented in this paper demonstrates the development of a newly created learning algorithm (CancerDetecNN) that has as its main focus the evaluation of the presence or absence of tumor tissue in lung WSIs while reducing the computational cost required to train the neural networks. This allows for improved lung cancer diagnosis accuracy and decreases the time spent by the pathologist on this diagnosis. Along with the CancerDetecNN versions, scientifically accepted NNs (AlexNet, GoogleLeNet, and ResNet-50) were trained and tested on datasets made up of tumor and non-tumor tiles extracted from lung WSIs. When evaluating the performance of the CancerDetecNN versions and comparing them to existing CNN models, it was found that Version 5 outperformed all existing CNNs in the provided dataset, achieving higher precision (0.972), AUC (0.923), and F1-score (0.897) values. The only metric where CancerDetecNN Version 5 did not perform better than the existing models was recall (0.833), but the difference was only 0.026. The ResNet-50 model achieved the best result for recall, but it took significantly longer to train, resulting in 1 h and 51 min more computational cost than CancerDetecNN Version 5 required. The fundamental limitation of this study is the relatively small number of annotated WSIs present in the dataset. The lack of annotated datasets of adequate size for this task is a common issue in medical imaging, and it may have impacted the performance of the CNNs, making them fail to capture the variability and complexity present in real-world scenarios. Furthermore, the limited diversity of samples in the dataset may also limit the generalizability of the developed model. Different patient cohorts, imaging acquisition techniques, and datasets can affect the performance of the developed models. Figure 6: Examples of heatmaps generated for tumoral (**a**) and non-tumoral (**b**) WSIs. When presented with a tumor region, a color gradient is displayed from lighter to darker to give a more intuitive perspective of the tumor location. Otherwise, when there is no tumor area, the heatmap is not applied, showing only the lung tissue. Future research and development of CancerDetecNN could involve expanding the dataset to include more diverse samples to test the model's generalizability. This will be a permanent learning algorithm. Additionally, investigating the use of ensemble models, as some authors have already started exploring, could enhance the model's performance. In addition to that, further phases of this project include the application of the best model in a medical system for the analysis of lung WSIs and testing neural networks in the area of image segmentation, such as Mask R-CNN. Moreover, the potential of fractal geometry in the development of CNNs capable of capturing complex patterns in lung cancer WSIs will be explored, thus improving performance [37]. Overall, the creation of a specific model for lung cancer detection leveraged domain-specific knowledge and optimized the model architecture, allowing for greater accuracy and specificity, which leads to better outcomes in lung cancer diagnosis. Conceptualization, N.F. ; data curation, N.F. and S.C.; formal analysis, N.F. ; funding acquisition, V.C. ; investigation, N.F. ; methodology, N.F. ; project administration, V.C. ; resources, N.F., S.C. and V.C. ; software, N.F. ; supervision, S.C. and V.C. ; validation, N.F. and S.C.; visualization, S.C. and V.C. ; writing--original draft, N.F. ; writing--review and editing, N.F., S.C. and V.C. All authors have read and agreed to the published version of the manuscript. This research was funded by FCT/MCTES grant number UIDB/05549/2020. Not applicable. **Data Availability Statement:** Publicly available datasets were analyzed in this study.