Section 4 of 9
Materials and Methods
Qian Wang, Yu‐xiang Song, Xiao‐dong Yang, Jing‐wei Zhang, Rui‐zhe Sun, Xiao‐dong Wu, Ao Li, Jing‐sheng Lou, Hao Li, Yan‐hong Liu, Jun‐mei Xu, Di‐fen Wang, Qing‐ping Wu, Yu‐ming Peng, Yi‐qiang Chen, Jiang‐bei Cao, and Wei‐dong Mi · about 9 minutes
Study Design
This multicenter study used data from four centers in the development cohort. Federated learning was evaluated in a retrospective simulation setting, with the data partitioned according to center of origin. Initially, six different ML algorithms were trained and evaluated independently at each center using the corresponding training and internal validation sets. Their performance across the four centers was considered collectively to select a single common architecture for subsequent modeling, rather than selecting a different algorithm for each center. Using the selected MLP architecture, FLMs were then constructed and evaluated using 10‐fold cross‐validation. Subsequently, the trained FLMs were evaluated on the internal validation sets from each of the four centers. Because these internal validation sets informed architecture selection, the corresponding results were considered development‐stage evaluations, whereas the external validation cohort was completely held out for independent evaluation. Their performance was compared with the corresponding LLMs on the same validation sets to assess the advantages and limitations of FL relative to single‐center local models. Finally, CLMs were built by pooling data from all four centers. The predictive performance of the CLMs and FLMs was compared on both internal and external validation cohorts to evaluate model generalizability and practical applicability. This study design allowed us to leverage multicenter data while simulating privacy‐preserving collaboration and provided a comprehensive evaluation of the potential of FL in predicting postoperative complications in older patients.
Study Participants
Clinical data from older surgical patients (excluding cardiac and neurosurgical patients) were collected from five centers between April 2020 and April 2022. The development dataset included four centers: Chinese PLA General Hospital; The Second Xiangya Hospital of Central South University; Union Hospital, Tongji Medical College, Huazhong University of Science and Technology; and The Affiliated Hospital of Guizhou Medical University. Data from Beijing Tiantan Hospital, Capital Medical University, were used as the external validation dataset. This center was designated a priori before model development because it had the smallest eligible cohort, allowing the four larger institutional cohorts to be retained for model development.
The inclusion criteria were as follows: (1) age ≥ 65 years; (2) patients undergoing non‐cardiac, non‐neurosurgical surgery; and (3) surgery performed between April 2020 and April 2022. Patients were excluded if they underwent gastrointestinal endoscopy, had missing procedure names, had missing outcome data, had abnormal data values identified during data quality control, or had > 40% missing data across overall variables. In addition, variables with > 20% missing data across patients were excluded from model development.
Dataset Acquisition
Data regarding the preoperative and intraoperative parameters were collected. The basic characteristics of the patients obtained preoperatively from face‐to‐face interviews included age, sex, body mass index (BMI), education level, smoking, and alcohol consumption statuses; history of coronary heart disease, hypertension, diabetes, anemia, liver dysfunction, renal dysfunction, and malignant tumors; and metabolic equivalent (MET) score. The preoperative laboratory tests included measurements of the white blood cell (WBC) count and the hemoglobin, alanine aminotransferase (ALT), aspartate aminotransferase (AST), glucose, serum albumin, urea, serum creatinine, potassium (K), sodium (Na), and calcium (Ca) levels. Use of analgesics within 24 h before surgery was also recorded. The surgical department for each patient was noted. The intraoperative data included the surgery type, surgical site, malignant tumor surgery, surgical grade, surgical incision classification, number of surgical incisions, number of drainage tubes, estimated blood loss, surgical duration, urine volume, crystalloid volume, ASA classification, and anesthesia method. Intraoperative medication variables included the use of nonsteroidal anti‐inflammatory drugs (NSAIDs), benzodiazepines, ketamine, opioid analgesics, local anesthetics, ondansetron, tropisetron, dexamethasone, methylprednisolone, flurbiprofen, parecoxib, ketorolac, and opioid antagonists. Postoperative data included postoperative analgesia pump use, POD incidence, and AKI incidence. The postoperative analgesia variable indicated whether a postoperative analgesia pump was used or initiated at the end of surgery and was recorded before POD and AKI outcome ascertainment.
Definitions of Outcomes
POD was defined as the occurrence of delirium within 7 days after surgery, assessed using the 3‐Minute Diagnostic Interview for CAM‐defined Delirium (3D‐CAM).
AKI was defined as the occurrence of AKI within 7 days after surgery according to the Kidney Disease: Improving Global Outcomes guidelines. AKI was characterized by either an absolute rise in serum creatinine (sCr) levels ≥ 26.5 µmol/L within 48 h after surgery or a 1.5‐fold increase from the preoperative baseline sCr level within 7 days after surgery. The preoperative baseline sCr level was determined using the most recent measurement taken within 30 days before surgery.
Model Building Strategy
Data Preprocessing
After screening based on the inclusion and exclusion criteria, we used 80% of the data from each center for training and the remaining 20% for internal validation. For CLMs, the training sets from all four centers were combined into a single centralized training set, whereas the internal validation sets from the four centers were pooled into a single internal validation set. All subsequent data‐driven preprocessing steps were fitted using the training data only and then applied to the corresponding internal validation sets and the external validation cohort. We applied mean imputation for numerical variables and mode imputation for categorical variables as preliminary fill‐ins using the training data only. Subsequently, we trained a random forest (RF) regression model using the preliminarily filled training dataset to predict and re‐impute the missing values. After addressing the missing values, we standardized the numerical variables by removing the mean and scaling to unit variance, with scaling parameters estimated from the training data and then applied to the validation data. Moreover, we transformed the categorical variables into one‐hot encoding using an encoding scheme defined from the training data. Feature selection was conducted separately for the POD and AKI prediction tasks using only the pooled training data from the four development centers. Neither the center‐specific internal validation sets nor the external validation cohort was involved in this process. Feature importance was calculated on the corresponding pooled training dataset, and features with an importance value below 0.001 were removed. The resulting feature subset was then applied uniformly across all participating sites to ensure a consistent feature space before federated training. This centralized feature‐selection procedure was used to define a common feature space in the present retrospective simulation.
Owing to class imbalance, resampling was performed only on the training data. We first used the Synthetic Minority Over‐sampling Technique (SMOTE) to generate more minority class samples until a certain imbalance ratio was reached, which is the number of positive samples over negative samples. We then employed the edited nearest neighbor to remove noisy samples from the boundaries. Specifically, for the POD and AKI tasks, we set the imbalance ratio to 0.4:1.0.
Local Learning Models for Each Center
For comparison, as a baseline, we employed six ML models for local datasets to evaluate their performance in predicting postoperative complications in older adults. These models included MLP, LR, XGBoost, support vector classification (SVC), RF, and GBM.
To evaluate model performance across centers, ROC curves and AUC values were first calculated separately for each center using the corresponding predicted probabilities and true labels. The center‐specific ROC curves were then interpolated onto a common false positive rate grid and averaged to generate a mean ROC curve for each model across centers, from which the mean AUC was derived. Confidence intervals for the AUC were estimated using bootstrap resampling. The resulting average ROC curves and corresponding AUC values with confidence intervals were displayed in the same coordinate system to facilitate intuitive comparison of model performance across different methods.
FL Among Multiple Centers
To address data privacy concerns across centers while effectively training the models, we employed the following FL algorithms: FedAvg [45]: FedAvg updates the global model by training local models on different clients and aggregating their parameters. It enhances the generalization performance of the model while protecting data privacy.FedProx [46]: FedProx includes a regularization term during local training to constrain the differences between the local and global models, thereby improving the model stability and convergence speed.FedLSD [47]: FedLSD leverages global knowledge to guide local data and preserve global knowledge during local training to mitigate data heterogeneity issues. It improves model convergence without accessing client data.
The federated learning process was simulated by partitioning the development dataset according to center of origin and treating each partition as an individual client. Local model training and parameter aggregation were performed to emulate federated updating across centers. After a predefined number of local epochs, model parameters from each center‐specific partition were aggregated into a global model, and this process was repeated for multiple communication rounds. This design allowed us to evaluate the feasibility and predictive performance of federated learning in a multicenter setting without direct pooling of raw data.
Centralized Learning Models
To provide a reference benchmark for federated learning, CLMs were constructed by pooling the training data from the four development centers. The same preprocessing procedure, feature set, and MLP architecture used for federated learning were applied to the CLMs. Model performance was evaluated on the pooled internal validation cohort from the four development centers and on the independent external validation cohort. The CLMs were used as full‐variable reference models in the main performance comparison and in the sensitivity analyses.
Additional post hoc sensitivity and reduced‐variable benchmark analyses were performed separately for POD and AKI prediction using the corresponding centralized benchmark models. These reduced‐variable models were implemented within the centralized‐learning framework to quantify the incremental predictive value of the full perioperative feature set without introducing additional variability from federated aggregation strategies. For both POD and AKI prediction, we constructed two reduced‐variable models: a minimal model including only age and ASA classification, and a preoperative‐only model including presurgical variables only, such as demographics, comorbidities, BMI, ASA classification, preoperative MET score, and surgical department/site.
Evaluation Metrics
We comprehensively evaluated the performance of the ML models using several key metrics, including the AUC, accuracy, sensitivity (recall), and specificity, to assess their classification effectiveness and generalization capability from different perspectives. We also conducted DCA and calibration curve analysis of the internal and external validation datasets.
To obtain calibrated probabilities, beta calibration was fitted separately for each outcome and model using only the original, non‐resampled development training data. The resulting calibration parameters were fixed and applied without refitting to the internal and external validation cohorts. Calibration curves, calibration intercepts, calibration slopes, and Brier scores were calculated using these fixed beta‐calibrated probabilities. An intercept of 0 and a slope of 1 indicate ideal calibration, whereas a lower Brier score indicates lower overall probabilistic prediction error.
As the complexity of ML models increases, relying solely on evaluation metrics to measure the model performance is insufficient. Understanding the decision‐making process of models is crucial for ensuring their reliability and interpretability. Therefore, we introduced SHAP to support model interpretability [48]. By visualizing SHAP values, we aimed to interpret model behavior, identify influential predictors, and compare shared versus center‐specific feature importance patterns across centers and outcomes.
Statistical Analysis
All statistical significance tests were two‐sided, with significance defined as p < 0.05. Baseline table statistics were performed using R version 4.3.2 (R Foundation for Statistical Computing, Vienna, Austria). The ML models were constructed using Python version 3.8.13 (Python Software Foundation, Wilmington, DE, USA).