Abstract:
OBJECTIVE To construct a risk prediction model for hyperkalemia associated with analgesic and sedative drugs during the perioperative period based on the TabPFN model, and to identify key drug risk factors.
METHODS Clinical data of perioperative patients from a tertiary Grade-A hospital in Wuhan were retrospectively collected from July 2022 to November 2025. A total of 524 patients from January 2023 to November 2025 were divided into a training set and an internal validation set at a 3∶1 ratio, while 123 patients from the second half of 2022 served as an external validation set. The study incorporated 67 potential predictors, including baseline characteristics, laboratory tests, and detailed perioperative medication datae.g., nonsteroidal antiinflammatory drugs(NSAIDs), opioids, remimazolam. The TabPFN algorithm, based on the Transformer architecture, was employed for model fitting,with key factor screening conducted via RMSE DROPOUT of the DALEX methods.
RESULTS The TabPFN model demonstrated superior predictive performance in the internal validation set, with an Area Under the Receiver Operating Characteristic Curve(AUC) of 0.898 and an Area Under the Precision-Recall Curve(AUPRC) of 0.791. The calibration plot indicated a good fit between predicted probabilities and actual risks. Feature importance analysis revealed that, in addition to pathophysiological indicators such as serum creatinine, baseline potassium, and AKI stage, drug-related factors—specifically potassium-containing drugs, diuretics, remimazolam tosilate dosage, and non-steroidal anti-inflammatory drugs(NSAIDs)—contributed significantly to the risk of hyperkalemia. Notably, the dosage of remimazolam ranked highest among anesthesia/sedation-related risk factors.
CONCLUSION This study constructed a TabPFN-based risk prediction model for perioperative hyperkalemia and quantitatively assessed the pathogenic risks of drugs such as remimazolam tosilate and NSAIDs. The model exhibits favorable discrimination and robustness, and the findings can provide clinical pharmacists with a precise quantitative tool for personalized pharmaceutical care in complex perioperative settings.