Introduction

Acute respiratory failure requiring mechanical ventilation (MV) is frequent within Intensive Care Unit (ICU) patients, and a large proportion of these patients will require MV for more than 24-h1. Although lifesaving, MV also causes numerous life-threatening complications. MV weaning and endotracheal extubation are a major challenge during the ICU stay and might be considered as soon as possible2. From the moment of endotracheal intubation, the clinician must consider two difficulties during the weaning decision process which are prolonging MV unnecessarily, or extubating the patient earlier, both associated with an inherent risk of increased morbidity and mortality3, 4. Indeed, the longer is the MV duration, the higher is the risk of baro-volotraumatic lesions, ventilator-associated pneumonia (VAP) or other infectious complications. Although fast discontinuation of MV is the primary goal, premature extubation is also associated with weaning failure and complications4, 5.

In some reports, weaning accounts for more than 40% of the total ventilation period. If 60% patients may experiment a simple weaning process of less than 24-h, weaning may be more difficult for the remaining 40% patients6, 7. If various strategies such as active weaning either using a once-daily trial of spontaneous breathing (SBT), pressure-support ventilation, or automated weaning has proven to reduce the weaning duration and the inherent MV complication rate, such a process remains too long and/or still uncertain in terms of outcome8,9,10,11,12. In addition, no difference has been shown in favour of one method over another in terms of both weaning test technique and weaning test duration13, 14. The protocolization of mechanical ventilation weaning is essentially that allows its application and success15, 16.

Indeed, in order to identify the best time for secure extubation, weaning should be considered by daily screening for objective clinical improvement criteria (pre-test probability of weaning). Several predictive factors of endotracheal reintubation have been assessed in previous studies (rapid-shallow breathing index [RR/Vt], MV duration, cough strength)17,18,19,20. However, all these indicators depicted insufficient sensitivity/specificity and other indicators are mandatory to improve our clinical decision robustness. While the discriminative capacity of a 30-min SBT seems important to predict extubation success, failure of endotracheal extubation still occurs (15 to 20%)21,22,23,24. Causes for MV weaning failure are complex, multifactorial and not only related to the patient’s respiratory status25,26,27.

Weaning from mechanical ventilation can be divided in 3 steps. The first is to look for objective criteria for weaning. The second is to perform a weaning test, and extubation is the last step.

Physiologically, heart rate and blood pressure vary during the respiratory cycle, corresponding to the activity of the autonomic nervous system (ANS).

Mechanical ventilation disturbs the intra-thoracic pressure regimes resulting from heart–lung interactions and thus their regulation28, 29. The influence of the ANS contributes to the respiratory sinus arrhythmia process and heart-rate variability (HRV)30, 31. Several studies have depicted significant HRV variations in patients under MV, especially while considering the weaning process, in an attempt to predict clinical evolution32,33,34,35. Transposed to mechanical ventilation weaning situations, the evaluation of these warning scores to predict the success of extubation and thus, limit the complications of prolonged mechanical ventilation or extubation failure might be of interest36.

The main objective of this project was to identify parameters associated with a successful weaning. The second objective was to create a predictive model for weaning success either during the pre-test and the SBT phases, while using artificial intelligence and machine-learning.

Material and methods

Study design

Data analysis was performed on the ReaSTOC database, which is an ongoing prospective physiological and biomedical signal data warehousing project including all consecutive patients admitted to our adult medical ICU (ClinicalTrials.gov identifier NCT02893462). A previous publication has described the design and conduct of the ReaSTOC study37. The protocol #29BRC18.0080 was approved on November the 5th 2019 by the local ethics committee of our institution (Comité d’Ethique du CHRU de Brest IRB #2018CE.27). Written informed consent was waived according to French legislation (Law n°2012–300 March 5th 2012 also called “Loi Jardé” https://www.legifrance.gouv.fr/eli/jo/2012/3/6), in accordance with the ethical standards of our local human experimentation review board and with the Helsinki Declaration of 1975.

Population

All patients included within the database and under MV for more than 24 h were considered eligible for weaning, according to a standardized protocol. A patient could be analyzed for several SBT during his ICU stay, if he had not experienced prior extubation; thus, only the first period of invasive MV was considered if endotracheal intubation was deemed necessary after an extubation failure.

Exclusion criteria were pregnancy, discontinuation of treatment (terminal extubation), participation decline by the patient or relatives, time of MV < 24 h, self-extubation, patients under legal protection or without social security, or patients with missing cardiac variability data.

