Bayesian networks identify determinants of outcomes following cardiac surgery in a UK population
BMC Cardiovascular Disorders volume 23, Article number: 70 (2023)
Traditional risk stratification tools do not describe the complex principle determinant relationships that exist amongst pre-operative and peri-operative factors and their influence on cardiac surgical outcomes. This paper reports on the use of Bayesian networks to investigate such outcomes.
Data were prospectively collected from 4776 adult patients undergoing cardiac surgery at a single UK institute between April 2012 and May 2019. Machine learning techniques were used to construct Bayesian networks for four key short-term outcomes including death, stroke and renal failure.
Duration of operation was the most important determinant of death irrespective of EuroSCORE. Duration of cardiopulmonary bypass was the most important determinant of re-operation for bleeding. EuroSCORE was predictive of new renal replacement therapy but not mortality.
Machine-learning algorithms have allowed us to analyse the significance of dynamic processes that occur between pre-operative and peri-operative elements. Length of procedure and duration of cardiopulmonary bypass predicted mortality and morbidity in patients undergoing cardiac surgery in the UK. Bayesian networks can be used to explore potential principle determinant mechanisms underlying outcomes and be used to help develop future risk models.
Risk stratification models have been commonly used for objective comparison of treatment outcomes between different institutions. In recent years, they have been used more broadly to inform patients and health care professionals of peri-operative risk and direct resource allocation of healthcare . The focus of risk modelling in cardiac surgery has largely been on the ability to predict short-term mortality. Consequently, major morbidity remains unaccounted for in most risk scores. Mortality prediction alone is insufficient in determining surgical outcomes  which include complications such as stroke, acute renal failure, major bleeding requiring repeat surgical intervention as well as Deep Sternal Wound Infection and use of resources such as length of stay and transfusion requirements. The Society of Thoracic Surgeons (STS) risk score does identify several morbidity outcomes but has not been validated in a UK population for this purpose . Moreover, neither the European System for Cardiac Operative Risk Evaluation (EuroSCORE) nor the STS risk score include intra-operative factors such as duration of operation, cardiopulmonary bypass (CPB) nor aortic cross clamp times, all of which have been linked to increased mortality and morbidity rates [4,5,6].
Most risk stratification tools and previous studies investigating the surgical outcomes have analysed the outcomes of adult cardiac surgery using survival analysis or methods of regression analysis, including use of a propensity score for adjustment of confounders. However, such methods do not assess how patient demographics, co-morbidities, length of operation, severity of co-morbidities, clinical history, or type of operation relate to each other in the principle determinant process leading to a potential difference in outcome. In this paper, we build a Bayesian network for each of 4 key health outcomes; Death, New haemofiltration, New post-operative neurological deficit, and Return to theatre for thoracic bleeding or tamponade. We sought to understand whether machine learning can help identify significant variables associated with mortality and morbidity following adult cardiac surgery not accounted for in traditional risk modeling. Our purpose in this study was not to build a new predictive model but investigate for proof of concept whether Bayesian networks could be used to determine short term outcomes for adult cardiac surgery.
Data were collected from all adult patients who underwent cardiac surgery at the University Hospital of North Midlands NHS Trust between April 2012 and May 2019 (inclusive). Thoracic aortic and any ‘emergency’/‘salvage’ procedures data were excluded from the initial search of the database. We were interested in four primary outcome variables observed within 30 days of the operation: (1) Death, (2) New haemofiltration/dialysis (HF). (3) New post-operative neurological deficit, and (4) Return to theatre for thoracic bleeding or tamponade. Outcomes which are defined as ‘subjective processes of care/resource use’ such as: use of post operative inotropic/mechanical ventricular support, post-operative red blood cell transfusion and length of post operative stay are provided in the Additional file 1. Definitions of ‘elective’/‘urgent’ and the above outcomes are those specified by the National Institute for Cardiovascular Outcomes Research (NICOR) . Pre-operative variables are those specified by the EuroSCORE (ES) . ES was calculated via the Society for Cardiothoracic Surgery in Great Britain and Ireland (SCTS). Duration of operation (DOO) was defined as the length of time taken from ‘knife to skin’ until application of the final wound dressings. There were 182 patient records with inconsistencies or missing values in the original data set and so data from these patients were excluded from the study.
We used the machinery of Bayesian networks to identify the smallest subset of variables that could provide the necessary information for prediction of the outcomes of interest consistent with known, or possibly newly discovered logically consistent principle determinant relationships between the variables. Classical statistics methodology is inappropriate for this purpose . A Bayesian network is a graphical model used to estimate and visualise the inter-dependencies between variables whose distribution is fully specified via associated Markov blankets  which were painted in red for all adverse outcomes of interest for clarity of exposition. Bayesian networks are defined for categorical data and thus all continuous variables must be discretised which was achieved via k-means clustering algorithm  in the absence of scientific consensus regarding the universality of human-specified cut-offs. The search space for the network-learning algorithm was reduced by mandating that future events cannot be a principal determinant of past observations . This was achieved by assigning temporal values to all nodes. The analysis was undertaken using the BayesiaLab software [http://www.bayesia.com]. Continuous data were summarized via means and standard deviations in case the data followed the Gaussian distribution and by medians and interquartile ranges (IQR) otherwise. Normality was tested by means of Shapiro–Wilk test while the independence between variables was tested by means of Kendal rank correlation test. Significance was accepted at the 0.05 level. Further specification of the fundamental properties of Bayesian networks, details of discretization cut-offs, assignment of temporal values and network learning is presented in the Additional file 1. All statistical analysis was done in ‘R ‘statistical software tool [R Core Team, 2018].
The characteristics of the 4776 patients included in the study are shown in Table 1. 46.7% had an urgent procedure with 7.9% of patients requiring pre-operative nitrate/heparin use and only 0.2% (n = 11) requiring pre-operative inotropic support. The vast majority of patients had isolated Coronary Artery Bypass Grafting (CABG), with 2.4% of patients requiring CPB for procedures other than CABG ± valve procedures, such as excision of atrial myxoma or transvenous pacing wire removal. ES did not follow a Gaussian distribution (Shapiro–Wilk test, p < 0.001). Its mean was 2.3; median was 1.40 with IQR (0.60–3).
Table 2 summarises overall outcomes and shows mean DOO was 242 min with CPB mean time of 124.2 min. In general, CPB increased in proportion to the length of DOO. We observed that CPB and DOO did not follow a bivariate normal distribution (Shapiro–Wilk test, p < 0.001). Kendall rank correlation test demonstrated significant correlation (p < 0.01, τ = 0.56) between CPB and DOO.
The MB of the variable ‘Survival’ (patient status at discharge) (Fig. 1) consists only of the variable ‘Duration of Operation’. Hence, ‘survival’ is independent of all other variables given ‘Duration of Operation’. It follows that, in-patient mortality is only dependent upon the length of operation, which was a child of the CPB time and so indirectly influenced the mortality. ES was not found to predict survival in our study. Less than 1% of patients whose duration of operation was < 245 min died. Conversely, death rate for those patients whose operation lasted more than 421 min was 11.8%.
New neurological deficits (Fig. 2) were dependent on pre-surgery inotrope usage irrespective of previous neurological history, the presence of peripheral vascular disease or type of procedure. Twenty percent of patients requiring pre-operative inotropic support had a stroke or TIA, however this figure was < 1% for patients requiring no support. The MB for ‘Return to theatre for bleeding/tamponade’ (Fig. 3) was ‘cumulative CPB time’ alone. Thus, in particular, ‘Return to theatre for bleeding/tamponade’ was independent of age or nature of procedure.
‘New haemofiltration or dialysis’ (Fig. 4) was directly related to pre-operative severe renal dysfunction (as determined by creatinine clearance) and ES. Patients with an ES < 2.85 in the absence of severe renal dysfunction had a 1.3% probability of requiring post-operative HF. This rose to 7.4% if the ES was > 8.1. Presence of hypertension and DOO/CPB time did not directly, influence renal outcome.
In the present study, we applied Bayesian networks to investigate principle determinant relationships among pre/peri-operative factors and outcomes in adults undergoing cardiac surgery. Our use of machine learning techniques simultaneously illustrates many of the previously established relationships and offers a number of new ones. This includes establishing the importance of intra-operative variables such as DOO and CPB times to detect/predict adverse outcomes. Indeed, what matters is not exclusively the pre-operative morbidity of the patient.
Our results showed that DOO is linked to survival. Interestingly, ES was not associated with survival in this study as either a parent node or co-dependent of the parent node. In agreement with earlier studies, we show that risk of mortality increases significantly alongside CPB and operation times, as they are inevitably associated with a higher burden of myocardial injury and systemic inflammation despite judicious use of cardioplegia [4, 13]. Notably, Fig. 1 showed that mortality was independent of CPB use given duration of operation. That is to say if the duration of operation was known, the CPB time (by itself) was of no consequence in determining the probability of survival status. Although this does not negate the role CPB and AXC times play, it does invite the question of how prolonged anaesthesia affects myocardial function in the absence of CPB. In this vein, previous authors [14, 15] have suggested that surgical times under general anaesthesia, greater than 180–220 min were a risk factor associated with peri-operative cardiopulmonary complications or death. Studies have compared use of volatile and non-volatile anaesthetic agents on surgical outcomes for OPCAB procedures but not on duration of anaesthesia itself [16, 17]. None the less, long operative times may have had unforeseen technical challenges and a weakness of any predictive model (both Bayes and classic regression) would be its inability to differentiate between planned and unplanned processes of care, e.g., the length of an operation such as aortic valve replacement with synchronous 4 × coronary artery bypass grafts Vs coronary artery bypass grafts × 2 encountering technical complications.
Incidence of stroke and other neurological complications was principally associated with pre-operative inotrope use and unexpectedly had no direct relation to duration of operation or previous history of neurological disease or hypertension. This result should be interpreted with caution, as these factors may very well play a role. In this instance, the theory of Bayesian networks determines that if these factors are already known, then the use of pre-operative inotropic support is a stronger determinant of neurological outcome in our network. However, the ultimate reason for this association in our study remains unclear. Intriguingly, Almassi et al.  also noted the peri-operative use of inotropes as an independent risk factor for post-operative stroke (OR 1.55; CI 1.06–2.26; p 0.023). Similarly, a study of 11,825 patients undergoing CABG by Likosky et al.  found a five-fold increase of stroke rate associated with prolonged use of inotropes. We speculate that patients requiring pre-operative and intra-operative inotropes are pre-disposed to hypotensive episodes as a result of diminished cardiac output thereby triggering cerebral hypoxia.
Re-exploration for bleeding/cardiac tamponade was three times higher for CPB times > 212 min Vs < 99 min. Longer CPB times would encounter greater coagulopathy. One also must consider that longer procedures may also mean technically more challenging cases. Our findings reflect the works of both Moulton  and Vivacqua  who found CPB time to be an independent predictor of need for re-operation. However, this does discount the OPCAB cases in our cohort, one possible explanation is due to the low number, any incidence of re-exploration for bleeding in this cohort may have been deemed insignificant by the machine.
Our study has shown that although ES cannot be linked to mortality in our data, it predicted new renal replacement therapy, thereby endorsing previous studies. Both Chen et al.  and Toumpoulis et al.  have shown that ES has good discriminatory ability in predicting post-operative renal failure. Biancari et al.  in a study of over 1000 patients showed that ES was good at predicting post-operative renal failure requiring dialysis as well as post-operative length of stay. Also like our study, Muralidhar et al.  found pre-operative renal impairment to be a strong predictor of HF. It is likely that such patients have chronically reduced glomerular perfusion pressure which is then augmented by surgery and cardiopulmonary bypass.
It is reassuring that machine generated outcomes in cardiac surgery can confirm established principle determinant associations as well as uncover potential new areas of research. The application of artificial intelligence, in this case of a Bayesian network, to medical decision making has been adopted in several branches of medicine but has so far remained unusual in cardiac surgery [26, 27]. Such methods can be used to form their own predictive models . While this is beyond the scope of this paper, we have identified the variables ‘Duration of Operation’ and ‘CPB Time’ as having significant impact on several post-operative outcomes.
We hope identification of such variables including intra-operative factors can be used in future studies to develop algorithms to predict not only mortality but also morbidity outcomes for adult cardiac surgery. Previous studies have shown CPB duration to be a very strong independent predictor of post-operative morbidity and mortality , yet current popular risk stratification tools in cardiac surgery do not use intra-operative variables to calculate outcomes. We believe a future risk stratification model which utilises preoperative as well as perioperative variables (which may be static in their nature but derived from identification of the most significant dynamic factor) would generate a more refined and accurate risk tool. Indeed, the variable pool will be enlarged and thus one would be more likely to create and validate predictive models with superior measures of predictive performance such as accuracy upon rigorous cross validation procedures. Finally, these models would have the advantage of being based on principle determinant pathways which is highly relevant in clinical applicability . Use of intra-operative variables is not a novel concept in surgery  but remains elusive from ES and the STS risk calculator.
Several outcomes of interest such as use of post operative blood products, inotropic and mechanical ventricular support were not considered primary clinical outcomes due to the subjective variability of planned/unplanned processes of care. The MB for these outcomes is included in the Additional file 1. Derivation of an evolved risk stratification tool therefore would limit its applicability only to definitive endpoints of care (e.g., death, stroke, renal failure). Application to other outcomes such as Deep Sternal Wound Infection (DSWI), would require standardised protocol management, a larger study population and longer follow up.
However, our study has shown a proof of concept that Bayesian networks created via machine learning can be used to identify relevant determinants of short-term outcomes in adult cardiac surgery. It is our hope the information presented in this paper will stimulate debate for others to consider the importance of both pre- and intra-operative factors for future risk stratification models of adult cardiac surgery (Additional file 2: Figure S1, Additional file 3: Figure S2, Additional file 4: Figure S3, Additional file 5: Figure S4).
Our study is a single-institutional retrospective study, which limits the generalizability of results. The reported morbidity is in-patient only and we do not have longer term follow up data. The number of deaths, CVA and DSWI that were observed were very small and a larger study population may infer different results. Cause of death is unknown and therefore does not allow further scrutiny. Our cohort had heterogeneous operations and so our results are difficult to interpret for specific operations or practical applications. However, our results indicate that operative and CPB times were the most influential factor on several outcomes despite the nature of operation. Data on any technical issues encountered during a procedure, which may have lengthened CPB, and AXC time is lacking and could have a high association with the negative outcomes that influence Bayesian modelling. We do not have data on several clinically relevant variables, which may have influenced our results. Furthermore, our data is confounded because of insufficient detail in the data sample, for example, our analysis does not measure the mode of myocardial protection for each procedure: in our study, there was an amalgamation of OPCAB; cold antegrade/retrograde blood cardioplegia (± ‘hotshot’ technique) and intermittent cross clamp fibrillation. In the absence of randomized data, causality cannot be inferred from our MB alone. Finally, our study of pre-operative variables was focused on those routinely captured to calculate ES and ignored other significant pre-operative factors such as frailty status  and serum albumin concentration .
In summary, we present the first use of machine learning Bayesian networks to determine outcomes of interests in adult cardiac surgery in a UK population. We found intra-operative factors, were the most prominent variables associated with survival and return to theatre for bleeding. We hope that use of such machine learning techniques can be used in larger samples to develop predictive risk models in the future.
Availability of data and materials
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.
Heijmans JH, Maessen JG, Roekaerts PM. Risk stratification for adverse outcome in cardiac surgery. Eur J Anaesthesiol. 2003;20(7):515–27.
Chong CF, Li YC, Wang TL, Chang H. Stratification of adverse outcomes by preoperative risk factors in coronary artery bypass graft patients: an artificial neural network prediction model. In: AMIA annual symposium proceedings. 2003:160–4.
Kirmani BH, Mazhar K, Saleh HZ, Ward AN, Shaw M, Fabri BM, et al. External validity of the Society of Thoracic Surgeons risk stratification tool for deep sternal wound infection after cardiac surgery in a UK population. Interact Cardiovasc Thorac Surg. 2013;17(3):479–84.
Salis S, Mazzanti VV, Merli G, Salvi L, Tedesco CC, Veglia F, et al. Cardiopulmonary bypass duration is an independent predictor of morbidity and mortality after cardiac surgery. J Cardiothorac Vasc Anesth. 2008;22(6):814–22.
Sirvinskas E, Andrejaitiene J, Raliene L, Nasvytis L, Karbonskiene A, Pilvinis V, et al. Cardiopulmonary bypass management and acute renal failure: risk factors and prognosis. Perfusion. 2008;23(6):323–7.
Iino K, Miyata H, Motomura N, Watanabe G, Tomita S, Takemura H, et al. Prolonged cross-clamping during aortic valve replacement is an independent predictor of postoperative morbidity and mortality: analysis of the Japan Cardiovascular Surgery Database. Ann Thorac Surg. 2017;103(2):602–9.
National Institute for Cardiovascular Outcomes Research. Datasets and user guides 2018, April 12. http://www.ucl.ac.uk/nicor/audits/adultcardiac/datasets
euroscore.org. euroSCORE interactive calculator 2019, May 19. http://euroscore.org/calc.html
Leinweber DJ. Stupid Data Miner Tricks: Overfitting the S&P 500 data. The Journal of Investing. 2007;16(1):15–22.
Pearl J. Probabilistic reasoning in intelligent systems: networks of plausible inference, vol. 236. San Mateo, CA: Morgan Kaufmann Publishers; 1988. p. 552.
Steinhaus H. Sur la division des corp materiels en parties. Bull Pol Acad Sci Math. 1956;1:801–4.
McCracken JM. Explanatory causal analysis with time series data synthesis. Lectures on data mining and knowledge discovery. Series Editors: Jiawen Han, Lise Getoor, Wei Wang, Jahannes Gehrke, Robert Gros-saman. San Rafael: Morgan and Claypool Publishers; 2016.
Liakopoulos OJ, Kuhn EW, Choi YH, Chang W, Wittwer T, Madershahian N, et al. Myocardial protection in cardiac surgery patients requiring prolonged aortic cross-clamp times: a single-center evaluation of clinical outcomes comparing two blood cardioplegic strategies. J Cardiovasc Surg (Torino). 2010;51(6):895–905.
Reich DL, Bennett-Guerrero E, Bodian CA, Hossain S, Winfree W, Krol M. Intraoperative tachycardia and hypertension are independently associated with adverse outcome in noncardiac surgery of long duration. Anesth Analg. 2002;95(2):273–7.
Allen BT, Anderson CB, Rubin BG, Thompson RW, Flye MW, Young-Beyer P, et al. The influence of anesthetic technique on perioperative complications after carotid endarterectomy. J Vasc Surg. 1994;19(5):834–42.
Guarracino F, Landoni G, Tritapepe L, Pompei F, Leoni A, Aletti G, et al. Myocardial damage prevented by volatile anesthetics: a multicenter randomized controlled study. J Cardiothorac Vasc Anesth. 2006;20(4):477–83.
Tritapepe L, Landoni G, Guarracino F, Pompei F, Crivellari M, Maselli D, et al. Cardiac protection by volatile anaesthetics: a multicentre randomized controlled study in patients undergoing coronary artery bypass grafting with cardiopulmonary bypass. Eur J Anaesthesiol. 2007;24(4):323–31.
Almassi GH, Sommers T, Moritz TE, Shroyer AL, London MJ, Henderson WG, et al. Stroke in cardiac surgical patients: determinants and outcome. Ann Thorac Surg. 1999;68(2):391–7.
Likosky DS, Leavitt BJ, Marrin CA, Malenka DJ, Reeves AG, Weintraub RM, et al. Intra- and postoperative predictors of stroke after coronary artery bypass grafting. Ann Thorac Surg. 2003;76(2):428–34.
Moulton MJ, Creswell LL, Mackey ME, Cox JL, Rosenbloom M. Reexploration for bleeding is a risk factor for adverse outcomes after cardiac operations. J Thorac Cardiovasc Surg. 1996;111(5):1037–46. https://doi.org/10.1016/s0022-5223(96)70380-x.
Vivacqua A, Koch CG, Yousuf AM, et al. Morbidity of bleeding after cardiac surgery: is it blood transfusion, reoperation for bleeding, or both? Ann Thorac Surg. 2011;91(6):1780–90. https://doi.org/10.1016/j.athoracsur.2011.03.105.
Chen SW, Chang CH, Fan PC, et al. Comparison of contemporary preoperative risk models at predicting acute kidney injury after isolated coronary artery bypass grafting: a retrospective cohort study. BMJ Open. 2016;6(6): e010176.
Toumpoulis IK, Anagnostopoulos CE, Swistel DG, DeRose JJ Jr. Does EuroSCORE predict length of stay and specific postoperative complications after cardiac surgery? Eur J Cardiothorac Surg. 2005;27(1):128–33.
Biancari F, Vasques F, Mikkola R, Martin M, Lahtinen J, Heikkinen J. Validation of EuroSCORE II in patients undergoing coronary artery bypass surgery. Ann Thorac Surg. 2012;93(6):1930–5.
Muralidhar K, Bhagyashri K, Guptha R, Hegde N, Ahmed I, Vincent L. Determinants of renal replacement therapy after adult cardiac surgery. Asian Cardiovasc Thorac Ann. 2013;21(5):533–8.
Ashby D. Bayesian statistics in medicine: a 25-year review. Stat Med. 2006;25(21):3589–631.
Eom J-H, Kim S-C, Zhang B-T. AptaCDSS-E: a classifier ensemble-based clinical decision support system for cardiovascular disease level prediction. Expert Syst Appl. 2008;34(4):2465–79.
Loghmanpour NA, Kanwar MK, Druzdzel MJ, Benza RL, Murali S, Antaki JF. A new Bayesian network-based risk stratification model for prediction of short-term and long-term LVAD mortality. ASAIO J. 2015;61(3):313–23.
Elwood M. The importance of causal relationships in medicine and health care. In: Critical appraisal of epidemiological studies and clinical trials, 4th edn. Oxford Medicine Online. 2017. https://doi.org/10.1093/med/9780199682898.003.0002
Prytherch DR, Whiteley MS, Higgins B, Weaver PC, Prout WG, Powell SJ. POSSUM and Portsmouth POSSUM for predicting mortality. Physiological and Operative Severity Score for the enUmeration of Mortality and morbidity. Br J Surg. 1998;85(9):1217–20.
Sepehri A, Beggs T, Hassan A, Rigatto C, Shaw-Daigle C, Tangri N, Arora RC. The impact of frailty on outcomes after cardiac surgery: a systematic review. J Thorac Cardiovasc Surg. 2014;148(6):3110–7.
Koertzen M, Punjabi PP, Lockwood GG. Pre-operative serum albumin concentration as a predictor of mortality and morbidity following cardiac surgery. Perfusion. 2013;28(5):390–4.
No funding to declare.
Ethics approval and consent to participate
There was no direct patient involvement hence ethics approval was not needed, local approval was sought from the trust audit department at University Hospitals North Midlands NHS Trust. Moreover, informed consent was not required as there was no direct involvement of human participants, in accordance with local trust guidelines. All reporting on human data was done in accordance with data protection acts (2018) and local trust protocols were followed to ensure proper handling of patient data. All methods were carried out in accordance with relevant guidelines and regulations.
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Figure S1. Bayesian Network Graph with MB for the variable ‘Post-operative red blood cell transfusion’.
Figure S2. Bayesian Network Graph with MB for the variable ‘post-operative ventricular support’.
Figure S3. Bayesian Network Graph with MB for the variable ‘post-operative length of stay’.
Figure S4. Bayesian Network Graph with MB for the variable ‘Deep Sternal Wound Infection’.
About this article
Cite this article
Mazhar, K., Mohamed, S., Patel, A.J. et al. Bayesian networks identify determinants of outcomes following cardiac surgery in a UK population. BMC Cardiovasc Disord 23, 70 (2023). https://doi.org/10.1186/s12872-023-03100-6