Introduction

Chronic, high-burden right ventricular pacing (RVP) has detrimental effects on cardiac structure and function and is associated with an increased risk of adverse outcomes regardless of the pre-implantation left ventricular (LV) systolic function1,2,3,4,5,6. If also accompanied by a decline in LV systolic function compared to baseline and no alternative trigger can be identified, this condition is termed pacing-induced cardiomyopathy7. Although the underlying pathophysiologic mechanisms have not been fully elucidated yet, it has been presumed that inter- and intra-ventricular dyssynchrony are the primary culprits7,8. RVP fundamentally perturbs electrical activation (i.e., the activation pattern becomes similar to the one seen in patients with left bundle branch block)9, leading to impaired mechanical contraction10,11, which then results in abnormal myocardial metabolism, altered regional perfusion, increased fibrosis, functional mitral regurgitation, reduced cardiac output, and increased filling pressures7,8,12,13,14. By ameliorating the extent of dyssynchrony, upgrading to cardiac resynchronization therapy (CRT) may reverse the deleterious consequences of RVP, even after very long periods of RVP15,16,17,18. Importantly, patients with no history of ventricular arrhythmias (VAs) and an LV ejection fraction (LVEF) of ≤ 35% fall also under the indications for implanting an implantable cardioverter-defibrillator (ICD) for primary prevention19. Nevertheless, it is still challenging to determine which patients would exhibit an additional benefit from upgrading to a CRT-defibrillator (CRT-D) in lieu of a CRT-pacemaker (CRT-P).

The current pacing guidelines of the European Society of Cardiology (ESC) provide recommendations and guidance to aid physicians in choosing between a CRT-D and a CRT-P20. Nevertheless, these were primarily intended for facilitating the selection of the optimal device in patients undergoing de novo CRT implantation, and as shown by the European CRT Survey II and several other studies, patients referred for CRT upgrade differ from those referred for de novo CRT implantation21,22,23. Thus, further evidence is required to determine whether clinical characteristics and risk factors should be considered with the same weight in the risk assessment and device selection of candidates for CRT upgrade as for de novo CRT implantation. Given the complexity of risk stratification and optimizing device selection, novel data analysis techniques, such as topological data analysis (TDA) and machine learning (ML), could play a pivotal role in these tasks as they are aptly suited for the integrated and personalized assessment of risk profiles24,25,26,27.

Accordingly, we sought to apply TDA to identify phenogroups of patients with previously implanted pacemakers (PMs) and no history of VAs, in whom upgrading to a CRT-D is associated with better long-term survival than upgrading to a CRT-P. We also trained ML classifiers to enable the classifications of new patients into the identified phenogroups, hence facilitating the selection of CRT upgrade candidates who would benefit from choosing a CRT-D over a CRT-P device.

Methods

Study cohort, data collection, and ethical approval

We retrospectively identified patients with conventional PMs who were referred for a CRT-P or CRT-D upgrade at the Heart and Vascular Center of Semmelweis University (Budapest, Hungary) between December 2001 and August 2020. Patients with a previously implanted ICD device or a history of VAs were excluded. CRT upgrade procedures were performed as per guidelines. The new LV lead was implanted via subclavian venous access, preferably into the lateral, posterolateral, or posterior tributary of the coronary sinus, as described previously by our research group28. In case the implantation of the LV lead was not feasible into any of the coronary sinus branches, transeptal lead implantation was performed29. For each patient, pre-upgrade clinical characteristics (i.e., demographics, medical history, cardiovascular risk factors, physical status, currently applied pharmacological therapy, electrocardiographic, echocardiographic, and laboratory results) were retrieved from the electronic medical records system of Semmelweis University.

The study was performed in accordance with the principles outlined in the Declaration of Helsinki. The Regional and Institutional Committee of Science and Research Ethics of Semmelweis University approved the study protocol (approval No. 161-0/2019) and waived the requirement for informed consent due to the retrospective nature of the study.

