Machine learning and transformer models for prediction of postoperative pneumonia risk in patients with lower limb

Yiqun Chen1,2, Mingxuan Ma1, Dandan Qu3

  • 1Department of Respiratory and Critical Care Medicine, Affiliated Hospital of Nantong University, Medical School of Nantong University, Nantong, 226001, China.

Scientific Reports
|July 2, 2025
PubMed

Insights

Machine learning models like XGBoost and Transformer accurately predict postoperative pneumonia after lower limb fracture surgery. Early identification aids in preventing this common complication and improving patient outcomes.

Area of Science:

  • Orthopedics
  • Pulmonology
  • Data Science

Background:

  • Postoperative pneumonia is a common complication following lower limb fracture surgery.
  • It leads to extended hospital stays and increased mortality rates.
  • Early detection and prevention are vital for patient recovery.

Purpose of the Study:

  • To identify clinical indicators for predicting postoperative pneumonia in lower limb fracture patients.
  • To evaluate the efficacy of machine learning and deep learning models in forecasting pneumonia risk.

Main Methods:

  • A retrospective analysis of patients undergoing lower limb fracture surgery from 2016-2023.
  • Classification of patients into case (pneumonia) and control (no pneumonia) groups.
  • Application of machine learning (XGBoost) and deep learning (Transformer) algorithms for prediction.

Main Results:

  • Key predictors identified include Age, Gender, Fracture type, Venous Thromboembolism (VTE), Hypertension, Chronic Obstructive Pulmonary Disease (COPD), Cancer, Atrial Fibrillation, Cerebrovascular Disease, Hypoalbuminemia, Free Fatty Acid, Albumin, Albumin to Globulin Ratio, Calcium, Fibrinogen, D-dimer, Alcohol, Surgical Grade, and C-reactive Protein.
  • XGBoost achieved an AUC of 0.866 and F1 score of 0.807.
  • Transformer models demonstrated superior performance with an AUC of 0.946 and F1 score of 0.889.

Conclusions:

  • XGBoost and Transformer models show significant potential for predicting postoperative pneumonia in lower extremity fracture patients.
  • These models can aid in the early prevention and treatment strategies.
  • Implementing proactive health management can reduce the risk of postoperative pneumonia.

Related Concept Videos