Using Machine Learning Algorithms to Predict High-Risk Factors for Postoperative Delirium in Hospitalized Patients under Anesthesia
Abstract
Background: General anesthesia can lead to both early and late complications. Delirium is a recognized complication of anesthesia. This study was conducted to identify the factors contributing to the onset of delirium in patients undergoing anesthesia.
Methods: This three-year longitudinal study investigated the incidence and clinical determinants of delirium in a cohort of 600 patients admitted to the intensive care unit (ICU) following general anesthesia. Patient data were retrospectively extracted from medical records, encompassing demographic variables (age and gender) alongside other clinical covariates. Delirium was screened using the Confusion Assessment Method for the ICU (CAM-ICU-7), a validated tool for identifying and quantifying the severity of delirium. Data collection and preliminary statistical analyses were performed using SPSS software. Subsequently, to enhance predictive accuracy, we implemented and compared four machine learning algorithms—Random Forest (RF), eXtreme Gradient Boosting (XGBoost), Deep Neural Network (DNN), and Logistic Regression (LR)—to evaluate their performance in forecasting postoperative delirium.
Results: In this study of 600 ICU patients, the prevalence of delirium was 38%. Multivariable logistic regression identified GCS score, ocular trauma, and renal disease as the strongest independent predictors of delirium. Among the machine learning models, XGBoost demonstrated superior performance with an AUC-ROC of 0.88 and 86% accuracy. Feature importance analysis revealed that GCS and mechanical ventilation duration were the primary determinants of delirium risk. These findings highlight the clinical utility of baseline neurological and comorbidity assessment for the early identification and effective management of delirium in critically ill patients.
Conclusion: This study confirms the superior effectiveness of the XGBoost machine learning model in accurately predicting delirium in ICU patients. The early identification of key risk factors, such as GCS score, renal disease, and specific trauma types, offers a significant opportunity to enhance preventive strategies and improve clinical outcomes in intensive care settings.
[2] Ashrafi N, Fattahi V. Determination of risk factors of delirium after major orthopedic emergency surgeries. Med Psychol Health Res J. 2025; 1:12-20.
[3] Ghaffari YD, Ghorbanian N. The effects of blood sugar, electrolytes, and blood pressure on postoperative cognitive dysfunction in patients candidates for general surgery under general anesthesia: a non-systematic review. Eurasian J Sci Technol. 2023; 3(3):125-32.
[4] Safavi SM, Honarmand A, Samadi MN. A comparative study of the preoperative use of lidocaine gargle versus rosemary gargle effects on sore throat and hoarseness after endotracheal intubation under general anesthesia in patients who are candidates for surgeries. J Isfahan Med Sch. 2025; 42(795):1093-103.
[5] Komlakh K, Keipourfard A, Hosseini SM. Evaluating the effectiveness of ERAS protocols and opioid-free anesthesia in spine surgery recovery: a systematic review. J Med Chem Sci. 2026; 9(4):308-20.
[6] Motahari ASJ. Pulmonary embolism in children: clinical challenges and operating room preparedness. SPC J Med Healthc. 2025; 1(2):113-20.
[7] Iddrisu M, Khan ZH. Anesthesia for cesarean delivery: general or regional anesthesia—a systematic review. Ain-Shams J Anesthesiol. 2021; 13(1):1.
[8] El-Radaideh K, Alhowary AA, Alsawalmeh M, Abokmael A, Odat H, Sindiani A. Effect of spinal anesthesia versus general anesthesia on blood glucose concentration in patients undergoing elective cesarean section surgery: a prospective comparative study. Anesthesiol Res Pract. 2019; 2019:7585043.
[9] Tesfaye Mekonin G, Kelbesa Olika M, Birhanu Wedajo M, Tolasa Badada A, et al. Prevalence of emergence delirium and associated factors among older patients who underwent elective surgery: a multicenter observational study. Anesthesiol Res Pract. 2022; 2022:2711310.
[10] Parslow RM, Gibbison B, Pufulete M, Rowan KM, et al. Barriers and facilitators to the delivery of delirium care in intensive care units: an analysis informed by the Theoretical Domains Framework. Anaesthesia. 2026; 81(2):213-21.
[11] Liang S, Wang X, Su JJ, Wong EML, et al. Effectiveness of virtual reality interventions for delirium prevention in intensive care units: a systematic review and meta-analysis. Intensive Crit Care Nurs. 2026; 93:104318.
[12] Darabi B, Alemzadeh M, Karbasfrushan A, Borji M. Assessment of the delirium prevalence among pediatric patients admitted to the pediatric intensive care unit in west of Iran. Arch Neurosci. 2023; 10(1):e133029.
[13] Aitkenhead AR. Injuries associated with anaesthesia. A global perspective. Br J Anaesth. 2005; 95(1):95-109.
[14] Dąbrowska A, Brykczyńska IJ, Lange S, Szczupak M, et al. The influence of pharmacological agents used during general anesthesia on the intensity of postoperative pain and the occurrence of post-anesthetic delirium-a scoping review. J Clin Med. 2026; 15(5):1867.
[15] Deiner S, Silverstein JH. Postoperative delirium and cognitive dysfunction. Br J Anaesth. 2009; 103 Suppl 1:i41-6.
[16] Chen Y, Li Q, Pan S, Yan F, et al. Impact of laryngeal mask airway versus endotracheal intubation on emergence delirium in children undergoing same-day endoscopic-assisted coblation adenoidectomy: a randomized, single-center clinical trial. Minerva Anestesiol. 2025; 91(12):1154-62.
[17] Keles S, Kocaturk O. Postoperative discomfort and emergence delirium in children undergoing dental rehabilitation under general anesthesia: comparison of nasal tracheal intubation and laryngeal mask airway. J Pain Res. 2018; 11:103-10.
[18] Sretavan A, Buren M, Tahir P, Leung JM. A systematic review and meta-analysis on ketamine use and postoperative delirium in older patients undergoing spine or orthopedic surgery. Anesthesiol Perioper Sci. 2026; 4(1):2.
[19] Soler-Sanchis A, Martínez-Arnau FM, Pérez-Ros P. Pharmacological management of delirium in older adults in the emergency department: clinical outcomes. Diseases. 2026; 14(2):68.
[20] Vasigh A, Tarjoman A, Borji M. Relationship between spiritual health and pain self-efficacy in patients with chronic pain: a cross-sectional study in West of Iran. J Relig Health. 2020; 59(2):1115-25.
[21] Hatefi M, Tarjoman A, Borji M. Do religious coping and attachment to God affect perceived pain? study of the elderly with chronic back pain in Iran. J Relig Health. 2019; 58(2):465-75.
[22] Ukwubile CA, Mathias SN, Pisagih PS. Acute and subchronic toxicity evaluation and GC-MS profiling of ajumbaise: a traditional Nigerian polyherbal formulation for labor enhancement and pain relief. J Pharm Sci Comput Chem. 2025; 1(2):154-73.
[23] Seyed Hosseini SV. Pain management strategies and general condition of patients after intestinal cancer surgeries. Eurasian J Sci Technol. 2025; 5(1):1-16.
[24] Ding XY, Zhang MH, Liu J, Wu D. Recent advances in postoperative delirium in elderly patients: pathophysiological mechanisms, risk prediction, and therapeutic strategies. Front Neurosci. 2026; 20:1759910.
[25] Barreto Chang OL, Pawar N, Brown RT, Theologis AA, et al. Costs associated with delirium among older patients undergoing complex spine surgeries. J Neurosurg Spine. 2026; 1-8.
[26] Khalighi E, Tarjoman A, Abdi A, Borji M. The prevalence of delirium in patients in Iran: a systematic review and meta-analysis. Future Neurol. 2019; 14(4):FNL34.
[27] Erfani A, Shabeeb HH, Jamshidi YA, Amin NG, et al. Updated systematic review and meta-analysis delirium prevalence in Iranian hospitals’ patients. Arch Anesth Crit Care. 2024; 11(3):393-401.
[28] Shokri S, Nanab E, Esmailie S, Jahed Y, et al. The relationship between patient delirium and anxiety in family caregivers of patients admitted to the intensive care unit. Q J Health Psychol. 2025; 14(53):7-18.
[29] Hu X, Luo J, Liang H, Yue J, et al. Interpretable machine learning model to predict the acute occurrence of delirium in elderly patients in the intensive care units: a retrospective cohort study. J Big Data. 2025; 12(1):47.
[30] Ma R, Zhao J, Wen Z, Qin Y, et al. Machine learning for the prediction of delirium in elderly intensive care unit patients. Eur Geriatr Med. 2024; 15(5):1393-403.
| Files | ||
| Issue | Article in Press |
|
| Section | Research Article(s) | |
| Keywords | ||
| Anesthesia Intensive Care Delirium Machine Learning | ||
| Rights and permissions | |
|
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. |