Outcome of interest

Outcome data [status (dead or alive), date of death] were obtained for all patients by querying Hungary’s National Health Insurance Database in May 2021. The primary endpoint of our study was death from any cause, and the time to death was measured from the date of the upgrade procedure. Right censoring was applied if a patient (1) was still alive 10 years after the upgrade procedure, (2) had a subsequent CRT-D upgrade after being upgraded to a CRT-P device, or (3) underwent heart transplantation.

Topological data analysis

TDA can be perceived as an unsupervised ML framework that creates compact and interpretable visual representations of high-dimensional datasets. The key idea behind TDA is that tools of shape analysis can be used to identify and connect data points (e.g., patients) with similar characteristics in a multi-dimensional space and then plot the data as a two-dimensional topological network. The generated network consists of nodes (representing collections of similar patients) connected by edges (i.e., lines between two nodes) if they have at least one patient in common. Networks can be color-coded based on the outcome of interest to gain insight into the data. Two input parameters are required to construct a topological network: (1) a distance metric, which measures the similarity between data points, and (2) one or more lenses, which are filter functions describing the data distribution. Before generating a topological network, the gain (which controls the number of nodes) and resolution (which controls the number of edges) must be defined for each lens.

In this study, we used 16 features to generate the topological network: age, sex, type of the implanted device (CRT-P or CRT-D), New York Heart Association (NYHA) functional class, history of atrial fibrillation (AF), history of hypertension, history of diabetes mellitus (DM), etiology of heart failure (HF), history of myocardial infarction, history of percutaneous coronary intervention, history of coronary artery bypass graft surgery, serum creatinine, glomerular filtration rate (GFR), LVEF, and LV end-diastolic and end-systolic diameters. Missing values of the features were replaced using mean imputation, and then features were Z-score transformed. We applied normalized correlation as the distance metric with two multi-dimensional scaling lenses (with a resolution of 25 and a gain of 2.1, both equalized). Patients placed into nodes not connected to the main network (n = 36) were considered outliers and were omitted from the further steps of the analysis.

After the topological network was created, we wanted to divide it into regions with different clinical characteristics and risks of all-cause mortality. To this end, we first performed community autogrouping using the Louvain method to find the best possible grouping of nodes with high intra-group but low inter-group connectivity30. With this algorithm, we generated 14 autogroups, which were then sorted based on the survival rate of their members to identify groups with the lowest and the highest mortality rates. Next, each group was merged with an adjacent group exhibiting the most similar mortality rate. This step was repeated multiple times until three phenogroups (i.e., low-, intermediate-, and high-risk phenogroups) with a nearly equal number of patients were created (Supplementary Fig. 1). Due to the inherent nature of TDA, the phenogroups overlapped partially (i.e., 5 patients belonged to two phenogroups). However, this phenomenon does not violate any assumptions or requirements of the statistical tests used for subgroup comparisons.

TDA and autogrouping were performed using the EurekaAI Workbench (version 3.1.0, SymphonyAI, Palo Alto, California, USA) and the EurekaAI Python SDK (version 3.1.0, SymphonyAI, Palo Alto, California, USA).

Machine learning models for classifying new patients into the TDA-derived phenogroups

To provide a solution for classifying new patients into the TDA-derived phenogroups, we assigned each patient to one of the three groups based on their location in the topological network and used this labeled data to train several different multi-class classifiers. For training and evaluating such classifiers, we customized our previously published ML framework that was originally designed for binary classification31. Training and internal validation were performed using nested cross-validation (with a 5-fold inner cross-validation loop for hyperparameter tuning and a 5-fold outer cross-validation loop for model selection and evaluation), resulting in an ensemble of 5 classifiers that can be applied to the data of new patients. Balanced accuracy was used as the scoring metric, and we also calculated accuracy, micro- and macro-averaged precision, recall, F1 scores, and areas under the receiver operating characteristic curve (AUCs).

