Clear Sky Science · en
A Causal and interpretable machine learning framework for postcranioplasty risk prediction and surgical decision support
Why predicting surgery risks matters
When a serious brain injury or stroke forces surgeons to temporarily remove part of the skull to save a patient’s life, a second operation—called cranioplasty—is later needed to repair the opening. Although this follow‑up surgery often restores both protection and appearance, it carries a surprisingly high chance of complications such as infection or fluid build‑up around the brain. The study summarized here asks a practical question: can we use hospital data and modern computer techniques to forecast which patients are most at risk, and even suggest safer ways to perform the operation?
Closing the skull, but not without danger
After a decompressive craniectomy—where a portion of the skull is removed to relieve dangerous pressure—the brain is left vulnerable. Cranioplasty restores the skull’s shape and can improve brain function and appearance, supporting recovery and confidence. Yet more than one in four patients develop problems afterward, including infection, bleeding, seizures, or pockets of air or fluid. These setbacks lengthen hospital stays, increase costs, and can undo hard‑won gains in recovery. Doctors know some risk factors from earlier research, but until now they have lacked reliable tools to predict complications for each individual patient.

Teaching computers to spot trouble early
To tackle this gap, researchers gathered detailed records from 1,368 patients who underwent cranioplasty at three large hospitals in China, spanning nearly a decade. They focused on information that would already be available before or during surgery—such as the patient’s level of consciousness, the size of the skull defect, time since the first operation, signs of infection or fluid around the brain, and technical choices made in the operating room. Using these data, they trained and compared 15 different machine‑learning methods, a family of algorithms that learn patterns from examples rather than relying on human‑written rules.
Through a careful feature‑selection process, the team identified nine key predictors that consistently carried the most information across several statistical methods. They then built models to estimate the chance of any complication, as well as separate models for specific problems like infection, fluid collection, seizures, or the need for a second operation. A random forest model—a technique that combines many decision trees—emerged as the best overall predictor, striking a strong balance between accuracy and reliability.
How well the digital risk scores worked
The researchers tested their main model not only on the original patient group, but also on patients from another hospital and on a later group treated in a different time period. In all cases, the model distinguished high‑ from low‑risk patients with impressive performance, correctly ranking patients in more than 93 out of 100 cases. It also remained accurate across age groups and for both men and women, and its predicted probabilities closely matched what actually happened. Separate models for individual complications also performed well, although they were less precise for rare events such as seizures or certain types of bleeding.

From prediction to changing the operation itself
Beyond simply labeling patients as high or low risk, the team wanted to know whether specific surgical choices could actually change those risks. Using tools from “causal” machine learning, they studied two decisions surgeons control during cranioplasty: whether to place a small negative‑pressure drain under the scalp to remove blood and fluid, and whether to use a titanium mesh plate instead of other artificial materials. Their analyses suggested that both the drain and titanium mesh were linked to noticeably fewer complications overall, especially in most age and sex groups. In some instances, virtual “what‑if” experiments showed that switching just one of these choices could turn a high‑risk case into a low‑risk one in the model’s eyes.
Turning complex math into a bedside aid
To make their work usable in busy hospitals, the authors packaged the models into a free web application. Clinicians can enter a handful of patient details and operative plans to obtain an instant estimate of overall and complication‑specific risks, along with explanations of which factors drive the prediction. For patients and families, this can support clearer conversations about the pros and cons of different surgical approaches. For surgeons, it offers a way to move beyond gut feeling toward data‑driven, individualized decisions. While further testing in other countries and long‑term follow‑up studies are still needed, this framework shows how carefully designed machine‑learning tools can both forecast surgical risks and point to concrete steps that may make brain surgery safer.
Citation: Li, W., Wang, B., Li, T. et al. A Causal and interpretable machine learning framework for postcranioplasty risk prediction and surgical decision support. npj Digit. Med. 9, 184 (2026). https://doi.org/10.1038/s41746-026-02370-6
Keywords: cranioplasty, postoperative complications, machine learning, surgical decision support, titanium mesh