Patients were classified in three groups according to their ventilation weaning difficulty, as proposed by the 6th international consensus conference3.

Group 1 – “simple weaning” included patients who successfully completed the first weaning test, followed immediately by extubation. In the literature, this group represents 69% of weaned patients and the prognosis is rather favorable with a 5% ICU mortality and a 12% in-hospital mortality.

Group 2 – “difficult weaning” included patients who achieved one to three SBT before extubation, within less than 7 days after the first attempt.

Group 3 – “prolonged weaning” included patients requiring more than 3 SBT, or less than 3 tests but within more than 7 days after the first attempt, before extubation. Within groups 2 and 3, ICU mortality is equal or higher than 25%6, 27.

Weaning protocol

According to a standardized protocol, established for years within our ICU16, the ability of a patient to perform a SBT (Pre-Test) was assessed daily by the nursing team while considering the above criteria: no sedation, no or low dose of inotropic or vasopressor treatment, adapted response to simple orders, FiO2 < 50% and PEEP ≤ 5cmH2O. If these conditions are met, the SBT is initiated by a ventilator disconnection and the use of a T-piece, for a maximal 30 min duration, using an oxygen flow rate adjusted to a predetermined SpO2 target.

Failure of the SBT was defined by signs of poor clinical tolerance including: respiratory rate (RR) > 35 cycles/min, SpO2 < 90%, change of > 20% in heart rate (HR) or blood pressure, sweating, agitation or consciousness disorders. If any of these conditions occurred, SBT was immediately stopped and the patient was re-placed under mechanical ventilation. If none of these conditions were observed and if the patient had an effective cough, the SBT was considered successful and the patient was extubated.

Successful MV weaning was defined as extubation after a successful SBT, without reintubation within 72 h.

Data collection

Demographic and physiological parameters, medical condition prior to ICU admission, length-of-stay and MV, as well as hemodynamic and respiratory data before, during and after the weaning test were collected for each patient. At the end of the weaning test, the decision whether or not to extubate was recorded and justified in the case of non-extubation or reintubation. Decisions to limit treatment or terminally extubate were specified and documented.

Weight balance was assessed at the time of SBT and considered as either negative (decrease in body weight since admission), neutral (same body weight as admission), or positive (increase in body weight since admission).

Body-Mass Index (BMI) was assessed on admission according to the actual patient’s height and weight. It was subsequently divided into 5 classes: low-weight-denutrition (BMI < 18.5 kg/m2), normal (BMI = 18.5–24.9 kg/m2), overweight (BMI = 25–29.9 kg/m2), obesity (BMI = 30–39.9 kg/m2), or morbid obesity (BMI > 40 kg/m2).

Continuous photoplethysmography (PPG) data were recorded 30-min prior to SBT, during SBT, and 30-min after extubation, at a 75 Hz frequency (Phillips Intellivue MP70 monitor) via the SYNaPSE extraction software (System for Nonintrusive Physiological Signal Exploration LTSI INSERM UMR 1099). Recording of PPG curves was used to perform HRV analysis, in the temporal (RMSSD, triangular index), frequency (VLF, LF, HF, LF/HF), and non-linear domains (SD1, SD2, SD2/SD1, Approximate—Sample and Shanon entropies). Such approach using plethysmogram has been validated within a prior study37, 38.

The respiratory parameter called Early-Warning Score Oxygen (EWSO2) was defined in the observational study by Viglino et al.39 and its variations during the weaning test were collected.

Statistical analysis

In the absence of an a priori hypothesis, no number of subjects was calculated and all available data were used for analysis. Results are presented as mean and standard deviation, unless specified otherwise. The comparison of quantitative variables in each group was performed using Student or Wilcoxon tests according to distribution’s normality, and qualitative variables were compared using Khi-2 or Fischer tests. Outcome independent predictors were identified by logistic regression; performance of these predictors for a specific cut-off value was determined while calculating the area under the receiving operating characteristics curve (AUC for ROC). Youden's J statistic (also called Youden's index) is a single statistic that captures the performance of a dichotomous diagnostic test. Its value ranges from −1 through 1 (inclusive), and has a zero value when a diagnostic test gives the same proportion of positive results for groups with and without the disease, i.e. the test is useless. A value of 1 indicates that there are no false positives or false negatives, i.e. the test is perfect.

Probability of an event for MV weaning was determined using Kaplan–Meier analysis.

