Original Article

Optimization of Neural Networks for the Diagnosis and Prediction of Lung Cancer Stages

Abstract

Purpose: This study aims to optimize neural networks for diagnosing and predicting lung cancer stages, leveraging advanced recurrent neural network architectures such as Gated Recurrent Units (GRU) and Long Short-Term Memory (LSTM) networks.

Materials and Methods: The research utilizes a comprehensive dataset of clinical data and high-resolution imaging to develop novel Deep Neural Networks (DNNs). These networks are optimized using sophisticated algorithms like Stochastic Gradient Descent with Momentum (SGDM) and Adaptive Moment Estimation (Adam). Transfer Learning (TL) techniques and big data analytics are integrated to enhance model precision and reliability. Additionally, early stopping is employed to prevent overfitting, k-fold cross-validation (k=5) is used to ensure robust model evaluation, and L2 regularization is applied to improve generalization by penalizing large weights.

Results: The optimized GRU and LSTM networks demonstrate superior performance in detecting lung cancer stages, significantly improving diagnostic accuracy and prognostic predictions. The models effectively handle long-term dependencies and mitigate the vanishing gradient problem, common in simple RNNs. Using k-fold cross-validation (k=5), the optimized GRU network with SGDM achieved the following metrics in Fold 3: Test Loss of 0.0531, Test Accuracy of 0.97, Sensitivity (Recall) of 0.97, Precision of 0.98, and an F1 Score of 0.975.

Conclusion: The study's findings underscore the potential of integrating advanced neural network models into clinical practice, revolutionizing AI-driven medical diagnostics and elevating the standard of patient care.