The ensemble model exhibiting the best performance during internal validation was also tested in an additional cohort of 29 patients who underwent a CRT upgrade procedure at the Cardiac Electrophysiology Division of the Department of Internal Medicine of University of Szeged (Szeged, Hungary) between September 2005 and August 2020. Outcome data were obtained by querying Hungary’s National Health Insurance Database in August 2023. The study protocol was approved by the Human Investigation Review Board of the University of Szeged (approval No. 4681), with a waiver of informed consent due to the retrospective nature of the study.

ML analysis was performed in Python (version 3.9.13, Python Software Foundation, Wilmington, Delaware, USA). The source code and the best-performing ensemble model are publicly available on GitHub (https://github.com/tokmarton/crt-upgrade-risk-stratification).

Statistical analysis

Continuous variables are expressed as mean ± standard deviation or median (interquartile range). The characteristics of the CRT-D and CRT-P upgrade groups were compared using unpaired Student’s t-test or Mann–Whitney U test (for continuous variables) and Chi-squared or Fisher’s exact test (for categorical variables), as appropriate. The characteristics of the three TDA-derived phenogroups were compared in a pairwise manner using the Kolmogorov–Smirnov test (for continuous variables) and Chi-squared or Fisher’s exact test (for categorical variables), as appropriate. The survival of subgroups and phenogroups was visualized using Kaplan–Meier curves, and log-rank tests were performed for comparison. Follow-up duration was estimated using the reverse Kaplan–Meier method, and mortality was calculated based on Kaplan–Meier estimates. Univariable and multivariable Cox proportional hazards models were used to compute hazard ratios (HRs) with 95% confidence intervals (CIs). A 2-sided p-value of < 0.05 was considered statistically significant. All statistical analysis was performed in R (version 4.1.2, R Foundation for Statistical Computing, Vienna, Austria).

Results

Baseline clinical characteristics of the study cohort

Between December 2001 and August 2020, 611 patients underwent CRT upgrade procedures at the Heart and Vascular Center of Semmelweis University. After excluding those with a previously implanted ICD device (n = 224) or a history of VAs (n = 116), the final study cohort included 326 patients, from whom 117 (36%) were upgraded to a CRT-D and 209 (64%) to a CRT-P. The median time between the initial PM implantation and the upgrade procedure was 5.5 (2.2–8.9) years. Before the CRT upgrade procedure, 34 (10%) patients had a VDD, 132 (41%) a VVI, and 160 (49%) a DDD PM. The median RVP rate was 97% (77–100%). During the period with chronic RVP, LVEF decreased by 20 (10–24) percentage points.

The baseline clinical characteristics of the CRT-D and CRT-P upgrade patients are presented in Table 1. Patients upgraded to a CRT-D device were more likely to be males (p = 0.011) and had higher GFR (p = 0.036), whereas loop diuretics were administered less frequently (p = 0.004) in this group than in the CRT-P upgrade group.

Table 1 Clinical characteristics of the study cohort.

Survival of CRT-D vs. CRT-P upgrade patients

Over the median follow-up of 6.0 (3.7–8.9) years, 178 (55%) patients died in our cohort. Seven (2%) patients with CRT-P had a subsequent CRT-D upgrade, and 2 (1%) patients underwent heart transplantation during the follow-up period. Based on Kaplan–Meier estimates, 5- and 10-year mortality were 49 (43–55)% and 74 (66–80)% in the entire cohort, 35 (23–45)% and 52 (21–71)% in patients upgraded to a CRT-D, and 54 (47–61)% and 78 (70–84)% in those who underwent a CRT-P upgrade, respectively. Upgrading to a CRT-D was associated with a lower risk of all-cause death than upgrading to a CRT-P based on univariable (unadjusted HR: 0.551; 95% CI 0.376–0.809; p = 0.002) and multivariable Cox regression analysis (adjusted HR: 0.516; 95% CI 0.332–0.804; p = 0.003) as well (Fig. 1, Table 2). Besides the device type, male sex (HR: 2.045; 95% CI 1.209–3.460; p = 0.008) and loop diuretics (HR: 1.785; 95% CI 1.061–3.001; p = 0.029) were also found to be independent predictors of all-cause death in multivariable Cox regression analysis (Table 2).

Figure 1
figure 1

Kaplan–Meier curves depicting the survival of patients upgraded to a CRT-D vs. those upgraded to a CRT-P. Univariable and multivariable Cox proportional hazards models were used to compute hazard ratios with 95% confidence intervals. Besides the type of the implanted device (CRT-D or CRT-P), the multivariable model included the following covariates: age (at the time of the upgrade procedure), sex, history of atrial fibrillation, etiology of heart failure, serum creatinine, left ventricular ejection fraction, angiotensin-converting enzyme inhibitors or angiotensin receptor blockers, and loop diuretics. CI confidence interval, CRT cardiac resynchronization therapy, CRT-D cardiac resynchronization therapy-defibrillator, CRT-P cardiac resynchronization therapy-pacemaker, HR hazard ratio.

Table 2 Predictors of all-cause mortality.

We also wanted to investigate whether upgrading to a CRT-D is associated with better survival than upgrading to a CRT-P in different subsets of patients. To this end, patients were split into subgroups based on HF etiology (ischemic and non-ischemic), age (< 80 and ≥ 80 years), sex, NYHA functional class (II and III-IV), GFR (< 60 and ≥ 60 mL/min/m2), history of AF, history of DM, and LVEF (< 30 and ≥ 30%). Upgrading to a CRT-D was associated with better survival than upgrading to a CRT-P in men, patients with ischemic HF, < 80 years of age, NYHA functional class III-IV, higher GFR, AF, no DM, and < 30% of LVEF (Fig. 2).

Figure 2
figure 2

Forest plot summarizing the results of the subgroup analysis. After dividing the study cohort into subgroups based on different clinical characteristics, univariable Cox regression analysis was performed to identify those subgroups in whom upgrading to a CRT-D is associated with better survival than upgrading to a CRT-P. AF atrial fibrillation, CI confidence interval, CRT-D cardiac resynchronization therapy-defibrillator, CRT-P cardiac resynchronization therapy-pacemaker, DM diabetes mellitus, HR hazard ratio, LV left ventricular, NYHA New York Heart Association.

Over the past decades, we have witnessed significant advancements in the pharmacological and device therapy of HF, prompting guideline updates on multiple occasions. Nonetheless, we found no association between the year of the CRT upgrade procedure and all-cause mortality using Cox regression.

Clinical characteristics and outcomes of the TDA-derived phenogroups

The application of TDA and autogrouping resulted in a looped network in which the low-risk and high-risk regions were located at opposite poles (Fig. 3). These two regions were conjoined by sections containing patients with an intermediate risk of death on both the lower and upper arc of the loop. The combination of the two intermediate-risk regions is referred to as the intermediate-risk phenogroup throughout the manuscript.

Figure 3
figure 3

The topological network of patients undergoing CRT upgrade. The topological network was created using 16 pre-upgrade features (metric: normalized correlation, lenses: 2 × multi-dimensional scalings [resolution: 25, gain: 2.10, equalized]). The generated network consists of nodes with edges between them. Each node represents a collection of similar patients, and two nodes are connected if they have at least one patient in common. In this network, nodes are color-coded based on all-cause mortality. The topological network was divided into low-risk, intermediate-risk, and high-risk regions (i.e., phenogroups) based on all-cause mortality. CRT cardiac resynchronization therapy.

The phenogroups showed several differences in clinical characteristics (Table 3). The proportions of males and patients with ischemic etiology were the highest in the high-risk and lowest in the low-risk phenogroups. Patients in the high-risk phenogroup had the largest LV diameters and the lowest LVEF values, whereas individuals in the low-risk phenogroup had the best renal function.

Table 3 Clinical characteristics of the phenogroups.

As expected, there were also significant differences in the survival of the phenogroups (log-rank test: p < 0.001, Fig. 4). Patients of the intermediate-risk and high-risk phenogroup had a 1.6-fold (unadjusted HR: 1.618; 95% CI 1.041–2.514; p = 0.033) and 2.6-fold (unadjusted HR: 2.632; 95% CI 1.707–4.060; p < 0.001) increase in the risk of all-cause mortality than those belonging to the low-risk phenogroup, respectively. Compared to upgrading to a CRT-P, upgrading to a CRT-D was associated with a lower risk of death in high-risk patients (unadjusted HR: 0.454; 95% CI 0.228–0.907; p = 0.025) but neither in the intermediate-risk (unadjusted HR: 0.507; 95% CI 0.226–1.136; p = 0.099) nor the low-risk phenogroups (unadjusted HR: 0.983; 95% CI 0.443–2.180; p = 0.966) (Fig. 5).

Figure 4
figure 4

Kaplan–Meier curves depicting the survival of the topological data analysis-derived phenogroups. Hazard ratios and 95% confidence intervals were calculated with univariable Cox regression.. CI confidence interval, CRT cardiac resynchronization therapy, HR hazard ratio.

Figure 5
figure 5

Kaplan–Meier curves depicting the survival of patients upgraded to a CRT-D vs. those upgraded to a CRT-P in each topological data analysis-derived phenogroup. In these plots, right censoring is applied 5 years after the upgrade procedure. Univariable Cox proportional hazards models were used to compute hazard ratios with 95% confidence intervals. CI confidence interval, CRT cardiac resynchronization therapy, CRT-D cardiac resynchronization therapy with defibrillator, CRT-P cardiac resynchronization therapy pacemaker, HR hazard ratio.

Since the intermediate-risk phenogroup comprised two separate subgroups—one at the lower arc and the other at the upper arc of the circular network, we also compared their clinical characteristics and survival (Supplementary Table 1). Patients in the upper region were older (p < 0.001) and less symptomatic (p <0.001). They had predominantly ischemic etiology (p < 0.001), lower N-terminal pro-brain natriuretic peptide (NT-proBNP) values (p < 0.001), smaller LV end-diastolic and end-systolic diameters (both p < 0.001), and higher LVEF values (p < 0.001) than those mapped to the lower region. Despite these differences in their clinical characteristics, they had similar survival rates (Supplementary Fig. 2), and upgrading to a CRT-D was associated with a similar risk of all-cause mortality as upgrading to a CRT-P in both the upper (HR: 0.445; 95% CI 0.131–1.510; p = 0.194) and the lower intermediate-risk region (HR: 0.546; 95% CI 0.185–1.609; p = 0.273) (Supplementary Fig. 3).

Performance of the multi-class classifiers

Among the evaluated multi-class classifiers, the ensemble of 5 multi-layer perceptrons exhibited the best performance during internal validation with a balanced accuracy of 0.898 (95% CI: 0.854–0.942) and a micro-averaged AUC of 0.983 (95% CI: 0.980–0.986) (Supplementary Table 2). In the external validation cohort (see clinical characteristics in Supplementary Table 3), all patients who were classified into the high-risk phenogroup (n = 6) died within 10 years following the upgrade procedure (Fig. 6). Nevertheless, differences between the survival of the three phenogroups were less pronounced, which is most likely attributable to the small sample size.

Figure 6
figure 6

Kaplan–Meier curves depicting the survival of the patients of the external validation cohort classified into the topological data analysis-derived phenogroups. CRT cardiac resynchronization therapy.

Discussion

To the best of our knowledge, this retrospective observational study is the largest to date that investigated patients with previously implanted PMs and no history of VAs who underwent CRT upgrade. Using conventional statistical analysis, we found that CRT-D upgrade was associated with a lower risk of all-cause mortality than CRT-P upgrade, even after adjusting for the relevant clinical covariates. In addition, we applied TDA for the simultaneous evaluation of 16 clinical features and generated a circular topological network in which we could delineate three phenogroups exhibiting significant differences in the risk of all-cause mortality. Interestingly, only in the high-risk phenogroup was upgrading to a CRT-D associated with better survival than upgrading to a CRT-P, implying that choosing a CRT-D over a CRT-P may not convey an additional survival benefit in all CRT upgrade candidates. We also trained and evaluated an ML classifier that can be used to classify new patients into the TDA-derived phenogroups and pinpoint those who might benefit from implanting a CRT-D instead of a CRT-P. To allow other researchers to use the proposed model for research purposes and validate its performance independently, we made it publicly available along with the scripts used for training and validation (https://github.com/tokmarton/crt-upgrade-risk-stratification).

It is well-known that chronic RVP has deleterious effects on cardiac structure and function, presumably due to inducing inter- and intra-ventricular dyssynchrony, and is associated with an increased risk of adverse outcomes1,2,3,4,5,6. By addressing dyssynchrony, upgrading to a CRT may mitigate or even reverse the harmful consequences of chronic RVP, resulting in improved clinical outcomes32. However, it is still a matter of debate whether an ICD would exert any additional benefit in patients undergoing a CRT upgrade.

Although CRT upgrade procedures make up 20–30% of all CRT implantations21, only a limited number of randomized controlled trials (RCTs) have been conducted in the context of CRT upgrade so far32,33. The most recently published one is the BUDAPEST-CRT Upgrade trial, which demonstrated that CRT-D upgrade was associated with a lower incidence of the primary (composite of all-cause mortality, HF hospitalization, or < 15% decrease in LV end-systolic volume at 12 months) and the secondary endpoints (composite of all-cause mortality or HF hospitalization) compared to ICD-only therapy34. Nevertheless, no RCTs have been conducted yet to compare CRT-D vs. CRT-P upgrades; thus, we have to rely solely on data from observational studies. In a study investigating non-ischemic patients with no history of VAs upgraded to CRT due to pacing-induced cardiomyopathy, Barra et al. reported a low risk of life-threatening VAs and observed that these patients may not derive any significant benefit in terms of all-cause mortality from the addition of an ICD35. In contrast, Leyva et al. observed a lower risk of all-cause mortality after upgrading to a CRT-D than a CRT-P in a cohort including both ischemic and non-ischemic HF patients with no history of VAs, even after inverse probability weighting36. The results of these studies emphasize the importance of etiology in device selection and are in line with our observations, as we also found that upgrading to a CRT-D is associated with better survival than upgrading to a CRT-P in the ischemic but not the non-ischemic subgroup of patients.

Numerous observational studies have investigated the impact of CRT-D vs. CRT-P in patients undergoing de novo CRT implantation as well37,38. However, the evidence provided by these studies is ambiguous, and no RCT has been published to date that was specifically designed for the head-to-head comparison between CRT-P and CRT-D in the context of de novo CRT implantation. Importantly, the ongoing Re-evaluation of Optimal Re-synchronization Therapy in Patients with Chronic Heart Failure (RESET-CRT) trial, hypothesizing that CRT-P is non-inferior to CRT-D concerning all-cause mortality, is expected to provide crucial data on this matter39. As a prelude to this RCT, a population-based weighted cohort study was also conducted with the same inclusion and exclusion criteria and primary endpoint, and the investigators found CRT-P to be non-inferior in terms of survival after adjusting for age and entropy balancing for baseline clinical characteristics40. Nevertheless, as these studies have included de novo CRT patients only, further investigations are required to confirm or refute that their results also apply to patients undergoing CRT upgrade, given the apparent differences in clinical characteristics between patients referred for CRT upgrade and those referred for de novo CRT implantation.

As current guidelines lack specific recommendations for guiding device selection during CRT upgrades in patients with previously implanted PMs and no history of VAs20,41, physicians must carefully weigh the advantages and drawbacks of upgrading to a CRT-D instead of a CRT-P on an individual basis. During this comprehensive and individualized pre-upgrade assessment (i.e., benefit-risk analysis), multiple factors, such as HF etiology, age, comorbidities, and device-related risks and potential complications, must be evaluated simultaneously23. It should also be kept in mind that although patients presenting with an LVEF of 35% or lower fall under the indications for an ICD, CRT may significantly improve LV function, and LVEF may surpass 35%, mitigating the risk of sudden cardiac death (SCD) and obviating the need for an ICD. Furthermore, choosing the optimal device type may be further complicated by the concurrent use of HF medications (e.g., angiotensin receptor-neprilysin inhibitors and sodium-glucose cotransporter 2 inhibitors), which can also independently reduce the incidence of SCD42.

Given the challenges and complexity of the pre-upgrade assessment, we sought to apply advanced data analysis approaches in the present study to identify those CRT upgrade candidates who are most likely to experience an additional mortality benefit from an ICD. We decided to use TDA as it can simultaneously evaluate multiple clinical features and construct a compact visual representation of a complex dataset (i.e., a topological network)43. Then, through the exploratory analysis of the generated network, distinct phenogroups with different characteristics, clinical outcomes, and therapeutic responses can be identified, as demonstrated previously by several studies within the field of cardiovascular medicine24,27,44,45,46. Indeed, we were also able to delineate three phenogroups in our cohort of CRT upgrade patients, and only in one of them was CRT-D upgrade associated with a lower risk of all-cause mortality than CRT-P upgrade. We also recognized the importance of providing a solution for classifying new patients into the identified phenogroups, as that would allow others to validate and directly make use of our findings. To this end, we labeled the patients within the topological network based on their location, and then, using this newly labeled data, we trained an ML classifier, which we also made publicly available. Although our findings must be confirmed in future studies and the proposed ML classifier requires a thorough external validation, we may conclude that TDA, in conjunction with ML, holds the promise to optimize device selection and improve outcomes in patients undergoing CRT upgrades.

Limitations

Besides its strength, our study has several limitations that should be discussed. First, the dataset we analyzed using conventional statistics and TDA was derived from a single center and included a relatively small number of patients. Thus, additional investigations should be conducted in the future to confirm our findings in larger, preferably multi-center cohorts of patients undergoing a CRT upgrade. Second, the retrospective nature of data collection bears several inherent limitations, such as the relatively high proportion of missing values, which forced us to omit several well-established prognostic markers (e.g., NT-proBNP) from our analysis. Third, patients were upgraded to a CRT-D or a CRT-P device based on the physicians’ clinical judgment and not in a randomized fashion, which may have resulted in selection bias (e.g., men with less deprived renal function were more likely to receive a CRT-D). Nevertheless, we also performed multivariable Cox regression analysis to partially countervail this bias. Fourth, post-mortem device interrogations were not performed, and cause-specific mortality data were unavailable; therefore, we could not investigate the differences in the rate of SCD between the groups. Last, although we trained an ML model to enable the classification of new patients into the TDA-derived phenogroups, we could validate it externally only in a small cohort of patients. Thus, further external validation will be required. To facilitate that, we made the source code as well as the best-performing model publicly available.

Conclusions

In our cohort of patients with preexisting PMs and no history of VAs, upgrading to a CRT-D was found to be associated with a lower risk of all-cause mortality than upgrading to a CRT-P. By simultaneously evaluating multiple clinical features, TDA identified a phenogroup of CRT upgrade patients who were more likely to show additional benefit in terms of all-cause mortality from implanting a CRT-D instead of a CRT-P. We also trained and published an ML model that enables the risk stratification of new patients by assorting them into the TDA-derived phenogroups.