All analysis were performed using R +  + (v1.5.03; Zebrys, Toulouse, France). A p-value equal or less than 0.05 was considered statistically significant.

Predictive models were developed by artificial intelligence and machine learning using the ZGPD model (TADA, MyDataModels, Biot, France), that uses evolutionary and genetic algorithms and symbolic regression. A model was obtained by search for associations between the variables among 40% of the iterations performed on the database. These associations of variables defining the model were subsequently tested on 30% of the data, and finally validated on the remaining 30% of the data.

The selection of the most relevant models among all those created was based on the global performance score of the model and its relevance to clinical practice. The global performance score reflects the strength of the model and is based on three statistical components: accuracy (ACC), Matthews correlation coefficient (MCC) and the area under the curve (AUC).

Results

The data from 108 patients were analysed, representing a total of 135 SBT recordings (Fig. 1). Patients’ physiological characteristics are reported within Table 1, and groups are compared according to the extubation status. No significant difference was depicted in between the 2 groups, except for body weight balance (p = 0.0007) and immunosuppression status (p = 0.007).

Figure 1
figure 1

Patients’ flow-chart. SBT: Spontaneous Breathing Test; MV: Mechanical Ventilation; EIT: Endotracheal Intubation; LOC: Lost of Contact; Success: Successful SBT and no reintubation within 72-h; Failure: failure of the SBT, or successful SBT but reintubation within 72-h.

Table 1 Patients’ physiological characteristics.

Table 2 reports the clinical and outcome parameters in between groups, while considering the extubation status. The causes for SBT failure were cardiovascular (68.4%), respiratory (28.1%), neurological (1.8%) and other (1.8%). The different interfaces used after extubation were either room air, O2 via nasal canula, high flow nasal oxygen (HFNO), or non-invasive ventilation (NIV). Oxygenation parameters evaluation before and during SBT highlights a lower EWSO2, SpO2 values and higher FiO2, RR and O2 flow rate during SBT (p < 0.01 for parameters assessed prior to SBT and p < 0.001 for parameters assessed during SBT). Outcomes were also different in between groups, according to the extubation status.

Table 2 Clinical and outcome parameters.

Table 3 depicts the spontaneous breathing tests outcome, reasons for failure which were mainly related to a post-extubation cardiovascular failure and mechanical ventilation weaning characteristics and strategies.

Table 3 Spontaneous breathing test outcome and weaning characteristics.

Table 4 depicts logistic regression used to identify independent parameters associated with extubation, after SBT, and extubation success at 72-h and Day-7. Parameters are presented with their best cut-off value, determined by ROC curves analysis.

Table 4 Independent outcome predictors identified by logistic regression.

Table 5 depicts ROC curves analysis enables to detect HRV parameters that may predict the probability for a never-weaned patient (SD2/SD1, Sample Entropy, Shanon Entropy).

Table 5 ROC curves characteristics for heart rate variability parameters and selected physiological characteristics in never-weaned patients.

A Kaplan Meier curve was designed, demonstrating the probability of extubation failure in the 72 h according to the ventilation weaning group (Fig. 2). It confirmed that the probability of reintubation was lower in the simple weaning group and significantly more riskyr for prolonged and difficult weaning groups, all the more as the length of stay increases.

Figure 2
figure 2

Kaplan–Meier Curve for weaning Probability according to the classification group. Weaning classification in 3 groups according to the Consensus definition clearly depicts weaning outcome3.

While using machine-learning, the best model to predicting extubation success at 72-h (no reintubation during the 3-days following SBT success and extubation) was composed of BMI on inclusion, P0.1 measured before the SBT, LF/HF before the SBT, and HR during the SBT (Global performance 70%; Accuracy 83%).

