Neural network-based prediction of atrial fibrillation at discharge following cardiac surgery
Abstract
Background Postoperative atrial fibrillation is a common complication after cardiac surgery, associated with both short- and long-term adverse effects. Persistent forms of postoperative atrial fibrillation lasting until hospital discharge are less frequent but clinically significant. Despite its impact, reliable prediction remains challenging. This study aimed to develop and evaluate machine learning models that integrate electrocardiographic and clinical variables to predict atrial fibrillation at discharge. Methods In this retrospective single-center study, 1,905 patients undergoing cardiac surgery were analyzed. Perioperative 12-lead electrocardiographic parameters and clinical variables were preselected using univariable logistic regression (p < 0.1). Various machine learning models, including neural networks, support vector machines, k-nearest neighbors' random forests, and Bayesian classifiers were trained, using 10-fold cross-validation and subsequently evaluated on an independent test set. A genetic algorithm was applied for variable selection, and a reject option was implemented to withhold uncertain predictions. Results Of 1,905 patients 2.2% were discharged in atrial fibrillation. The final neural network model yielded a 69.9% coverage rate, with 99.2% of all predictions being correct (95% CI: 98.6–99.6). Key predictors included age, CHADS2-VASc score, left ventricular ejection fraction, EuroSCORE II, cardiopulmonary bypass time, prior cardiogenic shock, perioperative atrioventricular block, and mitral valve surgery. Conclusion A machine learning model integrating perioperative electrocardiographic and clinical variables demonstrated robust performance in predicting the absence of atrial fibrillation at discharge, accurately identifying more than two thirds of patients. For the remaining patients, management continued to rely on clinical judgment. This approach offers a valuable tool for improved risk stratification and may facilitate the implementation of more targeted prophylactic strategies following cardiac surgery.