A Causal and interpretable machine learning framework for postcranioplasty risk prediction and surgical decision support

Wenbo Li, Bao Wang, T. Li, Y. Ma, Haoyong Jin, Jiangli Zhao, Zhiwei Xue, Na Su, Yanya He, Jiaqi Shi, Xuchen Liu, Ling Li, Tianzi Wang, Jiwei Wang, C. Li, Can Yan, Qichao Qi, Yu Guo, Weiguo Li, Bin Huang, Donghai Wang, Haoyu Wang, Yan Qu, Jian Wang, Tao Sun, Nan YangNpj 2026

Abstract

Cranioplasty is associated with a substantial burden of postoperative complications. In this multicenter study, we developed a machine learning-based clinical decision-support tool to predict the risk of postoperative complications following cranioplasty. A set of nine features was selected for model development. Among the 15 algorithms evaluated, the random forest model demonstrated the best overall performance and was validated on data from both spatial and temporal external cohorts (AUROC = 0.949, internal cross-validation; 0.930, geographical validation; and 0.932, temporal validation). Analysis of causal effects of modifiable intraoperative variables on postoperative complications, with diverse counterfactual explanations and causal inference methods, including double machine learning and the T-learner framework, revealed a protective effect of subcutaneous negative-pressure drainage (ATE = -0.241) and titanium mesh (ATE = -0.191). Finally, we present the model as an accessible web-based tool for individualized, real-time clinical decision-making. These findings provide a practical framework for postoperative risk stratification and support the optimization of intraoperative decision-making in cranioplasty.

Introduction

Cranioplasty, the surgical repair of a skull defect, is a common follow-up to life-saving neurosurgical procedures. Despite its technical maturity, the procedure carries a high burden of complications, including infections, hemorrhages, and seizures. These complications significantly impair patient recovery and increase healthcare costs. Current clinical practice often relies on empirical judgment and reactive management. There is a critical need for tools that can predict high-risk patients preoperatively and suggest specific surgical adjustments to mitigate these risks.

Methods

The researchers developed a comprehensive pipeline to transition from raw data to actionable clinical support. The study utilized a multicenter dataset of 1,368 patients across three cohorts: a derivation cohort (n=789) for training and internal validation, a geographical external validation cohort (n=394), and a temporal external validation cohort (n=185).

Study workflow including data preparation, model development, and clinical application.

The methodology involved several key stages:

  • Feature Engineering: Consensus selection using four methods (Boruta, LASSO, RF-RFE, and Genetic Algorithms) narrowed 26 initial variables to 9 core predictors.
  • Model Selection: Comparison of 15 machine learning algorithms, with Random Forest emerging as the top performer based on AUC and Brier scores.
  • Causal Inference: Using Double Machine Learning (DML) and the T-learner framework, the team estimated the Average Treatment Effect (ATE) of specific surgical choices to identify causal protective factors.
  • Interpretability: SHAP values and Diverse Counterfactual Explanations (DiCE) were used to provide both global transparency and individualized "what-if" scenarios.

Results

The Random Forest model demonstrated exceptional predictive power, maintaining an AUROC > 0.93 across all validation cohorts. Baseline characteristics for these cohorts, including demographics and pre-operative conditions, are detailed below.

Baseline characteristics of the derivation and validation cohorts.

Key findings include:

  • Modifiable Risk Factors: The causal analysis identified two significant protective interventions: the use of titanium mesh (ATE = -0.191) and the implementation of subcutaneous negative-pressure (N-P) drainage (ATE = -0.241).
  • Risk Interaction: 3D partial dependence plots revealed that risk spikes exponentially when a low Glasgow Coma Scale (GCS) score coincides with a large skull defect and prolonged surgery time.
  • Clinical Tool: The final model was deployed as a public web-based application for real-time clinical use, allowing surgeons to input patient data and receive immediate risk stratification.

Discussion

This framework moves beyond simple correlation by identifying modifiable surgical variables that can actively reduce risk. For instance, N-P drainage was identified as a novel protective factor, likely due to its role in continuously evacuating blood and exudate that would otherwise lead to fluid collection or infection.

However, limitations remain. The study was conducted on a Chinese population, and further validation is required for broader demographic generalizability. Additionally, the model focuses on in-hospital complications and does not yet account for long-term post-discharge outcomes. Future work will aim to include larger datasets to compare a wider variety of synthetic and natural materials, such as autologous bone grafts.

Summary updated

BibTeX
@inproceedings{li2026causal,
  author = {Wenbo Li and Bao Wang and T. Li and Y. Ma and Haoyong Jin and Jiangli Zhao and Zhiwei Xue and Na Su and Yanya He and Jiaqi Shi and Xuchen Liu and Ling Li and Tianzi Wang and Jiwei Wang and C. Li and Can Yan and Yang Ma and Qichao Qi and Yu Guo and Weiguo Li and Bin Huang and Donghai Wang and Haoyu Wang and Yan Qu and Jian Wang and Tao Sun and Nan Yang},
  title = {{A Causal and interpretable machine learning framework for postcranioplasty risk prediction and surgical decision support}},
  booktitle = {Npj},
  year = {2026},
  doi = {10.1038/s41746-026-02370-6},
}
Figure