[https://viewer.mydatamodels.com/?modelId=9cb2556b-3b9a-49f4-adfa-2cb0690e367e].

This model is accessible in the “live predict” thumb index of the URL. Prediction can be obtained online while providing the values for the different parameters.

Discussion

The current work demonstrated that in a medical ICU patient population, the outcome of mechanical ventilation weaning was associated with the duration of mechanical ventilation, ICU and global hospital length-of-stay. The data-mining process enabled to detect independent hemodynamic and respiratory predictive factors for extubation success and to develop a dynamic predictive model using artificial intelligence. These results may suggest that a rather simple model assessing physiological status prior to weaning and clinical response to a SBT might predict with a good level of confidence the overall weaning outcome. The evaluation of HRV was also confirmed as a valuable tool for weaning prediction, when combined with other respiratory parameters.

Choosing the appropriate time for weaning a patient under MV is crucial in order to reduce risks related to either prolonged ventilator support and to avoid premature weaning3, 40,41. Rapid-Shallow Breathing Index (RSBI) and the outcome of a SBT based on respiratory parameters are the most commonly used methods3, even if various RSBI thresholds and sensibilities have been argued in various population42. Until now, no single appropriate predictor, especially those only focused on respiratory parameters can be used to accurately predict weaning outcome43.

While several authors did use artificial intelligence to develop prediction models44, few authors did integrate HRV analysis despite promising results either in adults and premature infants and the fact that it may reflect either heart–lung interaction and respiratory command45,46. In a pilot study, the team from Barcelona did recently promote the combination of HRV analysis to traditional respiratory parameters measured to improve weaning readiness32. The model that best predicts outcome at day-3 either combines physiological characteristics (BMI on admission), respiratory drive (P0.1) and HRV status (LF/HF) that may be considered as indicators for a severity evaluation of the pathological process and a very simple clinical evaluation of the response to SBT (HR). One could note that the most frequent cause for SBT failure within our database was considered to be related to a cardiovascular failure, which therefore make sense to monitor a simple cardiovascular function tolerance parameter such as the heart rate during the test. Most of these indicators can be assessed prior to the T-tube trial on a stabilized patient, which may thus secure either the SBT period and the subsequent endotracheal extubation period. In case of severity detection with the model, either delaying extubation, or a systematic use of prophylactic measures (HFNC or NIV) might be proposed if SBT was considered a success.

The interest of the present work relies on its originality and methodology. To the best of our knowledge, no similar study using a prospective data-warehousing project has ever been performed in the ICU environment. Using such an approach enables to collect numerous parameters without any a priori, and the final analysis of so many parameters is made possible by artificial intelligence algorithms. Moreover, the creation of dynamic predictive models by machine learning is also innovative, while after validation of the derivation process such models may subsequently be used easily in clinical routine, at the patients’ bedside on any laptop, or even smartphones. It may thus enable to promote an optimized and more personalized approach for MV weaning.

Principal component analysis and neural networking are some other popular machine-learning methods that enable to explore connexion and correlation in between various parameters types that cannot be assessed while using conventional statistical approaches. The machine-learning methods that were used herein, while aiming to achieve similar goals, are slightly different while they promote genetic and evolutionary algorithms, that as compared to the previous methods are intrinsically compact, mathematically simplified, uses less power and also enable the use of small sample sizes, thus making it valuable for healthcare and clinical bedside evaluations.

Another methodological question that raises from the results section is the difference between the final AI model and the independent predictors detected using logistic regression. Such difference is explained by the fact that evolutionary algorithms uses multiple iterations over the dataset (from at least 100 to 1000 iterations), each time changing the reference population, thus constructing a more important population of candidate solutions and possibly explaining final differences in between predictors. However, while initially constructing models, all independent predictors defined by logistic regression were combined with other parameters considered of interest from a clinical point of view.

The clinical application of these various models is actually under process within our ICU to validate their usability in a daily life situation as well as to evaluate their interest in terms of clinical practice and prognosis improvement. Additional parameters such as non-invasive tidal volume evaluation using a time-of flight camera will be analysed, thus combining RSBI calculation to other parameters.

Our study may have several limitations. The first one is the monocentric characteristic of our medical ICU population. A more diversified population will be mandatory, prior to generalization of the algorithms. The second one is the accessibility and availability of HRV monitoring within most ICUs. Despite the robustness and the generic calculation of these parameters, they are not yet available in routine practice, while raw data are accessible within most medical datafiles but fewly exploited. Moreover, prediction dynamic models such as the ones developed herein may be considered as useful at the bedside while they integrate multiple and continuous changes in the patients’ clinical status overtime47, even if they cannot entirely eliminate the deviation caused by external factors, nor then reduce the risk of applying false prediction to an individual level. A third limitation of this work is that the type of oxygen therapy support used during SBT and after the extubation period was not studied. Furthermore, while we are routinely using T-tube SBT, the RSBI was not routinely available for our patients.

Conclusion

If weaning from MV is a process well standardized within the general ICU population, uncertainty remains for several patients that will fail extubation. Various parameters have been studied within literature to predict extubation outcome. In this prospective datamining study, we were able to develop comprehensive dynamic models combining respiratory parameters to systemic ones. Further clinical studies will be mandatory to validate any clinical impact of such models on a clinical routine.