1- Abhishek Padhi, Ashwini Agarwal, Shailendra K Saxena, and CDS Katoch, "Transforming clinical virology with AI, machine learning and deep learning: a comprehensive review and outlook." VirusDisease, Vol. 34 (No. 3), pp. 345–55, (2023).
2- Nishant Upadhyay and Anamika Gulati, "Applications of Artificial Intelligence and Machine Learning for Diagnosis, Prediction, and Smart Health Care." in Artificial Intelligence and Machine Learning in Healthcare: Springer, (2023), pp. 79–94.
3- Dhir Gala, Haditya Behl, Mili Shah, and Amgad N Makaryus, "The role of artificial intelligence in improving patient outcomes and future of healthcare delivery in cardiology: a narrative review of the literature." in Healthcare, (2024), Vol. 12 (No. 4): MDPI, p. 481.
4- Balázs Acs, Mattias Rantalainen, and Johan Hartman, "Artificial intelligence as the next step towards precision pathology." Journal of internal medicine, Vol. 288 (No. 1), pp. 62–81, (2020).
5- Mohammed Kanan et al., "AI-Driven Models for Diagnosing and Predicting Outcomes in Lung Cancer: A Systematic Review and Meta-Analysis." Cancers, Vol. 16 (No. 3), p. 674, (2024).
6- Amanda Leiter, Rajwanth R Veluswamy, and Juan P Wisnivesky, "The global burden of lung cancer: current status and future trends." Nature reviews Clinical oncology, Vol. 20 (No. 9), pp. 624–39, (2023).
7- Saife N Lone et al., "Liquid biopsy: a step closer to transform diagnosis, prognosis and future of cancer treatments." Molecular cancer, Vol. 21 (No. 1), p. 79, (2022).
8- Robert Dziedzic, Tomasz Marjański, and Witold Rzyman, "A narrative review of invasive diagnostics and treatment of early lung cancer." Translational Lung Cancer Research, Vol. 10 (No. 2), p. 1110, (2021).
9- Yongzhong Li, Donglai Chen, Xuejie Wu, Wentao Yang, and Yongbing Chen, "A narrative review of artificial intelligence-assisted histopathologic diagnosis and decision-making for non-small cell lung cancer: achievements and limitations." Journal of Thoracic Disease, Vol. 13 (No. 12), p. 7006, (2021).
10- Daniel Di Capua, Dara Bracken-Clarke, Karine Ronan, Anne-Marie Baird, and Stephen Finn, "The liquid biopsy for lung cancer: state of the art, limitations and future developments." Cancers, Vol. 13 (No. 16), p. 3923, (2021).
11- Aristidis G Vrahatis, Konstantina Skolariki, Marios G Krokidis, Konstantinos Lazaros, Themis P Exarchos, and Panagiotis Vlamos, "Revolutionizing the early detection of Alzheimer’s disease through non-invasive biomarkers: the role of artificial intelligence and deep learning." Sensors, Vol. 23 (No. 9), p. 4184, (2023).
12- Damien Gruson, Sergio Bernardini, Pradeep Kumar Dabla, Bernard Gouget, and Sanja Stankovic, "Collaborative AI and laboratory medicine integration in precision cardiovascular medicine." Clinica Chimica Acta, Vol. 509pp. 67–71, (2020).
13- SKB Sangeetha et al., "An enhanced multimodal fusion deep learning neural network for lung cancer classification." Systems and Soft Computing, Vol. 6p. 200068, (2024).
14- Shane Dawson, "The concept of personalized and adaptive learning has long been touted but seldom enacted in education at scale. Data Analytics and Adaptive Learning brings together a compelling set of experts that provide novel and research-informed insights into contemporary education spaces."
15- Anirudh Atmakuru et al., "Deep learning in radiology for lung cancer diagnostics: A systematic review of classification, segmentation, and predictive modeling techniques." Expert Systems with Applications, p. 124665, (2024).
16- Shriniket Dixit, Anant Kumar, and Kathiravan Srinivasan, "A current review of machine learning and deep learning models in oral cancer diagnosis: Recent technologies, open challenges, and future research directions." Diagnostics, Vol. 13 (No. 7), p. 1353, (2023).
17- Federico Landi, Lorenzo Baraldi, Marcella Cornia, and Rita Cucchiara, "Working memory connections for LSTM." Neural Networks, Vol. 144pp. 334–41, (2021).
18- Benjamin Lindemann, Benjamin Maschler, Nada Sahlab, and Michael Weyrich, "A survey on anomaly detection for technical systems using LSTM networks." Computers in Industry, Vol. 131p. 103498, (2021).
19- Rusul L Abduljabbar, Hussein Dia, and Pei-Wei Tsai, "Unidirectional and bidirectional LSTM models for short‐term traffic prediction." Journal of Advanced Transportation, Vol. 2021 (No. 1), p. 5589075, (2021).
20- Shalini Wankhade and S Vigneshwari, "A novel hybrid deep learning method for early detection of lung cancer using neural networks." Healthcare Analytics, Vol. 3p. 100195, (2023).
21- Rijwan Khan, Indrajeet Kumar, and Pushkar Praveen, Applications of Parallel Data Processing for Biomedical Imaging. IGI Global, (2024).
22- Apeksha Shewalkar, Deepika Nyavanandi, and Simone A Ludwig, "Performance evaluation of deep neural networks applied to speech recognition: RNN, LSTM and GRU." Journal of Artificial Intelligence and Soft Computing Research, Vol. 9 (No. 4), pp. 235–45, (2019).
23- Thanh Bui-Tien, Thanh Nguyen-Chi, Thang Le-Xuan, and Hoa Tran-Ngoc, "Enhancing bridge damage assessment: Adaptive cell and deep learning approaches in time-series analysis." Construction and Building Materials, Vol. 439p. 137240, (2024).
24- Hossein Shahinzadeh, Arezou Mahmoudi, Amirhosein Asilian, Hamidreza Sadrarhami, Mohammadreza Hemmati, and Yaghoub Saberi, "Deep Learning: A Overview of Theory and Architectures." in 2024 20th CSI International Symposium on Artificial Intelligence and Signal Processing (AISP), (2024): IEEE, pp. 1–11.
25- Sixian Chan, Menghui Zhang, Yu-Yi Zhi, Saeid Razmjooy, Ahmed M El-Sherbeeny, and Lingzhi Lin, "Improved anterior cruciate ligament tear diagnosis using gated recurrent unit networks and Hybrid Tasmanian Devil Optimization." Biomedical Signal Processing and Control, Vol. 95p. 106309, (2024).
26- TL Spandana, D Tejomai, D Malleswara Rao, A Vijaya Shyam, and B Sushanth, "Tumor Identification and Classification of MRI Brain Images Using Deep Learning Optimizers (Adam vs Sgdm)." in 2024 IEEE Wireless Antenna and Microwave Symposium (WAMS), (2024): IEEE, pp. 1–5.
27- Yakub Kayode Saheed, Adekunle Isaac Omole, and Musa Odunayo Sabit, "GA-mADAM-IIoT: A new lightweight threats detection in the industrial IoT via genetic algorithm with attention mechanism and LSTM on multivariate time series sensor data." Sensors International, Vol. 6p. 100297, (2025).
28- Mahmoud Y Shams, Zahraa Tarek, and Ahmed M Elshewey, "A novel RFE-GRU model for diabetes classification using PIMA Indian dataset." Scientific Reports, Vol. 15 (No. 1), p. 982, (2025).
29- Harun Özbay, İlyas Özer, Adem Dalcali, Onursal Çetin, and Feyzullah Temurtaş, "Sensorless Position Estimation in Electromagnetic Launchers Using Recurrent Neural Networks with Repeated k-Fold Cross-Validation." Arabian Journal for Science and Engineering, pp. 1–19, (2025).
30- Tang Shi and Kazuya Shide, "A comparative analysis of LSTM, GRU, and Transformer models for construction cost prediction with multidimensional feature integration." Journal of Asian Architecture and Building Engineering, pp. 1–16, (2025).
31- Bara Masalmeh, Rashmi Prasad, Vaibhav Nougain, and Aleksandra Lekić, "Neural Networks in RSCAD: Enhancing MMC-based HVDC Simulation with Advanced Machine Learning." IEEE Transactions on Industry Applications, (2025).
32- Abdullah Kaviani Rad, Mohammad Javad Nematollahi, Abbas Pak, and Mohammadreza Mahmoudi, "Predictive modeling of air quality in the Tehran megacity via deep learning techniques." Scientific Reports, Vol. 15 (No. 1), p. 1367, (2025).
33- Diyin Zhu, Yihang Wei, Jiali Cai, Jingwen Wang, and Zhongshan Chen, "A security data detection and management method in digital library network based on deep learning." Frontiers in Physics, Vol. 12p. 1492114, (2025).
34- Minsi Wang, Li Song, Xiaokang Yang, and Chuanfei Luo, "A parallel-fusion RNN-LSTM architecture for image caption generation." in 2016 IEEE international conference on image processing (ICIP), (2016): IEEE, pp. 4448–52.
35- Meng Jiao, Dongqing Wang, and Jianlong Qiu, "A GRU-RNN based momentum optimized algorithm for SOC estimation." Journal of Power Sources, Vol. 459p. 228051, (2020).
36- Rohaifa Khaldi, Abdellatif El Afia, Raddouane Chiheb, and Siham Tabik, "What is the best RNN-cell structure to forecast each time series behavior?" Expert Systems with Applications, Vol. 215p. 119140, (2023).
37- Ruan Luzia, Lihki Rubio, and Carlos E Velasquez, "Sensitivity analysis for forecasting Brazilian electricity demand using artificial neural networks and hybrid models based on Autoregressive Integrated Moving Average." Energy, Vol. 274p. 127365, (2023).
38- Shagun Sharma and Kalpna Guleria, "A deep learning based model for the detection of pneumonia from chest X-ray images using VGG-16 and neural networks." Procedia Computer Science, Vol. 218pp. 357–66, (2023).
39- Mohd Sakib, Suhel Mustajab, and Mahfooz Alam, "Ensemble deep learning techniques for time series analysis: a comprehensive review, applications, open issues, challenges, and future directions." Cluster Computing, Vol. 28 (No. 1), pp. 1–44, (2025).
40- Zhi-Qiang Dai, Jie Li, Yang-Jie Cao, and Yong-Xiang Zhang, "SALSTM: segmented self-attention long short-term memory for long-term forecasting." The Journal of Supercomputing, Vol. 81 (No. 1), p. 115, (2025).
41- Sai Babu Veesam et al., "Design of an integrated model with temporal graph attention and transformer-augmented RNNs for enhanced anomaly detection." Scientific Reports, Vol. 15 (No. 1), p. 2692, (2025).
42- Shamsul Haq and Prabal Verma, "Edge-Cloud-Assisted Multivariate Time Series Data-Based VAR and Sequential Encoder–Decoder Framework for Multi-Disease Prediction." Arabian Journal for Science and Engineering, pp. 1–21, (2025).
Files
IssueVol 13 No 3 (2026) QRcode
SectionOriginal Article(s)
DOI https://doi.org/10.18502/fbt.v13i3.22749
Keywords
Deep Learning Lung Cancer Diagnosis Long Short-Term Memory Gated Recurrent Unit Optimization Prediction

Rights and permissions
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
How to Cite
1.
Tayebi J, Rezaie M. Optimization of Neural Networks for the Diagnosis and Prediction of Lung Cancer Stages. Frontiers Biomed Technol. 2026;13(3):765-777.