Machine Learning for Preoperative Transfusion Risk Prediction in Total Knee and Hip Arthroplasty
TT Tien, CY Chen, HE Tzeng, JH Lin, KM LuAbstract
Background
Unnecessary blood preparation before total knee arthroplasty (TKA) and total hip arthroplasty (THA) increases healthcare costs and resource burden. Accurate preoperative transfusion risk prediction can support clinical decision-making and optimise blood bank management.
Methods
We conducted a retrospective cohort study using real-world electronic health records from a tertiary medical centre in Taiwan (2020–2025). A total of 6,089 patients undergoing TKA (n = 4,311) or THA (n = 1,778) were included. Twenty-eight preoperative features were extracted, including haematological indices, demographic variables, comorbidities, and medication use. Four machine learning models (Logistic Regression, Random Forest, XGBoost, LightGBM) were trained using 5-fold stratified cross-validation on an 80% development set and evaluated on a 20% holdout set. Model calibration was assessed using the Hosmer-Lemeshow test. SHAP values were used to interpret feature contributions globally and by surgical subgroup.
Results
The overall transfusion rate was 18.7% (TKA: 15.3%; THA: 27.1%). LightGBM achieved the highest holdout AUROC (0.751; 95% CI: 0.714–0.787), with good calibration (Hosmer-Lemeshow p = 0.297), Brier Score of 0.128, and NPV of 0.891 at the Youden Index threshold. SHAP analysis identified preoperative haemoglobin (Hb), surgery type, and tranexamic acid (TXA) use as the top predictors. A non-linear relationship was observed: transfusion risk increased sharply when preop Hb fell below 12 g/dL.
Conclusions
An interpretable LightGBM model demonstrated reliable discrimination and calibration for perioperative transfusion prediction. The high NPV suggests this model can safely identify low-risk patients, potentially reducing unnecessary blood preparation in orthopaedic surgical settings.
Key messages
• A LightGBM model predicts perioperative transfusion risk in TKA/THA with an AUROC of 0.751 and NPV of 0.891, enabling safer reduction of unnecessary blood preparation.
• Preoperative haemoglobin, surgery type, and TXA use are the strongest predictors of transfusion; risk rises sharply when Hb falls below 12 g/dL.