Development and external validation of a machine learning model based on multimodal dynamic data for predicting shunt-dependent hydrocephalus after aneurysmal subarachnoid hemorrhage: a dual-center retrospective cohort study
Chengzhang Zheng, Jianhuang Huang, Xinguo Wang, Qing Ye, Caihou Lin, Xiang Gu
Objective To develop and externally validate a machine learning model for predicting shunt-dependent hydrocephalus (SDHC) after aneurysmal subarachnoid hemorrhage (aSAH) using multimodal dynamic data. Methods This dual-center retrospective study enrolled aSAH patients from Mindong Hospital (development cohort, 2018–2025) and Putian University Hospital (external validation cohort, 2016–2025). Using a day-21 landmark design, static baseline variables, weekly dynamic parameters, and clinical interventions were collected. Derived features capturing ventricular dynamics, intracranial pressure fluctuations, and inflammatory trajectories were engineered. Three models were compared using nested cross-validation. Performance was evaluated by AUC, AUPRC, Brier score, decision curve analysis, and SHAP analysis. Derived dynamic features characterizing ventricular expansion, intracranial pressure fluctuation, and inflammatory trajectories were engineered, and an ablation analysis was performed to quantify their incremental predictive contribution beyond static baseline variables. Results The development cohort included 228 patients (SDHC 21.9%); external validation included 102 patients (SDHC 23.5%). Random forest achieved optimal internal validation performance (AUC 0.894, AUPRC 0.676, Brier 0.112). At threshold 0.30, sensitivity and specificity were 0.920 and 0.840. External validation showed robust generalizability (AUC 0.867, sensitivity 0.875, specificity 0.859). Risk stratification demonstrated SDHC rates of 5.3, 35.7, and 64.7% in low-, intermediate-, and high-risk groups ( p < 0.001). Key predictors included GCS score, Hunt-Hess grade, Evans index change, age, ICP variability, and 14-day CSF drainage volume. Conclusion The random forest model integrating multimodal dynamic data accurately predicts SDHC after aSAH with strong external validity; ablation analysis confirmed that incorporating dynamic features significantly improved discrimination (AUC 0.894 vs. 0.831 for the static-only model, ΔAUC = 0.063, p = 0.028), identifying dynamic monitoring data — rather than algorithm choice alone — as a key driver of predictive performance and facilitating early identification and risk stratification of high-risk patients.