Abstract
BACKGROUND: Bloodstream infection (BSI) contributed significant mortality among patients in the intensive care unit (ICU). Traditional machine learning (ML) models often struggle to effectively capture complex temporal dependencies in high-dimensional data. The aim of this study was to develop a deep learning model transformer in the prediction of ICU-acquired BSI based on time series data. METHODS: Patients' electronic health records, whose all blood cultures (BC) collected 48 h after admission to the ICU, were extracted from Medical Information Mart for Intensive Care IV (MIMIC IV). The synthetic minority over-sampling technique (SMOTE) was applied to balance the dataset. We collected age, gender, vital signs and laboratory measures for consecutive 24 h with 1 hour interval. We also set three prediction windows (0, 12 and 24 h) to investigate the ability of early detection of the ML. The performances of the transformer and the CatBoost were evaluated by discrimination and calibration. Shapley Additive exPlanation (SHAP) was employed to identify key features. RESULTS: A total of 2408 patients were included in the study, of which 149 (6.2%) had an ICU-acquired BSI. The transformer model outperformed CatBoost at all prediction windows. At the 24-hour window, the Transformer achieved an AUROC of 0.918 and an AUPRC of 0.915, while CatBoost performance declined significantly with earlier prediction. SHAP values suggested that glucose, bicarbonate, mean blood pressure, temperature and blood urea nitrogen were top five early predictors. CONCLUSION: The deep learning transformer using time series data demonstrates strong potential as a clinical decision support tool.