Applying a transformer architecture to intraoperative temporal dynamics improves the prediction of postoperative delirium

Commun Med (Lond). 2024 Nov 27;4(1):251. doi: 10.1038/s43856-024-00681-x.

Abstract

Background: Patients who experienced postoperative delirium (POD) are at higher risk of poor outcomes like dementia or death. Previous machine learning models predicting POD mostly relied on time-aggregated features. We aimed to assess the potential of temporal patterns in clinical parameters during surgeries to predict POD.

Methods: Long short-term memory (LSTM) and transformer models, directly consuming time series, were compared to multi-layer perceptrons (MLPs) trained on time-aggregated features. We also fitted hybrid models, fusing either LSTM or transformer models with MLPs. Univariate Spearman's rank correlations and linear mixed-effect models establish the importance of individual features that we compared to transformers' attention weights.

Results: Best performance is achieved by a transformer architecture ingesting 30 min of intraoperative parameter sequences. Systolic invasive blood pressure and given opioids mark the most important input variables, in line with univariate feature importances.

Conclusions: Intraoperative temporal dynamics of clinical parameters, exploited by a transformer architecture named TRAPOD, are critical for the accurate prediction of POD.

Plain language summary

Delirium manifests as confusion and a lack of awareness. Postoperative delirium is a severe medical complication that can occur after surgery. Currently, there is no specialized medical treatment available, but early detection can be useful to implement preventative measures. In this study, we applied various computational models to clinical data such as repeated blood pressure recordings. Data recorded during the first half of surgeries were most predictive for postoperative delirium. This information could be used to better focus preventative measures after surgery, such as transferring vulnerable patients to quieter wards facilitating recovery.