Development of a machine learning-based prediction model for hypothyroidism-associated delirium in elderly hypothyroid patients in the intensive care unit Authors: Binbin Guan, Lijing Lin, Zhou Chen, Li Ma, Libin Liu Published: 2026 ABSTRACT BackgroundPatients with hypothyroidism admitted to the intensive care unit (ICU) frequently develop hypothyroidism-associated delirium (HAD), a condition strongly linked to adverse prognostic outcomes. The primary objective of this study was to develop a machine learning (ML) -based predictive model for the early identification of HAD. Materials and methodsPatient data were retrieved from two non-overlapping datasets: Medical Information Mart for Intensive Care IV (MIMIC-IV) database and MIMIC-III database. Specifically, data from MIMIC-IV were split into a training set and an internal validation set, whereas MIMIC-III data served as an external validation set. Least Absolute Shrinkage and Selection Operator (LASSO) regression was utilized for feature variable selection, and predictive models were constructed using nine approaches. Model performance was assessed across discrimination, calibration, and clinical utility. SHAP (SHapley Additive exPlanations) was employed to visualize model characteristics and individual case predictions.ResultsA model with 13 variables was built. Among all constructed models, the Gradient Boosting Machine (GBM) model demonstrated the optimal performance and was therefore selected as the final model (internal validation area under the receiver operating characteristic curve (AUROC)=0.806; external validation AUROC=0.788). Notably, the GBM model outperformed other approaches in HAD prediction. Key predictors included Glasgow Coma Scale (GCS), Sequential Organ Failure Assessment (SOFA), Sedatives, ICU Length of Stay (ICU_Day), Peripheral Oxygen Saturation SPO2, Calcium, Red Cell Distribution Width (RDW), and Mean Arterial Pressure(MAP). A user-friendly interface was developed for clinical use.ConclusionsThe establishment of this predictive model enables earlier HAD identification compared with traditional delirium assessment methods, and it is particularly applicable to patients for whom conventional delirium evaluation is challenging.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12877-026-07787-y. Introduction Delirium represents a prevalent and devastating neurocognitive complication in intensive care unit (ICU) patients, with reported incidences ranging from 16% to 89% depending on patient populations and assessment methods [1, 2]. Beyond its acute clinical burden, delirium is independently associated with prolonged ICU stay, increased mortality, and long-term cognitive impairment, imposing substantial healthcare costs and social burdens [3]. Among ICU patients with comorbidities, those with hypothyroidism face a uniquely elevated risk of developing hypothyroidism-associated delirium (HAD)—a distinct subtype linked to metabolic dysregulation and impaired neural function [4]. Hypothyroidism itself poses diagnostic challenges in critical care settings due to nonspecific clinical manifestations, and its concurrence with delirium further complicates management and worsens prognostic outcomes. Given the reversibility of many delirium-related harms with timely intervention, early identification of HAD in high-risk hypothyroid ICU patients has emerged as a critical unmet clinical need. Notably, delirium in critically ill ICU patients differs substantially from that in general ward patients in terms of both risk profiles and assessment approaches. Unlike general ward patients, whose delirium risk is primarily driven by chronic comorbidities, critically ill ICU patients are exposed to distinct multifactorial risks unique to the ICU setting. These include severe physiological stress, acute organ dysfunction, prolonged immobilization, invasive procedures, and exposure to sedative medications. Traditional delirium assessment tools, such as the Confusion Assessment Method for ICU (CAM-ICU) and Intensive Care Delirium Screening Checklist (ICDSC), are widely recommended in clinical practice [5, 6]. These tools depend on patient responsiveness and verbal communication, rendering them unsuitable for sedated critically ill patients or those with severe neurological impairment, which are commonly encountered in hypothyroid ICU cohorts [7]. Moreover, retrospective studies have documented suboptimal screening rates (e.g., up to 40.6% of ICU patients not screened with CAM-ICU), leading to underdiagnosis of delirium and missed intervention opportunities [8]. While Machine learning (ML) serves as a powerful tool in critical care, offering unique advantages to address the specific research and clinical challenges inherent to the ICU setting. ML algorithms excel at integrating high-dimensional, multi-modal clinical data, including vital signs, laboratory results, and medication records. They also capture complex nonlinear relationships, which are particularly valuable given the heterogeneity of ICU patient populations. Despite ML’s utility in delirium prediction [9], existing ML-based models have critical gaps: most lack external validation (only 15.4% of reported models), suffer from poor interpretability, and are not tailored to disease-specific subtypes like HAD [10]. Few studies have developed and validated ML models specifically for HAD prediction, resulting in a lack of well-validated, targeted tools for clinicians managing this high-risk cohort. The aim of this study is to develop and validate a robust ML-based predictive model for early HAD identification in hypothyroid ICU patients. Our ultimate objective is to equip clinicians with a tool for rapid and comprehensive identification of high-risk patients, facilitating the early implementation of preventive interventions and thereby reducing the incidence and mortality of HAD. Method Study design and data source The present study was carried out as a retrospective cohort investigation, with clinical data retrieved from two databases: The Medical Information Mart for Intensive Care IV (MIMIC-IV, Version 3.1) contains comprehensive hospitalization data of 364,627 patients admitted to the ICU at Beth Israel Deaconess Medical Center in the United States between 2012 and 2022 [9]. We also performed external validation using a subset of the MIMIC-III database (Version 1.4) [10], which included 26,836 admissions for 23,692 patients between 2001 and 2008. While both the MIMIC-III and MIMIC-IV datasets were derived from the same U.S. academic medical center, they covered entirely distinct time periods, which inherently ensured no patient overlap between the two cohorts. Both databases provide comprehensive inpatient data for individual patients, including length of stay, laboratory test results, medication administration records, and vital signs. To safeguard patient privacy, all personal identifiers were de-identified, and random codes were employed in place of original patient identifiers. Consequently, this study did not require informed patient consent or ethical review board approval. One of the researchers (Guan) has completed the training program offered by the collaborating institution (Certificate No. 68050013) and holds the qualification to access and extract data from these databases. Study population Older patients with hypothyroidism aged ≥ 65 years were identified from the MIMIC-III and MIMIC-IV databases using the International Classification of Diseases, 9th and 10th Revisions (ICD-9 and ICD-10) codes. For MIMIC-IV: ICD-10 codes: E02, E03, E032, E033, E038, E039, E20, E200, E201, E208, E890;ICD-9 codes: 243, 2440, 2441, 2442, 2443, 2448. For MIMIC-III : ICD-9 codes: 243, 2440, 2441, 2442, 2443, 2448, 2449. The presence of delirium was evaluated utilizing the CAM-ICU score, which comprises four key criteria: (1) acute onset of mental status alterations or a fluctuating clinical course; (2) inattention; (3) disorganized thinking; and (4) altered level of consciousness. A patient is diagnosed with delirium (i.e., CAM-ICU positive) when they present with Criteria 1 and 2, in combination with either Criterion 3 or 4 [11]. Patients were excluded if they met any of the following conditions: (1) a diagnosis of schizophrenia or dementia; (2) no CAM-ICU score being applied during their care; (3) an ICU stay duration of less than 12 h; (4) presence of outliers in vital sign measurements; (5) presence of variables with missing data exceeding 20%. For the purpose of analysis, only data corresponding to the initial ICU admission episode during a single hospital stay were included. Figure 1 illustrated the patient screening process. Fig. 1Flow chart of the study. ICU, Intensive Care Unit; LR, Logistic Regression; SVM, Support Vector Machine; GBM, Gradient Boosting Machine; NN, Neural Network; CATboost, Categorical Boosting; XGBoost, Extreme Gradient Boosting; AdaBoost, Adaptive Boosting; KNN, K-Nearest Neighbors; LightGBM, Light Gradient Boosting Machine Flow chart of the study. ICU, Intensive Care Unit; LR, Logistic Regression; SVM, Support Vector Machine; GBM, Gradient Boosting Machine; NN, Neural Network; CATboost, Categorical Boosting; XGBoost, Extreme Gradient Boosting; AdaBoost, Adaptive Boosting; KNN, K-Nearest Neighbors; LightGBM, Light Gradient Boosting Machine Outcome definition HAD defined as new-onset delirium developing in patients with pre-existing hypothyroidism exclusively during ICU admission, which served as the primary outcome for this risk prediction study. Feature extraction and data processing Data were extracted from the MIMIC-IV and MIMIC-III databases within the first 24 h following ICU admission (Table 1), encompassing the following categories: (1) demographic characteristics; (2) comorbidities; (3) ICU Interventions; (4) Sequential Organ Failure Assessment (SOFA) scores and Glasgow Coma Scale (GCS) scores; (5) vital signs and laboratory test findings. Table 1Baseline characteristics of delirium and Non-deliriumVariablesMIMIC IV v3.1MIMIC Ⅲ v1.4Hypothyroidismwithout delirium(n = 3598)Hypothyroidismwith delirium(n = 1063) p Hypothyroidismwithout delirium(n = 444)Hypothyroidismwith delirium(n = 272) p DemographicsAge (years)77(71, 84)79(72, 86)< 0.00168(58, 78)74(62, 81)< 0.001Gender Male (%)1206(34)357(34)0.998156(35)96(35)1Weight (kg)73.4(61.7, 88.4)73(61.85, 88.93)0.98677.7(65.72, 95)75.85(64.38, 92.12)0.168ICU_Day (Days)1.9(1.14, 3.25)2.92(1.63, 5.52)< 0.0011.96(1.13, 3.57)3.62(2.03, 6.98)< 0.001ComorbidityND n (%)1460(41)364(34)< 0.00198(22)40(15)0.02Hypertension n (%)1467(41)409(38)0.192184(41)124(46)0.312AKI n (%)1277(35)479(45)< 0.001128(29)84(31)0.617LC n (%)170(5)55(5)0.60424(5)16(6)0.919CVA n (%)439(12)136(13)0.64338(9)22(8)0.935CB n (%)466(13)149(14)0.3959(2)9(3)0.414ICU InterventionsCRRT(%)80(2)54(5)< 0.00114(3)6(2)0.608MV(%)2511(70)864(81)< 0.001127(29)133(49)< 0.001VP(%)1174(33)572(54)< 0.001126(28)111(41)< 0.001Sedatives(%)886(25)582(55)< 0.001162(36)153(56)< 0.001Scoring systemSOFA3(2, 5)5(3, 8)< 0.0013(2, 5)5(3, 6)< 0.001GCS15(14, 15)14(11, 15)< 0.00115(14, 15)14(12, 15)< 0.001Vital signsHR83 (72, 97)85 (72, 100)0.16386 (75, 99)87.5 (74, 102)0.602SBP (mmHg)122 (105, 140)120 (104, 139)0.14120 (103, 139)122 (106, 140)0.191DBP (mmHg)65 (55, 77)64 (54, 76)0.06864 (54, 75)64 (54, 77)0.843MAP (mmHg)80 (69, 92)79 (68.5, 91)0.16377 (66, 89)79 (69, 90)0.335RR19 (16, 23)19 (16, 23)0.93418 (15, 22)19 (15, 23)0.243SPO2 (%)97 (95, 99)98 (95, 100)< 0.00197 (95, 99)97 (95, 100)0.617Temperature (℃)36.72 (36.5, 36.94)36.72 (36.44, 37)0.14836.67 (36.28, 37)36.67 (36.22, 37.17)0.955Laboratory ResultsRBC×1012/L3.45(2.95, 3.94)3.33(2.9, 3.88)0.0053.55 ± 0.73.51 ± 0.660.491WBC×1012/L9.6(7, 13.4)10.4(7.6, 14.8)< 0.0018.5(6.2, 12.8)9.4(7, 12.43)0.171Platelet×109/L197(147, 259)191(137, 254)0.028211(153.75, 275.25)216(153.75, 283)0.76Hemoglobin (g/L)10.2(8.7, 11.7)10(8.6, 11.4)0.00610.51 ± 1.8910.57 ± 1.950.723Hematocrit (%)31.6(27.4, 36)31.2(26.95, 35.4)0.02432.01 ± 5.7831.87 ± 5.50.742RDW14.9(13.7, 16.7)15.2(13.9, 17.1)< 0.00114.85(13.5, 16.4)14.95(14.1, 16.72)0.041INR1.3(1.1, 1.6)1.3(1.1, 1.6)0.0771.25(1.1, 1.5)1.2(1.1, 1.42)0.343PT (seconds)13.7(12.1, 17)14.1(12.3, 17.5)0.00713.7(12, 16.4)13.7(12.7, 15.9)0.207APTT (seconds)31.5(27.6, 38.4)31.8(27.5, 38.8)0.83831.05(27.5, 39.4)30.9(26.6, 38.7)0.137Creatinine (µmol/L)1(0.8, 1.6)1.1(0.8, 1.9)0.0011(0.7, 1.5)1.1(0.8, 1.7)0.194BUN (mmol/L)23(15, 37)25(16, 41)0.00220(14, 32.25)22(14, 36)0.162AG(mmol/L)14(12, 16)14(12, 17)0.00814(12, 16)14(12, 16)0.6Bicarbonate(mmol/L)23(21, 26)23(20, 25)< 0.00125(21, 27)25(22, 28)0.594Calcium(mmol/L)8.5(8, 8.9)8.4(7.95, 8.9)< 0.0018.5(7.9, 8.9)8.4(7.9, 8.9)0.43Magnesium(mmol/L)2(1.8, 2.2)2(1.7, 2.2)0.4981.9(1.7, 2.1)1.9(1.7, 2.1)0.507Phosphate(mmol/L)3.5(3, 4.2)3.6(3, 4.4)0.0693.4(2.8, 4)3.5(2.8, 4.1)0.667Chloride(mmol/L)103(99, 106)103(98, 107)0.054104(100, 108)104(100, 108.25)0.231Potassium(mmol/L)4.1(3.7, 4.5)4.1(3.8, 4.6)0.1094.1(3.7, 4.4)4(3.7, 4.5)0.741Sodium(mmol/L)138(135, 141)138(135, 141.5)0.252139(136, 141)139(136, 142)0.032Glucose(mmol/L)6.83(5.61, 8.72)7.11(5.83, 9.06)< 0.0016.58(5.33, 8.18)6.8(5.44, 8.74)0.221Balance(ml)528.58(-572.9, 1944.93)1085.09(-230.17,2724.26)< 0.0012091.32(1.88, 4776.05)2870.15(624.8,6041.73)0.008Abbreviations: AKI Acute Kidney Injury, CVA Cerebrovascular Accident, CB Chronic Bronchitis, CRRT Continuous Renal Replacement Therapy, MV Mechanical Ventilation, VP Vasopressors, ICU_Day Intensive Care Unit, SOFA Sequential Organ Failure Assessment, GCS Glasgow Coma Scale, HR Heart Rate, SBP Systolic Blood Pressure, DBP Diastolic Blood Pressure, MAP Mean Arterial Pressure, RR Respiratory Rate, SpO2 Pulse Oximetry Saturation, RBC Red Blood Cell, WBC White Blood Cell, Hb Hemoglobin, HCT Hematocrit, RDW Red Cell Distribution Width, INR International Normalized Ratio, PT Prothrombin Time, APTT Activated Partial Thromboplastin Time, BUN Blood Urea Nitrogen, PO2 Partial Pressure of Oxygen, PCO2 Partial Pressure of Carbon Dioxide, pH Potential of Hydrogen, AG Anion Gap Table 1Baseline characteristics of delirium and Non-deliriumVariablesMIMIC IV v3.1MIMIC Ⅲ v1.4Hypothyroidismwithout delirium(n = 3598)Hypothyroidismwith delirium(n = 1063) p Hypothyroidismwithout delirium(n = 444)Hypothyroidismwith delirium(n = 272) p DemographicsAge (years)77(71, 84)79(72, 86)< 0.00168(58, 78)74(62, 81)< 0.001Gender Male (%)1206(34)357(34)0.998156(35)96(35)1Weight (kg)73.4(61.7, 88.4)73(61.85, 88.93)0.98677.7(65.72, 95)75.85(64.38, 92.12)0.168ICU_Day (Days)1.9(1.14, 3.25)2.92(1.63, 5.52)< 0.0011.96(1.13, 3.57)3.62(2.03, 6.98)< 0.001ComorbidityND n (%)1460(41)364(34)< 0.00198(22)40(15)0.02Hypertension n (%)1467(41)409(38)0.192184(41)124(46)0.312AKI n (%)1277(35)479(45)< 0.001128(29)84(31)0.617LC n (%)170(5)55(5)0.60424(5)16(6)0.919CVA n (%)439(12)136(13)0.64338(9)22(8)0.935CB n (%)466(13)149(14)0.3959(2)9(3)0.414ICU InterventionsCRRT(%)80(2)54(5)< 0.00114(3)6(2)0.608MV(%)2511(70)864(81)< 0.001127(29)133(49)< 0.001VP(%)1174(33)572(54)< 0.001126(28)111(41)< 0.001Sedatives(%)886(25)582(55)< 0.001162(36)153(56)< 0.001Scoring systemSOFA3(2, 5)5(3, 8)< 0.0013(2, 5)5(3, 6)< 0.001GCS15(14, 15)14(11, 15)< 0.00115(14, 15)14(12, 15)< 0.001Vital signsHR83 (72, 97)85 (72, 100)0.16386 (75, 99)87.5 (74, 102)0.602SBP (mmHg)122 (105, 140)120 (104, 139)0.14120 (103, 139)122 (106, 140)0.191DBP (mmHg)65 (55, 77)64 (54, 76)0.06864 (54, 75)64 (54, 77)0.843MAP (mmHg)80 (69, 92)79 (68.5, 91)0.16377 (66, 89)79 (69, 90)0.335RR19 (16, 23)19 (16, 23)0.93418 (15, 22)19 (15, 23)0.243SPO2 (%)97 (95, 99)98 (95, 100)< 0.00197 (95, 99)97 (95, 100)0.617Temperature (℃)36.72 (36.5, 36.94)36.72 (36.44, 37)0.14836.67 (36.28, 37)36.67 (36.22, 37.17)0.955Laboratory ResultsRBC×1012/L3.45(2.95, 3.94)3.33(2.9, 3.88)0.0053.55 ± 0.73.51 ± 0.660.491WBC×1012/L9.6(7, 13.4)10.4(7.6, 14.8)< 0.0018.5(6.2, 12.8)9.4(7, 12.43)0.171Platelet×109/L197(147, 259)191(137, 254)0.028211(153.75, 275.25)216(153.75, 283)0.76Hemoglobin (g/L)10.2(8.7, 11.7)10(8.6, 11.4)0.00610.51 ± 1.8910.57 ± 1.950.723Hematocrit (%)31.6(27.4, 36)31.2(26.95, 35.4)0.02432.01 ± 5.7831.87 ± 5.50.742RDW14.9(13.7, 16.7)15.2(13.9, 17.1)< 0.00114.85(13.5, 16.4)14.95(14.1, 16.72)0.041INR1.3(1.1, 1.6)1.3(1.1, 1.6)0.0771.25(1.1, 1.5)1.2(1.1, 1.42)0.343PT (seconds)13.7(12.1, 17)14.1(12.3, 17.5)0.00713.7(12, 16.4)13.7(12.7, 15.9)0.207APTT (seconds)31.5(27.6, 38.4)31.8(27.5, 38.8)0.83831.05(27.5, 39.4)30.9(26.6, 38.7)0.137Creatinine (µmol/L)1(0.8, 1.6)1.1(0.8, 1.9)0.0011(0.7, 1.5)1.1(0.8, 1.7)0.194BUN (mmol/L)23(15, 37)25(16, 41)0.00220(14, 32.25)22(14, 36)0.162AG(mmol/L)14(12, 16)14(12, 17)0.00814(12, 16)14(12, 16)0.6Bicarbonate(mmol/L)23(21, 26)23(20, 25)< 0.00125(21, 27)25(22, 28)0.594Calcium(mmol/L)8.5(8, 8.9)8.4(7.95, 8.9)< 0.0018.5(7.9, 8.9)8.4(7.9, 8.9)0.43Magnesium(mmol/L)2(1.8, 2.2)2(1.7, 2.2)0.4981.9(1.7, 2.1)1.9(1.7, 2.1)0.507Phosphate(mmol/L)3.5(3, 4.2)3.6(3, 4.4)0.0693.4(2.8, 4)3.5(2.8, 4.1)0.667Chloride(mmol/L)103(99, 106)103(98, 107)0.054104(100, 108)104(100, 108.25)0.231Potassium(mmol/L)4.1(3.7, 4.5)4.1(3.8, 4.6)0.1094.1(3.7, 4.4)4(3.7, 4.5)0.741Sodium(mmol/L)138(135, 141)138(135, 141.5)0.252139(136, 141)139(136, 142)0.032Glucose(mmol/L)6.83(5.61, 8.72)7.11(5.83, 9.06)< 0.0016.58(5.33, 8.18)6.8(5.44, 8.74)0.221Balance(ml)528.58(-572.9, 1944.93)1085.09(-230.17,2724.26)< 0.0012091.32(1.88, 4776.05)2870.15(624.8,6041.73)0.008Abbreviations: AKI Acute Kidney Injury, CVA Cerebrovascular Accident, CB Chronic Bronchitis, CRRT Continuous Renal Replacement Therapy, MV Mechanical Ventilation, VP Vasopressors, ICU_Day Intensive Care Unit, SOFA Sequential Organ Failure Assessment, GCS Glasgow Coma Scale, HR Heart Rate, SBP Systolic Blood Pressure, DBP Diastolic Blood Pressure, MAP Mean Arterial Pressure, RR Respiratory Rate, SpO2 Pulse Oximetry Saturation, RBC Red Blood Cell, WBC White Blood Cell, Hb Hemoglobin, HCT Hematocrit, RDW Red Cell Distribution Width, INR International Normalized Ratio, PT Prothrombin Time, APTT Activated Partial Thromboplastin Time, BUN Blood Urea Nitrogen, PO2 Partial Pressure of Oxygen, PCO2 Partial Pressure of Carbon Dioxide, pH Potential of Hydrogen, AG Anion Gap Baseline characteristics of delirium and Non-delirium Abbreviations: AKI Acute Kidney Injury, CVA Cerebrovascular Accident, CB Chronic Bronchitis, CRRT Continuous Renal Replacement Therapy, MV Mechanical Ventilation, VP Vasopressors, ICU_Day Intensive Care Unit, SOFA Sequential Organ Failure Assessment, GCS Glasgow Coma Scale, HR Heart Rate, SBP Systolic Blood Pressure, DBP Diastolic Blood Pressure, MAP Mean Arterial Pressure, RR Respiratory Rate, SpO2 Pulse Oximetry Saturation, RBC Red Blood Cell, WBC White Blood Cell, Hb Hemoglobin, HCT Hematocrit, RDW Red Cell Distribution Width, INR International Normalized Ratio, PT Prothrombin Time, APTT Activated Partial Thromboplastin Time, BUN Blood Urea Nitrogen, PO2 Partial Pressure of Oxygen, PCO2 Partial Pressure of Carbon Dioxide, pH Potential of Hydrogen, AG Anion Gap For continuous variables, we performed standardized data cleaning prior to model development, with prespecified outliers and overtly contradictory values coded as missing values. Outliers were defined as physiologically implausible extreme values consistent with electronic health record entry errors, per widely accepted preprocessing protocols for MIMIC dataset analyses. Predefined outlier thresholds were defined as follows: body temperature < 32 °C or > 42 °C, heart rate < 30 beats per minute or > 200 beats per minute, systolic blood pressure < 50 mmHg or > 220 mmHg, respiratory rate < 5 breaths per minute or > 60 breaths per minute, peripheral oxygen saturation < 50% or > 100%. For all included laboratory parameters, outliers were defined beyond validated physiological reference ranges, such as serum calcium < 1 mmol/L or > 4 mmol/L and red cell distribution width < 10% or > 25%. Overtly contradictory values, defined as logically inconsistent clinical records including ICU admission prior to hospital admission, negative ICU length of stay, and physiologically incompatible paired test results, were also coded as missing values. Variables exhibiting more than 20% missing data were excluded from the analytical process. Multiple imputation was employed to address missing values, utilizing the “MICE” package [12]. Unordered multicategorical variables were represented using one-hot encoding. Model development and validation Data from the MIMIC-IV database were randomly split into training and internal validation sets at a ratio of 7:3, while data from the MIMIC-III database served as the external validation set. Lasso regression, Boruta filtering, and Recursive Feature Elimination (RFE) were selected as the key methods and further utilized to perform dimensionality reduction and feature selection on the training set. Specifically, Lasso regression was applied with 5-fold cross-validation to optimize the regularization parameter (λ) and shrink the coefficients of non-informative features to zero [13]; Boruta filtering was employed to distinguish relevant features from random shadow features based on permutation tests [14]; RFE was performed with a logistic regression base estimator to iteratively eliminate the least important features until the optimal feature subset was retained [15]. The intersection of features identified by all three methods was defined as the final feature set, which was subsequently used for the development of the risk prediction model. Following data reduction, predictive models were constructed using nine machine learning approaches: (1) Logistic Regression (LR); (2) Support Vector Machine (SVM); (3) Gradient Boosting Machine (GBM); (4) Neural Network (NN); (5) eXtreme Gradient Boosting (XGBoost); (6) K-Nearest Neighbors (KNN); (7) AdaBoost; (8) Light Gradient Boosting Machine (LightGBM); and (9) Categorical boosting (Cataboost). To minimize overfitting and identify the optimal hyperparameters, tenfold crossvalidation (CV) was performed. Grid search was used to find the optimal hyperparameters for each machine learning model. In the process of parameter adjustment, the highest area under the curve (AUC) of receiver operating characteristic (ROC) was selected as the optimal model. The models were built on the training set, and the internal validation set and external validation set were validated on the best model. The performance of the predictive model was assessed by the area under the receiver operating characteristic curve (AUROC), sensitivity, specificity, accuracy, precision and F1 score. To assess potential clinical utility, we performed decision curve analysis (DCA) to evaluate net benefits across different threshold probabilities. In addition to discrimination metrics, we also used calibration curves to evaluate the consistency between the model’s predicted probabilities and the actual observed outcomes, to assess the model’s calibration performance and potential clinical utility. The SHAP method was adopted to investigate the interpretability of the final predictive model, where higher SHAP values signified an increased probability of delirium [16]. Partial dependence plots (PDPs) were employed to compute SHAP values for each feature, facilitating more precise predictions by clinicians. Statistical analysis The code used in this study is publicly available at GitHub:https://github.com/BINBINGUAN19851223/hypothyroidism-delirium-prediction.git. Continuous variables were summarized in accordance with their distribution characteristics: normally distributed data were expressed as mean±standard deviation, with intergroup comparisons conducted via the Student’s t-test. Conversely, non-normally distributed continuous variables were reported as median (interquartile range), and group disparities were evaluated using the Wilcoxon rank-sum test. Categorical variables were expressed as counts and percentages, with between-group comparisons performed using the chi-square test. Statistical significance was set at p < 0.05. All statistical analyses were conducted with R 4.3.3 (Vienna, Austria) and STATA 15.1 (College Station, Texas, USA), with a P-value < 0.05 considered statistically significant. Results Baseline characteristics This retrospective study enrolled 12,325 patients diagnosed with hypothyroidism from the MIMIC-IV (v3.1) and MIMIC-III (v1.4) databases. After exclusion, 3089 patients were excluded from MIMIC-IV (v3.1) and 3859 from MIMIC-Ⅲ (v1.4), resulting in a final analytical cohort of 5377 patients. Table 1 summarizes the baseline characteristics of hypothyroid patients stratified by delirium status (with vs. without delirium) in two independent databases: MIMIC-IV (v1.4) (Internal cohort: non-delirium, n = 3598; delirium, n = 1063) and MIMIC-Ⅲ (v1.4) ( external cohort: non-delirium, n = 444; delirium, n = 272). Notably, Table 1 identifies consistent baseline differences between hypothyroid patients with and without delirium across two independent databases, including older age, longer ICU stays, more frequent ICU interventions (MV, VP, sedatives), higher SOFA scores, lower GCS scores, and distinct laboratory abnormalities (e.g., higher WBC, glucose, RDW; lower RBC, Hb, calcium). Feature selection To identify relevant features in the training set, Lasso regression was employed, with variable coefficient dynamics visualized in Fig. 2A. A tenfold cross-validation approach was implemented for iterative analysis to ensure robustness. 42 variables closely linked to the HAD were included, namely: Potassium, Anion Gap (AG), Gender, Age, Glucose, Prothrombin Time (PT), Acute Kidney Injury (AKI), Red Blood Cell (RBC) count, Hemoglobin (Hb), Hematocrit (HCT), Activated Partial Thromboplastin Time (APTT), Red Cell Distribution Width (RDW), Balance, Heart Rate (HR), Respiratory Rate (RR), Hypertension, Systolic Blood Pressure (SBP), Bicarbonate, Sedatives, Blood Urea Nitrogen (BUN), ICU Length of Stay (ICU_Day), International Normalized Ratio (INR), Sodium, Calcium, Lactate (LC), Sequential Organ Failure Assessment (SOFA) score, Carbon Dioxide (CB), Peripheral Oxygen Saturation (SPO₂), Chloride, Magnesium, Temperature, Mean Arterial Pressure (MAP), Creatinine, Ventilator Pressure (VP), Mechanical Ventilation (MV), Continuous Renal Replacement Therapy (CRRT), Neurological Dysfunction (ND), Cerebrovascular Accident (CVA), White Blood Cell (WBC) count, Phosphate, Weight, Diastolic Blood Pressure (DBP), Glasgow Coma Scale (GCS), and Platelet count. Coefficient sign indicated the direction of association with the outcome: for instance, Sedatives exhibited a positive coefficient, reflecting a positive correlation with HAD, while GCS showed a negative coefficient, indicating an inverse association. Notably, features including VP, MV, and CRRT maintained near-zero coefficients even at low Log Lambda values, confirming their limited predictive utility for the target outcome. Correspondingly, Fig. 2B guided the selection of an optimal regularization parameter by quantifying cross-validation error across lambda levels, collectively laying a rigorous foundation for subsequent feature refinement and model tuning. Fig. 2Visualizations of feature selection procedures. A Coefficient path plot from Lasso regression, showing how the coefficient magnitudes of features change with the regularization parameter (log lambda). B Cross-validated mean (CVM) plot for Lasso regression, illustrating the association between the regularization parameter (log lambda) and cross-validation error, with vertical lines marking optimal lambda values (lambda.min and lambda.1se). C Box plot of variable importance from Boruta feature filtering, where each box represents the distribution of importance scores for a feature across iterations. D Importance score plot from Boruta feature filtering, categorizing features into confirmed, tentative, rejected, and shadow groups over 150 classifier runs. E Plot of treebag model accuracy versus feature subset size during feature selection, demonstrating performance across different numbers of features. F Venn diagram depicting the overlap of features selected by Lasso, Boruta, and recursive feature elimination (RFE), with the number of features in each subset and their intersections indicated Visualizations of feature selection procedures. A Coefficient path plot from Lasso regression, showing how the coefficient magnitudes of features change with the regularization parameter (log lambda). B Cross-validated mean (CVM) plot for Lasso regression, illustrating the association between the regularization parameter (log lambda) and cross-validation error, with vertical lines marking optimal lambda values (lambda.min and lambda.1se). C Box plot of variable importance from Boruta feature filtering, where each box represents the distribution of importance scores for a feature across iterations. D Importance score plot from Boruta feature filtering, categorizing features into confirmed, tentative, rejected, and shadow groups over 150 classifier runs. E Plot of treebag model accuracy versus feature subset size during feature selection, demonstrating performance across different numbers of features. F Venn diagram depicting the overlap of features selected by Lasso, Boruta, and recursive feature elimination (RFE), with the number of features in each subset and their intersections indicated Beyond Lasso regression, complementary feature selection was performed to validate high-impact predictors. Boruta filtering (Figs. 2C–D) identified statistically robust features by benchmarking against a null distribution derived from shadow features, while concurrently confirming the stability of these associations across 150 classifier iterations. In parallel, a treebag (bagged decision trees) model (Fig. 2E) quantified feature impact based on their ability to reduce prediction error across ensemble trees, providing a performance-driven ranking of variable utility. Finally, Fig. 2F summarized the number and proportion of features retained by distinct selection approaches to contextualize method-specific differences. Key methods included Lasso regression (4 features, 10.5%), Boruta filtering (7 features, 18.4%), and Recursive Feature Elimination (RFE, 13 features, 34.2%), alongside three more restrictive strategies that retained 3 (7.9%), 2 (5.3%), and 1 (2.6%) features, respectively. Model performance comparisons Nine ML-models were constructed to predict HAD risk in critically ill ICU patients. Discriminative performance of the nine models was visualized via receiver operating characteristic (ROC) curves in Fig. 3A. All models demonstrated acceptable predictive efficacy for incident HAD, with the GBM model yielding the highest discriminative power. Specifically, the GBM model achieved an area under the curve (AUC) of 0.806 [95% confidence interval (CI): 0.780–0.832], establishing a benchmark for HAD risk prediction. Closely trailing, the CatBoost model exhibited comparable performance (AUC = 0.805, 95% CI: 0.779–0.831) and outperformed the remaining algorithms. The other models maintained favorable predictive ability and were ranked in descending order of AUC: Logistic Regression (0.793, 95% CI: 0.766–0.820), Adaboost (0.781, 95% CI: 0.756–0.807), LightGBM (0.781, 95% CI: 0.753–0.809), Neural Network (0.779, 95% CI: 0.753–0.806), Support Vector Machine (SVM, 0.760, 95% CI: 0.731–0.789), XGBoost (0.719, 95% CI: 0.689–0.749), and K-Nearest Neighbors (KNN, 0.599, 95% CI: 0.570–0.628). Fig. 3Performance evaluation of predictive models. A, C, E, G Analyses based on the internal database and (B, D, F, H) Analyses based on the external validation set: (A, B) Receiver operating characteristic (ROC) curve demonstrating the discriminative capacity of various models. The area under the curve (AUC) quantifies the models’ ability to distinguish between positive and negative cases. C, D Calibration plot illustrating the agreement between predicted probabilities and actual outcome probabilities. The dashed line represents perfect calibration. E, F Decision curve analysis (DCA) evaluating the net benefit of the models across different high-risk thresholds. G, H Confusion matrix presenting the classification results of the optimal model, with percentages indicating the proportions of true positives, false positives, true negatives, and false negatives Performance evaluation of predictive models. A, C, E, G Analyses based on the internal database and (B, D, F, H) Analyses based on the external validation set: (A, B) Receiver operating characteristic (ROC) curve demonstrating the discriminative capacity of various models. The area under the curve (AUC) quantifies the models’ ability to distinguish between positive and negative cases. C, D Calibration plot illustrating the agreement between predicted probabilities and actual outcome probabilities. The dashed line represents perfect calibration. E, F Decision curve analysis (DCA) evaluating the net benefit of the models across different high-risk thresholds. G, H Confusion matrix presenting the classification results of the optimal model, with percentages indicating the proportions of true positives, false positives, true negatives, and false negatives Table 2 showed detailed performance metrics for the nine models. the GBM model exhibited the most favorable performance enhancement across validation sets: its sensitivity increased by 22.9% points (from 0.374 to 0.603) without compromising specificity (0.823 vs. 0.854), while precision nearly doubled (0.384 vs. 0.716). Table 2Analysis of the predictive performance of each modelModelAccuracySensitivitySpecificityPrecisionF1-ScoreInternal validation sets Logistic0.7050.7990.6770.4220.552 SVM0.6460.8050.5990.3720.508 GBM0.7210.3740.8230.3840.379 NN0.7320.8180.7060.4510.581 Catboost0.6680.8270.6210.3910.531 Xgboost0.7540.7640.7520.4760.586 Adaboost0.5980.830.5290.3420.484 KNN0.7210.3740.8230.3840.379 LightGBM0.7030.8110.6710.4210.554External validation sets Logistic0.6910.6320.7270.5870.609 SVM0.6270.7720.5380.5060.611 GBM0.7580.6030.8540.7160.655 NN0.7150.750.6940.60.667 Catboost0.6620.7430.6130.540.625 Xgboost0.7070.7320.6910.5920.655 Adaboost0.6020.860.4440.4860.622 KNN0.7580.6030.8540.7160.655 LightGBM0.6440.7650.570.5210.62Abbreviations: LR Logistic Regression, SVM Support Vector Machine, GBM Gradient Boosting Machine, NN Neural Network, CATboost Categorical Boosting, XGBoost Extreme Gradient Boosting, AdaBoost Adaptive Boosting, KNN K-Nearest Neighbors, LightGBM Light Gradient Boosting Machine Table 2Analysis of the predictive performance of each modelModelAccuracySensitivitySpecificityPrecisionF1-ScoreInternal validation sets Logistic0.7050.7990.6770.4220.552 SVM0.6460.8050.5990.3720.508 GBM0.7210.3740.8230.3840.379 NN0.7320.8180.7060.4510.581 Catboost0.6680.8270.6210.3910.531 Xgboost0.7540.7640.7520.4760.586 Adaboost0.5980.830.5290.3420.484 KNN0.7210.3740.8230.3840.379 LightGBM0.7030.8110.6710.4210.554External validation sets Logistic0.6910.6320.7270.5870.609 SVM0.6270.7720.5380.5060.611 GBM0.7580.6030.8540.7160.655 NN0.7150.750.6940.60.667 Catboost0.6620.7430.6130.540.625 Xgboost0.7070.7320.6910.5920.655 Adaboost0.6020.860.4440.4860.622 KNN0.7580.6030.8540.7160.655 LightGBM0.6440.7650.570.5210.62Abbreviations: LR Logistic Regression, SVM Support Vector Machine, GBM Gradient Boosting Machine, NN Neural Network, CATboost Categorical Boosting, XGBoost Extreme Gradient Boosting, AdaBoost Adaptive Boosting, KNN K-Nearest Neighbors, LightGBM Light Gradient Boosting Machine Analysis of the predictive performance of each model Abbreviations: LR Logistic Regression, SVM Support Vector Machine, GBM Gradient Boosting Machine, NN Neural Network, CATboost Categorical Boosting, XGBoost Extreme Gradient Boosting, AdaBoost Adaptive Boosting, KNN K-Nearest Neighbors, LightGBM Light Gradient Boosting Machine Figure 3C presents calibration curves for all nine predictive models, providing critical insights into their predictive reliability. Excluding the SVM and KNN, seven models demonstrated good alignment between predicted probabilities and observed HAD outcomes. Among these, the GBM model achieved the most favorable calibration, with its curve closely approximating the theoretical ideal line. To further evaluate clinical utility, standardized net benefit analysis was performed across a broad spectrum of risk thresholds (Fig. 3E). All models except KNN exhibited robust net benefit, and the GBM model stood out by delivering the highest standardized net benefit across most clinically relevant thresholds (0.1–0.8). On this basis, the GBM model was designated as the optimal algorithm for HAD prediction. Subsequently, the clinical applicability of the GBM model was further corroborated by its confusion matrix and derived performance metrics (Fig. 3G). When integrated with the model’s robust discriminative capacity (AUC ≈ 0.80, Fig. 3A), favorable calibration (Fig. 3C), and superior standardized net benefit (Fig. 3E), these findings collectively affirm the GBM model as a clinically actionable tool for HAD risk stratification in critically ill ICU patients. The parameters of the GBM are detailed in the supplementary material (Table S1). External validation Despite inherent baseline characteristic discrepancies between the two datasets, the external validation results—illustrated in Fig. 3B, D and F, and 3H—affirm the GBM model’s robust generalizability: it maintains superior discriminative ability (AUC = 0.788), favorable calibration, and leading clinical utility across independent cohorts, with its confusion matrix-derived metrics further supporting the model’s practical application for HAD risk stratification in diverse ICU settings. Model interpretability analysis Interpretability analysis was performed using SHAP values, with results presented in Fig. 4. Figure 4A depicts a comprehensive swarm plot illustrating the feature distribution within the GBM model, where the horizontal axis represents SHAP values and the vertical axis displays features sorted by their cumulative SHAP value contribution. Each data point corresponds to an individual instance’s SHAP value for a specific feature, GCS, SOFA, sedatives, ICU day, SpO₂, Calcium, RDW, and MAP as the eight most influential predictors of HAD. Figure 4B displays the mean absolute SHAP values across all included features, which serves as a well-recognized metric to directly quantify and establish the hierarchical importance of individual features in the model. Fig. 4Interpretability of GBM model via SHAP values. A SHAP scatter plot showing the distribution of SHAP values for each feature. Dot position indicates feature contribution to model output, and color encodes feature value (high/low). B Feature importance bar plot, ranked by mean absolute SHAP values, indicating each feature’s contribution to GBM performance. C, D SHAP force plots illustrating cumulative feature contributions to model predictions for exemplar cases. Colored segments denote the sign and magnitude of each feature’s impact. E–G SHAP dependence plots visualizing the relationship between GCS and its interactions with ICU_Day (E), Sedatives (F), and SOFA (G). Scatter points represent individual samples, with color gradient reflecting the interacting feature’s value. GBM, Gradient Boosting Machine; GCS, Glasgow Coma Scale Interpretability of GBM model via SHAP values. A SHAP scatter plot showing the distribution of SHAP values for each feature. Dot position indicates feature contribution to model output, and color encodes feature value (high/low). B Feature importance bar plot, ranked by mean absolute SHAP values, indicating each feature’s contribution to GBM performance. C, D SHAP force plots illustrating cumulative feature contributions to model predictions for exemplar cases. Colored segments denote the sign and magnitude of each feature’s impact. E–G SHAP dependence plots visualizing the relationship between GCS and its interactions with ICU_Day (E), Sedatives (F), and SOFA (G). Scatter points represent individual samples, with color gradient reflecting the interacting feature’s value. GBM, Gradient Boosting Machine; GCS, Glasgow Coma Scale To further illustrate the model’s behavior at the individual patient level, Figs. 4C-D provide SHAP force plots for two distinct cases: yellow and violet indicators represent positive and negative predictive contributions, respectively, while f(x) denotes the actual SHAP value for each feature. Figures 4E–G are dedicated SHAP dependency plots, each constructed to quantify the marginal effects of a distinct key predictive feature—ICU_Day for Fig. 4E, Sedatives for Fig. 4F, and SOFA for Fig. 4G—on the predictive model’s SHAP values. Application of model A predictive model was constructed to assess the risk of delirium in patients with hypothyroidism by the final model, which is accessible as a web-based application (https://once.shinyapps.io/build_web/). This model interface comprises a parameter input module and a risk visualization module, as detailed shown in Fig. 5. After inputting the above parameters and initiating the prediction, the model visualized the risk stratification via a donut chart. Fig. 5Predictive modeling interface for hypothyroidism-associated delirium Predictive modeling interface for hypothyroidism-associated delirium As shown, the risk group for HAD accounted for 92.26%, whereas the non-risk group constituted the remaining proportion (Fig. 5). This outcome suggests a substantially high likelihood of delirium in the clinical scenario defined by the input parameters. Discussion Our present study developed and externally validated a machine learning-based predictive model for HAD in critically ill patients using two large, non-overlapping critical care databases (MIMIC-IV and MIMIC-III). Among nine tested algorithms, the GBM model emerged as the optimal performer, achieving an internal validation AUROC of 0.806 (95% CI: 0.780–0.832) and an external validation AUROC of 0.788. Through a multi-step feature selection pipeline integrating LASSO regression, Boruta filtering, and RFE, we identified eight key predictors of HAD: GCS, Sequential SOFA score, sedative exposure, ICU length of stay, SpO₂, serum calcium, RDW, and MAP. Notably, the model demonstrated robust calibration and clinical utility across diverse cohorts, and we further developed a user-friendly web-based application to facilitate its translation into clinical practice. To our knowledge, this represents the first externally validated ML model specifically tailored for HAD prediction, addressing a critical unmet need in the management of hypothyroid ICU patients. Delirium prediction has been a focus of intensive care research, with numerous ML models developed in recent years [17, 18]. However, most existing models suffer from three major limitations that hinder their clinical applicability: lack of external validation, poor interpretability, and failure to target disease-specific subtype [19, 20]. A systematic review by Ramspek et al. [21] reported that only 15.4% of ML-based delirium models include external validation, which is consistent with our observation that prior tools rarely generalize beyond single institutions. Although the MIMIC-IV and MIMIC-III databases utilized in this study were derived from the same single academic medical center, they cover distinct and non-overlapping time periods, and the consistent performance of the GBM model (external AUROC = 0.788) confirms its generalizability . Furthermore, existing delirium models are primarily designed for general ICU populations, with limited relevance to HAD. Hypothyroidism-induced metabolic dysregulation, impaired neural function, and frequent comorbidities create a unique pathophysiological milieu that amplifies delirium risk [4]. Traditional assessment tools such as CAM-ICU and ICDSC are impractical for this cohort due to their reliance on patient responsiveness and verbal communication [7], while general delirium ML models fail to account for hypothyroidism-specific pathways. Our model addresses this gap by focusing exclusively on hypothyroid patients, with key features reflecting the interplay between thyroid dysfunction, organ failure, and delirium pathophysiology—an approach that aligns with recent calls for subtype-specific delirium prediction tools [22]. In terms of predictive performance, our GBM model (AUROC = 0.806 internally, 0.788 externally) compares favorably with existing delirium models. For example, Chen et al. [23] developed an ML model based on risk stratification to predict delirium among adult critically ill patients, with an AUROC of 0.78. Meanwhile, Song et al. [24] established ML models to predict postoperative delirium in elderly patients via perioperative clinical data, and the models achieved a favorable AUROC of 0.783. Both models demonstrated moderate discriminative ability for delirium prediction, laying a foundation for clinical risk screening. The superior performance of our model may be attributed to the multi-step feature selection process, which integrated three complementary methods to identify high-impact predictors while minimizing noise. This approach addresses a common limitation of single-method feature selection, where irrelevant variables may confound model performance . The identification of GCS, SOFA score, and sedative exposure as top predictors of HAD aligns with existing delirium pathophysiology research but also highlights unique considerations for hypothyroid patients. GCS, a measure of neurological function, has long been recognized as a robust delirium predictor [25], and its inverse association with HAD (lower GCS = higher risk) is consistent with the neurocognitive impairment caused by hypothyroidism-induced synaptic dysfunction [26]. Similarly, the SOFA score, a marker of organ failure severity, reflects systemic inflammation and metabolic derangement—pathways that are synergistically exacerbated by hypothyroidism and delirium [27]. Sedative exposure emerged as a critical modifiable risk factor, which is particularly relevant for hypothyroid patients. Thyroid hormones regulate drug metabolism via cytochrome P450 enzymes, and hypothyroidism reduces sedative clearance, prolonging their central nervous system effects [28]. This may explain why sedative use had a stronger predictive effect for HAD than for general delirium. Our finding underscores the need for personalized sedation protocols in hypothyroid ICU patients, which could be guided by our predictive model to reduce delirium risk. Our study also incorporates several methodological advances that strengthen its validity and translational potential. First, the use of two non-overlapping databases for internal and external validation minimizes overfitting and ensures generalizability across different time periods (2001–2008 vs. 2012–2022) and clinical practices [11, 12]. External validation is particularly critical for ML models in critical care, as institutional differences in patient populations and clinical protocols can significantly impact performance. Second, the integration of SHAP analysis enhances model interpretability, which is a major barrier to ML adoption in clinical practice [29]. By quantifying feature importance and illustrating individual patient predictions, SHAP analysis transforms a “black box” model into a transparent tool that clinicians can trust and understand. Third, the development of a web-based application addresses the deployment gap that plagues many ML models [30]. To facilitate potential clinical translation of our model, we developed a user-friendly, web-based interactive application based on the final GBM model, which does not require specialized statistical software or advanced expertise to operate. This application includes a flexible, standardized parameter input module and a real-time risk visualization module. For binary variables (sedative use and VP use), editable drop-down menus are provided, supporting both predefined standardized option selection and manual entry of specific numerical values; the GCS score is input via an interactive sliding scale, and all continuous variables are entered through dedicated numerical input boxes. After inputting the patient’s clinical variables collected within 24 h of ICU admission and clicking the “Predict” button, clinicians can obtain the patient’s HAD risk probability in real time, which is visually presented as a donut chart with clear risk stratification (as demonstrated by a representative case with a 92.26% HAD risk). This application is designed solely as an auxiliary risk stratification tool with potential clinical utility, and has not been validated for direct use in routine clinical decision-making. However, our study has several limitations that should be acknowledged. First, the retrospective design and reliance on administrative and electronic health record data introduce potential selection bias. While we applied strict inclusion and exclusion criteria, unmeasured confounders may have influenced results. Second, the MIMIC-IV and MIMIC-III databases primarily include patients from a single U.S. academic medical center, which may limit generalizability to non-Western populations or community hospitals with different resource availability. Thus, large-scale prospective studies are required to further verify the model’s accuracy and its generalizability to diverse patient populations. Third, the relatively small sample size of the external validation set may limit the stability of the external performance estimates, and larger multi-center cohorts are needed in future studies to further validate our findings. Fourth, In this study, we used CAM-ICU scores as the basis for our outcome definition, which may underdiagnose delirium in non-verbal or severely sedated patients. The performance of our model in patients who cannot undergo CAM-ICU assessment still needs further research to verify. Despite these limitations, our model remains valuable for critical care clinicians to identify high-risk patients for HAD more promptly. Conclusion In conclusion, this study developed and temporally validated an interpretable GBM model for the early identification of HAD in hypothyroid patients admitted to the intensive care unit, with robust predictive performance across two datasets from the same academic medical center. The key predictors included in the final model are consistent with the established pathophysiological pathways of HAD, and all are routinely and readily available in clinical practice. We further developed an online interactive tool based on this model, which regarded as an auxiliary risk stratification tool with potential clinical application value. This study addresses an important evidence gap in delirium risk prediction research by focusing on a high-risk, understudied patient subgroup, and provides a preliminary predictive framework that may support earlier identification of at-risk individuals and inform the implementation of targeted preventive interventions, with the ultimate goal of reducing the morbidity and mortality associated with HAD. Supplementary Information Supplementary Material 1. Supplementary Material 1. Supplementary Material 2. Supplementary Material 2. Supplementary Material 3. Supplementary Material 3.