Abstract
Heart failure (HF) and malignancy represent two major global health burdens that frequently coexist and lead to poor clinical outcomes. However, the specific impact of malignancy on in-hospital mortality in HF patients remains incompletely understood, and reliable predictive tools specifically for HF patients with comorbid malignancy are currently lacking. This multicenter retrospective study analyzed data from the eICU collaborative research database (eICU database), medical information mart for intensive care IV (MIMIC-IV) databases, and medical information mart for intensive care III (MIMIC-III) databases, including 21,403 HF patients (3341 with malignancy). We employed three analytical approaches: propensity score matching (PSM), inverse probability treatment weighting (IPTW), and multivariable logistic regression to assess malignancy-associated mortality risk. For predictive modeling, five machine learning algorithms were trained on the eICU database (70% training, 30% internal validation) and externally validated using both MIMIC-IV and MIMIC-III datasets. All three analytical methods (PSM, IPTW, and multivariable regression) yielded highly consistent results, demonstrating that malignancy significantly increased in-hospital mortality risk (PSM: OR 1.12, 95% CI 1.00–1.24; IPTW: OR 1.17, 95% CI 1.04–1.31; multivariable regression: OR 1.21, 95% CI 1.08–1.36). The AdaBoost model, developed using 19 key predictive variables selected by the Boruta algorithm, demonstrated excellent performance with a training set AUC of 0.849 and internal validation AUC of 0.740, while maintaining good discriminative ability in external validation (MIMIC-IV: AUC 0.739; MIMIC-III: AUC 0.699). To enhance model interpretability, SHapley additive exPlanations analysis revealed the top five predictive variables: simplified acute physiology score II, mechanical ventilation requirement, heart rate, body temperature, and respiratory rate. For clinical implementation, we developed a web-based calculator (available at: https://nanzihan1998.shinyapps.io/Mortality/) to facilitate real-time mortality risk assessment. Our analysis suggests malignancy is associated with worse outcomes in HF patients. We developed an interpretable machine learning model that demonstrated moderate predictive performance for in-hospital mortality in this high-risk population. This approach could serve as a foundation for future risk stratification tools, but requires prospective validation before clinical application.
Supplementary Information
The online version contains supplementary material available at 10.1038/s41598-026-52487-7.
Keywords: Heart failure, Malignancy, In-hospital mortality, Machine learning, Interpretable AI, Predictive modeling
Subject terms: Biomarkers, Cancer, Computational biology and bioinformatics, Diseases, Medical research, Oncology, Risk factors
Introduction
Heart failure (HF) and malignancy represent two of the most significant global health challenges, with both conditions showing rising prevalence due to aging populations1. HF affects over 56 million people worldwide and is associated with high morbidity and mortality, including a 28.2% all-cause mortality rate at 3 years post-diagnosis2,3. Meanwhile, malignancy remains the second leading cause of death globally, accounting for 14.57% of total mortality4. Notably, these conditions frequently coexist, particularly in older adults—approximately 10% of patients with malignancy aged ≥ 65 years also have HF5. This overlap poses a substantial clinical burden, as patients with both HF and malignancy experience worse outcomes, including prolonged hospital stays, increased healthcare costs, and nearly threefold higher in-hospital mortality compared to those with either condition alone6. Accurate prognostic prediction in patients with concurrent HF and malignancy is crucial for optimizing therapeutic decision-making, yet remains a significant clinical challenge. The intricate interplay between these conditions—encompassing shared risk factors, overlapping pathophysiological pathways, and malignancy treatment-related cardiotoxicity—substantially complicates risk stratification and clinical management. A comprehensive elucidation of malignancy-associated outcomes in HF populations could facilitate more personalized and effective care delivery.
Recent advances in data science and artificial intelligence have increasingly established machine learning (ML) as a powerful tool for prognostic analysis in critically ill Intensive Care Unit (ICU) patients. The concurrent development of interpretable ML techniques has been pivotal in addressing the “black box” concern, thereby enhancing the clinical credibility of model outputs. The utility of these approaches is evidenced by their widespread adoption in specialized medical fields. Within cardiology, for instance, interpretable ML has been applied to predict mortality risk in ICU-admitted heart failure (HF) patients7, forecast 28-day all-cause in-hospital mortality in critically ill HF patients with hypertension8 , and estimate the risk of new-onset atrial fibrillation in HF populations9 . Parallel progress is evident in oncology, where ML models facilitate the precise prediction of survival and treatment response in melanoma10, and enable the systematic analysis of survival outcomes across breast cancer subtypes11.
Notwithstanding these advancements, a critical gap persists when these domains intersect. While traditional critical care scoring systems like APACHE II and SOFA provide broad utility for general ICU populations, their generalizability often falls short in addressing the complex needs of specific patient subgroups. This is particularly salient for the growing cohort of critically ill patients with concomitant malignancy, whose outcomes are shaped by a distinct pathophysiology involving the interplay between their cancer and acute critical illness. Consequently, a pressing need exists for tailored prognostic models for this population. However, within the emerging interdisciplinary field of cardio-oncology, prognostic prediction research specifically targeting the high-risk subgroup of HF patients with comorbid malignancy remains notably underdeveloped.
Therefore, this study aims to: (1) systematically evaluated the malignancy-associated in-hospital mortality risk in HF patients; (2) develop a prognostic model for predicting in-hospital mortality specifically in HF patients with comorbid malignancy; and (3) conduct interpretability analysis of the model with visualization to facilitate clinical implementation.
Methods
Overview of the methods
This study employed a three-stage analytical approach: (1) multidimensional confounding adjustment and risk quantification using propensity score matching (PSM), inverse probability treatment weighting (IPTW), and multivariable logistic regression, confirming significantly worse clinical outcomes in HF patients with malignancies; (2) partitioning of the eICU collaborative research database (eICU database) into training and internal validation sets for predictive model development using ML algorithms, with subsequent external validation in both Medical Information Mart for Intensive Care IV (MIMIC-IV) and Medical Information Mart for Intensive Care III (MIMIC-III) databases to identify the optimal model; and (3) SHapley Additive exPlanations (SHAP) value analysis to enhance the clinical interpretability of the selected model12. This study rigorously adhered to two international reporting guidelines: the STrengthening the Reporting of OBservational studies in Epidemiology (STROBE) statement for multidimensional confounding adjustment and risk quantification analyses, and the transparent reporting of a multivariable prediction model for individual prognosis or diagnosis (TRIPOD) statement for model development and reporting13,14.
Data source
The data of this study were derived from three major critical care databases: the eICU database (v2.0, containing > 200,000 ICU admissions across the US from 2014 to 2015), MIMIC-IV (v3.1, comprising > 65,000 ICU and > 200,000 ED patients from Beth Israel Deaconess Medical Center with modular design, covering data from 2008 to 2022), and the CareVue subset of MIMIC-III (containing data from 2001 to 2008, excluding temporal overlap with MIMIC-IV) 15–17.One of the authors of this study has completed the Collaborative Institutional Training Initiative (CITI) Program certification (Certificate ID: 46212703) and obtained official authorization to access these three databases for retrospective research purposes. The eICU data was utilized to demonstrate that comorbid malignancies significantly increased in-hospital mortality among HF patients admitted to the ICU. These data were partitioned into training and internal validation sets for ML model development, while MIMIC-IV and MIMIC-III data served for external validation.
Participants
This study identified eligible participants using international classification of diseases, ninth/tenth revision (ICD-9/10) codes (Supplementary Material 1). For the multidimensional confounding adjustment and risk quantification analysis, we included all adult (age ≥ 18 years)HF patients admitted to the ICU, with the following exclusion criteria: (1) ICU length of stay < 24 h; (2) Pregnancy or lactation; and (3) non-first-time ICU admissions. For the ML modeling phase, the study population was restricted to HF patients with malignancy comorbidity while applying the same exclusion criteria to maintain cohort consistency.
Data extraction and outcomes
We extracted comprehensive patient data from the eICU and MIMIC databases, including: (1) demographic characteristics (gender, age, race and weight); (2) illness severity scores (SAPS-II); (3) comorbidities (hypertension, atrial fibrillation, coronary artery disease, diabetes, chronic kidney disease, chronic obstructive pulmonary disease, and stroke); (4) critical interventions within the first 24 h of ICU admission (mechanical ventilation, continuous renal replacement therapy CRRT, sedative use, and vasopressors administration); (5) vital signs upon ICU admission, assessed as the first recorded values (including mean arterial pressure, heart rate, temperature, respiratory rate, and peripheral oxygen saturation); and (6) laboratory tests, defined as the first available results after ICU admission (including bicarbonate, creatinine, blood urea nitrogen, white blood cell count, red cell distribution width (RDW), hemoglobin, platelet count, calcium, chloride, sodium, potassium, and blood glucose levels).The outcome of this study was in-hospital mortality. This study’s prediction horizon is defined as follows: a prediction made at ICU admission using initially available data to forecast the risk of death throughout the entire hospitalization.
Data processing
In the data cleaning process, variables with missing values exceeding 30% were removed. For variables with missing values below 30% (Supplementary Material 2), we applied k-nearest neighbors (KNN) imputation18. Outliers were handled using winsorization (capping): values exceeding the 99th percentile were replaced with the 99th percentile value, and values below the 1st percentile were replaced with the 1st percentile value. Additionally, zero-variance and near-zero-variance variables were excluded. Multicollinearity was assessed to ensure no high correlations existed among the remaining variables. For the external validation phase using the MIMIC-IV and MIMIC-III databases, we adopted a complete-case analysis approach, excluding samples with any missing values to ensure robustness and comparability across datasets.
Association analysis methods
This study employed multiple analytical approaches to examine the relationship between malignancies and patient outcomes. Initially, propensity score matching (PSM) 19 was performed to adjust for confounding factors using covariate balancing propensity score (CBPS) estimation20. Propensity scores were calculated via CBPS, followed by 1:2 nearest-neighbor matching with a caliper width of 0.1. The effectiveness of PSM was evaluated by calculating standardized mean differences (SMDs), with successful balance defined as all post-matching SMDs < 0.1. Successful balance was confirmed when all post-matching standardized mean differences (SMDs) of covariates were < 0.1. Weighted logistic regression models were then constructed using the matched sample to estimate effect sizes. To verify result robustness, supplementary analyses were conducted using multivariable logistic regression and IPTW. The multivariable model incorporated all baseline covariates to examine the significance of malignancy-outcome associations. IPTW analysis employed stabilized weights derived from propensity scores, with satisfactory covariate balance achieved after weighting. Consistent findings across PSM, multivariable regression, and IPTW analyses (when regression results from weighted data aligned with both PSM and conventional multivariable results) further reinforced the reliability of our conclusions. This methodological triangulation strategy enhanced the reliability of our observational analyses while maintaining appropriate interpretation boundaries.
Model development and evaluation
This study employed ML approaches to develop predictive models, initially partitioning the eICU database into training and internal validation sets at a 7:3 ratio while addressing class imbalance in the training set using the ROSE algorithm.
To identify the most relevant predictors and prevent overfitting, we performed feature selection using the Boruta algorithm21. The Boruta algorithm is a wrapper method built around the random forest classifier, which systematically compares the importance of original features with that of randomly shuffled copies (“shadow features”) through multiple iterations. This process identifies features that are consistently more important than the shadow features, providing a robust selection of variables with confirmed predictive power. The analysis was conducted on the training set using the Boruta package in R with default parameters and a random seed of 123 for reproducibility. After 100 iterations, the algorithm identified 19 features as definitively important (labeled as “confirmed” and shown in green in the feature importance plot, Fig. 4). These confirmed features were subsequently used for all subsequent model development. No features were classified as “tentative” or “rejected” in the final selection.
Fig. 4.

Boruta-Selected features for mortality prediction in heart failure patients with malignancy. This plot illustrates the process and result of the Boruta algorithm for identifying predictive features. The green boxplots represent the distribution of Z-scores (a measure of importance) for the 19 original features that were “Confirmed” as important predictors across 100 iterations. The red boxplot represents the maximum Z-score achieved by the “shadow features” (randomly permuted copies of the original features, which serve as a benchmark for noise). The algorithm conclusively identified all 19 confirmed features, as their importance consistently exceeded that of the maximum shadow feature. No features were classified as “tentative” or “rejected”. Legend: AFib atrial fibrillation; BUN blood urea nitrogen; CAD coronary artery disease; CKD chronic kidney disease; COPD chronic obstructive pulmonary disease; CRRT continuous renal replacement therapy; Hb hemoglobin; HCO3 bicarbonate; HR heart rate; MAP mean arterial pressure; RDW red cell distribution width; RR respiratory rate; SAPS-II simplified acute physiology score II; SpO2 oxygen saturation; WBC white blood cell count.
Subsequently, five ML algorithms—including eXtreme Gradient Boosting (XGBoost), Adaptive Boosting (AdaBoost), k-Nearest Neighbors (KNN), Naïve Bayes (NB), and Logistic Regression (LR)—were implemented. Hyperparameter optimization was achieved via a grid search approach with tenfold cross-validation conducted exclusively on the training set.
Model performance was comprehensively evaluated using multiple metrics, including receiver operating characteristic (ROC) curves, Brier score, accuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and F1-score, across both internal validation and two external validation datasets to ensure predictive accuracy and generalizability. Upon completion of model development, we will employ the SHAP method for dual-perspective interpretability analysis: First, global interpretation will be achieved by calculating mean SHAP values across the test cohort to identify the most influential clinical features affecting prediction outcomes; second, individualized SHAP force plots will be generated for both typical cases and special scenarios to visually demonstrate how each feature contributes to prediction results for specific cases. All visualization outputs will be optimized according to clinicians’ cognitive characteristics to ensure clinical interpretability and practical utility of the model predictions. This dual-analysis strategy not only validates the biological plausibility of the model at the population level but also provides transparent decision-making references at the individual level22.
Furthermore, a web-based application was developed to facilitate clinical implementation of the final model. All statistical analyses were conducted using R software (version 4.4.2; R Foundation for Statistical Computing, Vienna, Austria), with two-sided *p*-values < 0.05 considered statistically significant.
Results
Figure 1 illustrates the technical flowchart of this study, with the left panel depicting the association analysis component. Initially, we identified 28,449 HF patients from the eICU database using ICD codes. After applying stringent inclusion and exclusion criteria, 21,403 patients were enrolled in the study cohort, including 18,062 without a history of malignant tumors and 3,341 with comorbid malignancies. In the original eICU cohort, the crude in-hospital mortality was 11.50% (2,078/18,062) among HF patients without malignancy and 15.53% (519/3,341) among those with malignancy. After propensity score matching, the mortality rates were 14.31% (943/6,591) for patients without malignancy and 15.47% (516/3,336) for those with malignancy. In the external validation cohorts, which consisted exclusively of the malignancy subgroup for model validation, the mortality was 19.81% (360/1,817) in MIMIC-IV and 27.09% (146/539) in MIMIC-III, reflecting varying baseline acuity and case-mix across different databases and time periods (Supplementary Material 3) .Following association analysis, the 3,341 malignancy-complicated HF patients were randomly split into a training set (2,368 patients for ML model development) and an internal validation set at a 7:3 ratio. To further evaluate model performance, external validation cohorts comprising 1,817 and 539 patients were additionally recruited from the MIMIC-IV and MIMIC-III databases, respectively.
Fig. 1.
Technical flowchart. Legend: eICU eICU collaborative research database; ICU intensive care unit; MIMIC-III medical information mart for intensive care III; MIMIC-IV medical information mart for intensive care IV.
Baseline characteristics
The baseline characteristics before PSM are presented in Table 1. Patients with malignancy were older (median age 75 (IQR: 67–83) vs. 71 (60–81)) and had higher disease severity on ICU admission, as reflected by SAPS-II scores (median 35 (28–44) vs. 32 (24–41)). They also had a higher prevalence of atrial fibrillation (45% vs. 39%), chronic obstructive pulmonary disease (38% vs. 34%), and sepsis (41% vs. 36%). Laboratory differences included lower hemoglobin levels (median 10.22 g/dL (8.90–11.53) vs. 10.70 (9.30–12.10)) and higher red cell distribution width (median 15.90 (14.70–17.40) vs. 15.50 (14.50–16.99)). No notable differences were observed in the use of mechanical ventilation (46% vs. 50%) or vasopressors (20% vs. 20%) within the first 24 h of ICU admission.
Table 1.
Baseline characteristics of patients before and after propensity score matching (PSM).
| Characteristic | Before PSM | After PSM | ||||||
|---|---|---|---|---|---|---|---|---|
| Non-malignancy N = 18,062 |
Malignancy N = 3,341 |
SMD | 95% CI | Non-malignancy N = 6,591 |
Malignancy N = 3,336 |
SMD | 95% CI | |
| Gender (Female), n (%) | 8,536 (47%) | 1,542 (46%) | 0.02 | − 0.01, 0.06 | 3,099 (47%) | 1,540 (46%) | 0.02 | − 0.02, 0.06 |
| Age, years | 71 (60, 81) | 75 (67, 83) | − 0.38 | − 0.42, − 0.35 | 76 (67, 84) | 75 (67, 83) | 0.01 | − 0.04, 0.05 |
| Race | 0.22 | 0.18, 0.26 | 0.01 | − 0.04, 0.05 | ||||
| Asian, n (%) | 290 (1.6%) | 31 (0.9%) | 60 (0.9%) | 31 (0.9%) | ||||
| Black, n (%) | 2,695 (15%) | 327 (9.8%) | 649 (9.8%) | 327 (9.8%) | ||||
| Other, n (%) | 1,718 (9.5%) | 211 (6.3%) | 408 (6.2%) | 211 (6.3%) | ||||
| White, n (%) | 13,359 (74%) | 2,772 (83%) | 5,474 (83%) | 2,767 (83%) | ||||
| Weight, kg | 83 (68, 103) | 80 (67, 97) | 0.19 | 0.15, 0.22 | 79 (66, 97) | 80 (67, 97) | 0.00 | − 0.04, 0.04 |
| SAPS-II, points | 32 (24, 41) | 35 (28, 44) | − 0.23 | − 0.27, − 0.19 | 35 (27, 44) | 35 (28, 44) | 0.00 | − 0.04, 0.04 |
| Sepsis, n (%) | 6,585 (36%) | 1,363 (41%) | 0.09 | 0.05, 0.13 | 2,717 (41%) | 1,359 (41%) | 0.01 | − 0.03, 0.05 |
| Mechanical Ventilation,n (%) | 9,090 (50%) | 1,547 (46%) | 0.08 | 0.04, 0.12 | 3,076 (47%) | 1,545 (46%) | 0.01 | − 0.03, 0.05 |
| CRRT,n (%) | 1,187 (6.6%) | 195 (5.8%) | 0.03 | − 0.01, 0.07 | 401 (6.1%) | 195 (5.8%) | 0.01 | − 0.03, 0.05 |
| Sedative,n (%) | 4,147 (23%) | 694 (21%) | 0.05 | 0.02, 0.09 | 1,433 (22%) | 694 (21%) | 0.02 | − 0.02, 0.06 |
| Vasopressors,n (%) | 3,561 (20%) | 671 (20%) | 0.01 | − 0.03, 0.05 | 1,331 (20%) | 670 (20%) | 0.00 | − 0.04, 0.04 |
| Hypertension,n (%) | 12,818 (71%) | 2,452 (73%) | 0.05 | 0.02, 0.09 | 4,846 (74%) | 2,447 (73%) | 0.00 | − 0.04, 0.05 |
| AFib,n (%) | 7,056 (39%) | 1,489 (45%) | 0.11 | 0.07, 0.15 | 2,908 (44%) | 1,487 (45%) | 0.01 | − 0.03, 0.05 |
| CAD,n (%) | 15,587 (86%) | 2,867 (86%) | 0.01 | − 0.02, 0.05 | 5,655 (86%) | 2,863 (86%) | 0.00 | − 0.04, 0.04 |
| Diabetes,n (%) | 8,176 (45%) | 1,410 (42%) | 0.06 | 0.02, 0.10 | 2,861 (43%) | 1,406 (42%) | 0.03 | − 0.02, 0.07 |
| CKD,n (%) | 6,074 (34%) | 1,174 (35%) | 0.03 | − 0.01, 0.07 | 2,303 (35%) | 1,171 (35%) | 0.00 | − 0.04, 0.05 |
| COPD,n (%) | 6,062 (34%) | 1,255 (38%) | 0.08 | 0.05, 0.12 | 2,477 (38%) | 1,253 (38%) | 0.00 | − 0.04, 0.04 |
| Stroke,n (%) | 2,701 (15%) | 545 (16%) | 0.04 | 0.00, 0.07 | 1,070 (16%) | 543 (16%) | 0.00 | − 0.04, 0.04 |
| MAP, mmHg | 82 (69, 97) | 79 (67, 93) | 0.13 | 0.10, 0.17 | 79 (67, 94) | 79 (67, 93) | 0.00 | − 0.04, 0.04 |
| HR, beats/min | 86 (73, 101) | 88 (74, 103) | − 0.08 | − 0.11, − 0.04 | 87 (74, 102) | 88 (74, 103) | − 0.02 | − 0.07, 0.02 |
| Temperature, °C | 36.70 (36.39, 37.00) | 36.68 (36.39, 37.00) | 0.01 | − 0.03, 0.04 | 36.67 (36.33, 37.00) | 36.69 (36.39, 37.00) | − 0.01 | − 0.05, 0.03 |
| RR, breaths/min | 20 (17, 25) | 21 (17, 25) | − 0.08 | − 0.11, − 0.04 | 20 (17, 25) | 21 (17, 25) | − 0.02 | − 0.06, 0.02 |
| SpO2,% | 97.4 (95.0, 100.0) | 97.0 (95.0, 100.0) | 0.05 | 0.01, 0.08 | 97.0 (95.0, 100.0) | 97.0 (95.0, 100.0) | 0.00 | − 0.04, 0.04 |
| HCO3, mmol/L | 25.0 (22.0, 28.7) | 25.0 (22.0, 28.2) | 0.03 | − 0.01, 0.06 | 25.0 (22.0, 28.2) | 25.0 (22.0, 28.2) | 0.00 | − 0.04, 0.04 |
| Creatinine, mg/dL | 1.38 (0.96, 2.23) | 1.33 (0.95, 2.09) | 0.11 | 0.07, 0.14 | 1.36 (0.97, 2.10) | 1.33 (0.95, 2.09) | 0.01 | − 0.03, 0.05 |
| BUN, mg/dL | 29 (19, 45) | 29 (19, 44) | 0.01 | − 0.03, 0.05 | 30 (20, 44) | 29 (19, 44) | 0.01 | − 0.03, 0.05 |
| WBC, × 10⁹/L | 10.3 (7.8, 14.0) | 10.5 (7.6, 14.4) | − 0.05 | − 0.09, − 0.01 | 10 (8, 14) | 10 (8, 14) | − 0.01 | − 0.05, 0.03 |
| RDW,% | 15.50 (14.50, 16.99) | 15.90 (14.70, 17.40) | − 0.17 | − 0.21, − 0.13 | 15.81 (14.70, 17.40) | 15.90 (14.70, 17.40) | − 0.01 | − 0.05, 0.03 |
| Hb, g/dL | 10.70 (9.30, 12.10) | 10.22 (8.90, 11.53) | 0.24 | 0.20, 0.27 | 10.20 (8.90, 11.60) | 10.23 (8.90, 11.54) | 0.01 | − 0.03, 0.06 |
| Platelet, × 10⁹/L | 193 (148, 241) | 187 (139, 241) | 0.04 | 0.00, 0.08 | 189 (143, 240) | 187 (139, 241) | 0.00 | − 0.04, 0.04 |
| Calcium, mg/dL | 8.50 (8.00, 8.90) | 8.40 (8.00, 8.90) | 0.05 | 0.02, 0.09 | 8.40 (8.00, 8.82) | 8.40 (8.00, 8.90) | − 0.01 | − 0.05, 0.03 |
| Chloride, mmol/L | 102 (98, 106) | 102 (99, 106) | − 0.02 | − 0.06, 0.02 | 103 (98, 107) | 102 (99, 106) | 0.01 | − 0.03, 0.05 |
| Sodium, mmol/L | 138.0 (135.0, 141.0) | 138.0 (135.0, 141.0) | 0.05 | 0.01, 0.08 | 138.0 (135.0, 141.0) | 138.0 (135.0, 141.0) | 0.01 | − 0.03, 0.05 |
| Potassium, mmol/L | 4.10 (3.72, 4.60) | 4.10 (3.70, 4.60) | 0.03 | 0.00, 0.07 | 4.10 (3.70, 4.60) | 4.10 (3.70, 4.60) | 0.01 | − 0.03, 0.05 |
| Blood Glucose, mg/dL | 133 (106, 177) | 133 (107, 171) | 0.05 | 0.02, 0.09 | 131 (105, 172) | 133 (107, 172) | − 0.01 | − 0.05, 0.04 |
AFib atrial fibrillation; BUN blood urea nitrogen; CAD coronary artery disease; CI Confidence Interval; CKD chronic kidney disease; COPD chronic obstructive pulmonary disease; CRRT continuous renal replacement therapy; Hb hemoglobin; HR heart rate; MAP mean arterial pressure; PSM propensity score matching; RDW red cell distribution width; RR respiratory rate; SAPS-II simplified acute physiology score II; SMD standardized mean difference; SpO₂ peripheral oxygen saturation; WBC white blood cell count.
Association analysis results
Here are the results of our association analysis using PSM and weighted logistic regression. We performed 1:2 PSM with a caliper set to ensure SMD < 0.1 for all covariates, achieving good balance between the malignancy and non-malignancy groups in the matched cohort (Table 1, Fig. 2A). The weighted logistic regression model, adjusting for all baseline characteristics including demographics, severity scores, comorbidities, vital signs, and laboratory values, demonstrated that malignancy was significantly associated with worse hospital outcomes (OR 1.12, 95% CI 1.00–1.24, p = 0.04200). This analysis accounted for the matched nature of the data through robust variance estimation using subclass clustering, and the quasibinomial family was used to address potential overdispersion. The results suggest that malignancy independently predicts poorer outcomes in this critically ill population even after rigorous adjustment for potential confounders through both matching and regression techniques.
Fig. 2.
Assessment of covariate balance between malignancy and non-malignancy groups after propensity score matching (A) and inverse probability treatment weighting (B). Legend: AFib atrial fibrillation; BUN blood urea nitrogen; CAD coronary artery disease; CKD chronic kidney disease; COPD chronic obstructive pulmonary disease; CRRT continuous renal replacement therapy; Hb Hemoglobin; HCO3 bicarbonate; HR: heart rate; MAP mean arterial pressure; PSM propensity score matching; IPTW inverse probability treatment weighting; RDW red cell distribution width; RR respiratory rate; SAPS-II simplified acute physiology score II; SpO2 oxygen saturation; WBC white blood cell count.
To further validate our findings, we conducted sensitivity analyses using IPTW and multivariate logistic regression. The IPTW approach achieved excellent covariate balance (all SMD < 0.1) as demonstrated in the Love plot (Fig. 2-B), and the weighted analysis similarly showed that malignancy was associated with increased mortality risk (OR 1.17, 95% CI 1.04–1.31, p = 0.00889). The traditional multivariate logistic regression model, adjusting for all baseline covariates, yielded consistent results (OR 1.21, 95% CI 1.08–1.36, p = 0.00148). Figure 3 presents the forest plot comparing these three association analysis methods (PSM, IPTW, and multivariate logistic regression), demonstrating robust and consistent effect estimates across different analytical approaches. The concordance of results from these complementary methods strengthens the evidence for an independent association between malignancy and poorer outcomes in critically ill patients.
Fig. 3.
Comparison of malignancy-associated mortality risk estimates across different adjustment methods. Legend: PSM propensity score matching; IPTW inverse probability treatment weighting; OR (95% CI) odds ratio (95% confidence interval).
Machine learning modelling: feature selection
Using the Boruta algorithm for all-cause mortality prediction in HF patients with malignancy, we identified 19 key features from comprehensive clinical variables (Fig. 4). The confirmed significant features included illness severity scores (SAPS-II), critical interventions (mechanical ventilation, sedatives, vasopressors), comorbidities (atrial fibrillation), vital signs (mean arterial pressure, heart rate, temperature, respiratory rate, peripheral oxygen saturation), and laboratory tests (bicarbonate, creatinine, blood urea nitrogen, white blood cell count, hemoglobin, platelet count, and electrolytes including chloride, sodium, and potassium).
Model construction and comparative performance evaluation
During the model construction phase, we employed five ML algorithmsto develop predictive models. The eICU dataset was partitioned into training and internal validation sets at a 7:3 ratio. To address class imbalance in the training set, we applied the random over-sampling examples (ROSE) algorithm for data resampling. Model training was optimized through a tenfold cross-validation approach combined with grid search to systematically tune hyperparameters, ensuring robust performance and generalizability. The detailed hyperparameter settings are provided in Supplementary Material 4.
We comprehensively evaluated model performance using multiple metrics, conducting internal validation with the partitioned eICU dataset and external validation with both MIMIC-IV and MIMIC-III databases. As illustrated in Fig. 5, the ROC curves demonstrate distinct performance patterns across the training set (A), internal validation set (B), MIMIC-IV external validation set (C), and MIMIC-III external validation set (D). While XGBoost achieved superior AUC in the training set, its performance significantly declined across all validation sets, indicating evident overfitting. In contrast, AdaBoost exhibited the most robust and consistent performance across all datasets, particularly maintaining superior predictive accuracy during external validation, suggesting better generalizability for clinical application.
Fig. 5.
ROC curves of machine learning models in (A) training set, (B) internal validation set, (C) MIMIC-IV external validation, and (D) MIMIC-III external validation. Legend: AUC area under the curve; XGBoost extreme gradient boosting; AdaBoost adaptive boosting; KNN k-nearest neighbors; LR logistic regression; ROC receiver operating characteristic.
As demonstrated in Table 2, the AdaBoost model demonstrated superior performance in predicting mortality among HF patients across multiple datasets. The AUPRC values were 0.857 (95% CI: 0.839–0.872) in the training set, and 0.417 (95% CI: 0.365–0.466) in MIMIC-IV and 0.483 (95% CI: 0.405–0.555) in MIMIC-III. In external validation (MIMIC-III/IV), AdaBoost achieved the best balance between calibration (Brier Score: 0.187–0.214) and discrimination (Accuracy: 0.672–0.720), outperforming LR and KNN. It exhibited high sensitivity (0.745–0.814) to minimize false negatives and the highest PPV (0.829–0.902) for reliable positive predictions. While XGBoost showed overfitting (F1 drop from 0.983 to 0.853 in validation), AdaBoost maintained robust generalization (F1: 0.810–0.856). Its stability across datasets supports clinical deployment for mortality risk stratification. The calibration performance and learning dynamics of the AdaBoost model in the training set are presented in Supplementary Material 5.
Table2.
Performance comparison of machine learning models for mortality prediction in heart failure patients with malignancy.
| Dataset | Model | AUC (95% CI) | Brier score (95% CI) | Accuracy (95% CI) | Sensitivity (95% CI) | Specificity (95% CI) | PPV (95% CI) | NPV (95% CI) | F1 Score (95% CI) | AUPRC (95% CI) |
|---|---|---|---|---|---|---|---|---|---|---|
| eICU-Train | AdaBoost | 0.849 (0.836–0.861) | 0.163 (0.157–0.169) | 0.772 (0.756–0.788) | 0.797 (0.726–0.770) | 0.748 (0.726–0.770) | 0.753 (0.731–0.776) | 0.793 (0.770–0.818) | 0.774 (0.752–0.786) | 0.857 (0.839–0.872) |
| eICU-Train | KNN | 0.807 (0.793–0.823) | 0.180 (0.173–0.186) | 0.728 (0.710–0.747) | 0.802 (0.777–0.825) | 0.656 (0.631–0.682) | 0.692 (0.670–0.713) | 0.775 (0.748–0.804) | 0.743 (0.687–0.732) | 0.815 (0.797–0.833) |
| eICU-Train | LR | 0.760 (0.745–0.778) | 0.199 (0.192–0.206) | 0.690 (0.673–0.708) | 0.686 (0.669–0.719) | 0.693 (0.660–0.712) | 0.683 (0.660–0.707) | 0.697 (0.670–0.724) | 0.685 (0.675–0.716) | 0.765 (0.744–0.790) |
| eICU-Train | Naive Bayes | 0.811 (0.795–0.826) | 0.191 (0.180–0.202) | 0.728 (0.712–0.748) | 0.828 (0.808–0.849) | 0.633 (0.609–0.658) | 0.684 (0.661–0.711) | 0.793 (0.766–0.815) | 0.749 (0.684–0.722) | 0.817 (0.792–0.835) |
| eICU-Train | XGBoost | 0.999 (0.999–1.000) | 0.035 (0.033–0.038) | 0.984 (0.978–0.989) | 0.992 (0.986–0.997) | 0.975 (0.966–0.985) | 0.975 (0.964–0.985) | 0.992 (0.987–0.997) | 0.983 (0.978–0.989) | 0.999 (0.999–1.000) |
| eICU-Valid | AdaBoost | 0.740 (0.684–0.784) | 0.168 (0.157–0.181) | 0.773 (0.746–0.799) | 0.814 (0.789–0.841) | 0.575 (0.494–0.644) | 0.902 (0.880–0.921) | 0.390 (0.339–0.449) | 0.856 (0.406–0.519) | 0.440 (0.371–0.519) |
| eICU-Valid | KNN | 0.678 (0.635–0.719) | 0.198 (0.184–0.212) | 0.694 (0.664–0.725) | 0.737 (0.707–0.769) | 0.485 (0.419–0.567) | 0.874 (0.850–0.897) | 0.276 (0.230–0.322) | 0.799 (0.298–0.398) | 0.306 (0.248–0.369) |
| eICU-Valid | LR | 0.736 (0.688–0.778) | 0.201 (0.190–0.212) | 0.691 (0.659–0.718) | 0.697 (0.664–0.729) | 0.659 (0.589–0.736) | 0.908 (0.883–0.931) | 0.311 (0.259–0.366) | 0.789 (0.361–0.483) | 0.452 (0.374–0.525) |
| eICU-Valid | Naive Bayes | 0.743 (0.698–0.782) | 0.151 (0.137–0.168) | 0.794 (0.769–0.816) | 0.861 (0.833–0.882) | 0.473 (0.417–0.552) | 0.887 (0.864–0.909) | 0.414 (0.348–0.483) | 0.874 (0.385–0.506) | 0.428 (0.356–0.510) |
| eICU-Valid | XGBoost | 0.741 (0.697–0.782) | 0.165 (0.154–0.181) | 0.767 (0.742–0.788) | 0.814 (0.789–0.839) | 0.539 (0.473–0.602) | 0.895 (0.870–0.914) | 0.375 (0.323–0.429) | 0.853 (0.386–0.490) | 0.437 (0.359–0.518) |
| MIMIC-IV | AdaBoost | 0.739 (0.712–0.767) | 0.188 (0.179–0.198) | 0.720 (0.698–0.737) | 0.745 (0.723–0.765) | 0.617 (0.556–0.672) | 0.887 (0.868–0.905) | 0.374 (0.335–0.409) | 0.755 (0.423–0.503) | 0.417 (0.365–0.466) |
| MIMIC-IV | KNN | 0.701 (0.672–0.731) | 0.217 (0.207–0.227) | 0.663 (0.640–0.685) | 0.672 (0.646–0.695) | 0.625 (0.574–0.679) | 0.879 (0.860–0.897) | 0.320 (0.287–0.354) | 0.715 (0.388–0.460) | 0.359 (0.315–0.406) |
| MIMIC-IV | LR | 0.725 (0.693–0.753) | 0.209 (0.201–0.218) | 0.676 (0.654–0.697) | 0.691 (0.668–0.716) | 0.614 (0.561–0.661) | 0.879 (0.858–0.895) | 0.329 (0.292–0.365) | 0.709 (0.390–0.465) | 0.410 (0.362–0.472) |
| MIMIC-IV | Naive Bayes | 0.722 (0.697–0.749) | 0.190 (0.176–0.205) | 0.738 (0.718–0.759) | 0.796 (0.770–0.819) | 0.503 (0.453–0.550) | 0.866 (0.846–0.885) | 0.379 (0.337–0.431) | 0.777 (0.395–0.476) | 0.384 (0.334–0.436) |
| MIMIC-IV | XGBoost | 0.723 (0.698–0.755) | 0.198 (0.187–0.210) | 0.718 (0.699–0.739) | 0.753 (0.729–0.774) | 0.578 (0.525–0.629) | 0.878 (0.860–0.895) | 0.366 (0.331–0.408) | 0.752 (0.406–0.493) | 0.391 (0.342–0.439) |
| MIMIC-III | AdaBoost | 0.699 (0.638–0.748) | 0.214 (0.198–0.230) | 0.672 (0.636–0.709) | 0.692 (0.649–0.736) | 0.616 (0.526–0.690) | 0.829 (0.787–0.866) | 0.427 (0.360–0.503) | 0.755 (0.437–0.566) | 0.483 (0.405–0.555) |
| MIMIC-III | KNN | 0.655 (0.606–0.701) | 0.239 (0.222–0.257) | 0.631 (0.590–0.668) | 0.636 (0.583–0.682) | 0.616 (0.525–0.696) | 0.817 (0.765–0.857) | 0.386 (0.316–0.447) | 0.715 (0.412–0.528) | 0.423 (0.344–0.502) |
| MIMIC-III | LR | 0.680 (0.626–0.733) | 0.229 (0.211–0.244) | 0.622 (0.584–0.666) | 0.631 (0.581–0.691) | 0.596 (0.516–0.664) | 0.808 (0.769–0.849) | 0.375 (0.324–0.434) | 0.709 (0.411–0.517) | 0.448 (0.375–0.522) |
| MIMIC-III | Naive Bayes | 0.682 (0.634–0.737) | 0.227 (0.201–0.251) | 0.686 (0.649–0.727) | 0.753 (0.719–0.800) | 0.500 (0.412–0.577) | 0.802 (0.762–0.840) | 0.429 (0.355–0.503) | 0.777 (0.393–0.530) | 0.456 (0.373–0.536) |
| MIMIC-III | XGBoost | 0.689 (0.641–0.745) | 0.225 (0.202–0.248) | 0.666 (0.625–0.709) | 0.697 (0.654–0.741) | 0.575 (0.500–0.665) | 0.815 (0.775–0.857) | 0.414 (0.351–0.497) | 0.752 (0.419–0.561) | 0.465 (0.374–0.551) |
Performance metrics are presented with 95% confidence intervals derived from 200 bootstrap resamples. Confidence intervals were computed separately for each dataset using the nonparametric percentile method.
CI Confidence Interval; KNN K-nearest neighbors; LR logistic regression; NPV negative predictive value; PPV positive predictive value; XGBoost extreme gradient boosting; AUC area under the receiver operating characteristic curve; AUPRC area under the precision-recall curve;
Association between key features and in-hospital mortality
To statistically validate the clinical relevance of the 19 features selected by the Boruta algorithm, we compared their distributions between survivors and non-survivors within the training cohort (n = 2,368). As detailed in Supplementary Material 6, non-survivors presented with significantly greater illness severity and physiological derangement. The SAPS-II score, the most important predictor in our model, was markedly higher in non-survivors (median [IQR]: 46.1 [34.0–58.7]) compared to survivors (34.9 [26.1–43.7]; p < 0.001). Similarly, the use of critical interventions such as mechanical ventilation (69.3% vs. 41.9%), vasopressors (38.8% vs. 17.1%), and sedatives (30.2% vs. 19.7%) was substantially more frequent among non-survivors (all p < 0.001). Vital signs indicative of stress, including higher heart rate (94.6 vs. 86.9 beats/min) and respiratory rate (22.1 vs. 20.2 breaths/min), were also strongly associated with mortality (p < 0.001). Laboratory abnormalities reflecting organ dysfunction or comorbidity burden, such as elevated creatinine, blood urea nitrogen, white blood cell count, and lower hemoglobin levels, were all significantly worse in the non-survivor group (all p < 0.01). These univariate analyses confirm that the machine learning model successfully identified variables with strong statistical associations to the outcome, thereby reinforcing the biological and clinical plausibility of our predictive framework.
SHAP -based interpretability assessment
To enhance the model’s interpretability, we performed SHAP analysis on the AdaBoost model. Figure 6 presents the global interpretation plots from SHAP analysis, where Fig. 6A displays the beeswarm plot with model features on the y-axis and their corresponding SHAP values on the x-axis. In the beeswarm plot, yellow dots indicate strong positive contributions to predictions while purple dots represent negative or minimal impacts, with wider horizontal distributions reflecting greater variability in feature effects. Figure 6B shows the feature importance plot, which ranks variables by their mean absolute SHAP values, providing a comprehensive visualization of each feature’s global impact on model outputs. As illustrated in Fig. 6, the top five most influential predictive variables were identified as the SAPS-II score (Simplified Acute Physiology Score II), requirement for mechanical ventilation, heart rate, body temperature, and respiratory rate, which collectively demonstrated the strongest associations with clinical outcomes in our predictive model. The discriminative performance of SAPS-II across different datasets is provided in Supplementary Material 7.
Fig. 6.
SHAP-based interpretability analysis of the AdaBoost model: (A) Beeswarm plot of feature contributions and (B) Mean absolute SHAP values for feature importance. Legend: AFib atrial fibrillation; BUN blood urea nitrogen; HCO3 bicarbonate; Hb hemoglobin; HR heart rate; MAP mean arterial pressure; RR respiratory rate; SAPS-II: simplified acute physiology score II; SHAP SHapley Additive exPlanations; SpO2 oxygen saturation; WBC white blood cell count.
Figure 7 presents the local interpretability analysis using SHAP force plots, illustrating the model’s prediction process for an individual patient. The final prediction output (f(x) = 1) demonstrates that negative cumulative effects lowered the predicted value below the baseline, classifying this patient as a survivor. SHAP value analysis identified SAPS-II score, ventilation status, and SpO2 levels as the primary determinants driving this prediction, with each factor’s relative contribution quantitatively visualized in the force plot representation.
Fig. 7.
SHAP force plot analysis of individual mortality risk prediction This plot explains the AdaBoost model’s survival prediction for a specific patient. The baseline average output across the training cohort is E[f(x)] = 1.48. Features that increase the risk of in-hospital death are shown as yellow arrows pushing right (e.g., high respiratory rate, mechanical ventilation), while features that decrease the risk (protective factors) are shown as purple arrows pushing left (e.g., low SAPS-II score, normal SpO2 and platelet count). The model’s final prediction (f(x) = 1, located on the bottom axis) is the result of summing all these directional contributions. In this case, the combined protective effect of the purple features outweighed the risk posed by the yellow features, leading to a prediction of survival. Legend: RR respiratory rate; SAPS-II simplified acute physiology score II; SpO2 oxygen saturation.
Interactive model visualization for clinical decision support
To facilitate clinical application, we developed a user-friendly web-based calculator (available at: https://nanzihan1998.shinyapps.io/Mortality/) that enables real-time mortality risk assessment for HF patients with comorbid malignancy.
Discussion
This study comprises two integrated components: association analysis and ML.
The first component systematically employs three distinct association analysis methodologies to conclusively demonstrate that HF patients with comorbid malignancy experience significantly worse clinical outcomes. Three complementary association analysis approaches consistently demonstrated that malignancy significantly increased in-hospital mortality among ICU-admitted HF patients: PSM (OR 1.12, 95% CI [1.00–1.24]), IPTW (OR 1.17, 95% CI [1.04–1.31]), and multivariate logistic regression (OR 1.21, 95% CI [1.08–1.36]). The concordant results across all methods robustly confirm the detrimental impact of malignancy on clinical outcomes in this vulnerable population.
The poorer prognosis observed in patients with comorbid malignancies stems from multiple factors, with treatment-related cardiotoxicity representing one of the significant contributors. Anthracyclines, cornerstone agents for various solid and hematologic malignancies23, induce dose-dependent cardiomyocyte damage through topoisomerase 2β inhibition, activating cell death pathways and impairing mitochondrial biogenesis24,25. Other chemotherapeutic agents including 5-fluorouracil26, cyclophosphamide27, and paclitaxel28 similarly demonstrate cardiotoxic effects. Beyond chemotherapy, immune checkpoint inhibitors (ICIs) represent a breakthrough in cancer therapy by blocking PD-1/PD-L1 or CTLA-4 to restore antitumor immunity29 . However, ICIs frequently induce inflammatory toxicities termed immune-related adverse events (irAEs) 30. Unlike chemotherapy-induced organ damage, irAEs exhibit unpredictable onset and severity30. Cardiac involvement occurs in 1.14% of ICI recipients, increasing to 2.4% with combination therapy31 . ICI-associated cardiotoxicity correlates with elevated mortality and often necessitates treatment interruption, requiring high-dose corticosteroids for management32. In addition to treatment-related cardiotoxicity, cardiac metastasis—particularly to the myocardium or pericardium—can directly compromise cardiac structure and function, exacerbating HF severity. Furthermore, the metabolic demands of rapidly proliferating tumor cells induce a catabolic state characterized by hypoalbuminemia and anemia. This tumor-associated malnutrition exacerbates myocardial energy deficiency in HF patients, whose compromised cardiac output already limits nutrient delivery. The resultant impairment of cardiac repair mechanisms creates a vicious cycle that accelerates disease progression.
The second component focuses specifically on HF patients with comorbid malignancy, establishing a ML-based predictive model for in-hospital mortality among this high-risk population admitted to ICU. The predictive model was developed using five ML algorithms incorporating 19 carefully selected clinical variables from the first 24 h of ICU admission. Comparative evaluation demonstrated AdaBoost’s superior performance, with Youden’s index identifying patients having a predicted probability > 0.483 as high-risk for in-hospital mortality. In external validation, the AdaBoost model showed AUPRC values of 0.417 (MIMIC-IV) and 0.483 (MIMIC-III). These results reflect the inherent difficulty of predicting in-hospital mortality in this complex patient population, and suggest that further refinement of the model may be beneficial prior to prospective evaluation. To enhance model credibility, SHAP analysis was employed for comprehensive interpretation—the summary plot provided global visualization of all 19 risk factors’ contributions, while force plots enabled individualized prediction explanations for clinical implementation.
The SAPS-II score emerged as the most significant predictive variable in our model33. As a well-validated scoring system specifically designed to assess mortality risk in critically ill patients, SAPS-II provides a comprehensive evaluation of illness severity and prognostic outcomes. Its widespread adoption in ICUs and relative ease of acquisition further enhance its clinical utility for risk stratification. Mechanical ventilation requirement ranked as the second most important predictor, with the beeswarm plot demonstrating significantly worse outcomes in ventilated patients. In HF, elevated left ventricular filling pressures frequently lead to alveolar pulmonary edema, impairing oxygenation and ventilation—a pathophysiological cascade culminating in respiratory failure34. Substantial evidence indicates that HF patients complicated by respiratory failure exhibit poorer prognoses, warranting prompt positive-pressure mechanical ventilation to improve clinical outcomes35. Our study further identified elevated heart rate as an independent predictor of poorer outcomes, a finding consistent with prior evidence. The study by Alessia Lena et al. revealed that patients with malignancy exhibit a significantly faster resting heart rate compared to those without malignancy, and sinus tachycardia in cancer patients is significantly associated with increased mortality36,37. This clinical observation suggests that tachycardia in this population is not solely attributable to heart failure, but may also be linked to factors such as pain and anxiety induced by the tumor or its metastases, as well as direct side effects of specific anticancer therapies. For patients with tachycardia, pharmacological interventions including β-blockers and ivabradine may be considered to attenuate sympathetic overactivation, thereby potentially improving clinical prognosis38–40. Notably, observations in heart transplant recipients have also demonstrated a significant correlation between elevated heart rate and deterioration of cardiac function, reinforcing the pathophysiological relevance of heart rate modulation in cardiac patients41. Hypothermia has been consistently associated with adverse clinical outcomes in HF patients. This association may stem from severely compromised cardiac output in advanced disease stages, leading to systemic hypoperfusion, impaired tissue oxygenation, and consequent thermoregulatory failure—a maladaptive cascade that exacerbates end-organ dysfunction. Our model additionally incorporated clinically relevant variables from the following categories: comorbidities (atrial fibrillation); critical interventions within the first 24 h of ICU admission (vasoactive drugs and sedatives); vital signs (respiratory rate, peripheral oxygen saturation, mean arterial pressure); and laboratory tests (white blood cell count, blood urea nitrogen, creatinine, hemoglobin, bicarbonate, chloride, sodium, potassium, and platelet count).
This study possesses several notable merits. First, it represents the first investigation to systematically demonstrate worse prognosis in HF patients with comorbid malignancy using three distinct association analysis methodologies. Second, we developed a ML-based predictive model for in-hospital mortality among ICU-admitted HF patients with malignancy, incorporating SHAP analysis to enhance model interpretability and facilitate clinical translation of artificial intelligence technology. Third, the visualization of our model enables user-friendly clinical application, supporting early mortality risk assessment to inform clinical decision-making.
Several limitations should be acknowledged. As a multicenter retrospective study, inherent issues of missing data and outliers exist, though we employed rigorous statistical methods to maximize data validity. Our model currently utilizes only cross-sectional data from the first ICU day; future incorporation of longitudinal data may improve predictive accuracy. Additionally, HF was defined using ICD codes without ejection fraction stratification due to insufficient sample size for subtype analysis and lack of uniform echocardiogram data across databases. Consequently, our model does not account for potential differences in malignancy’s impact across HF subtypes. Future prospective studies are warranted to address these limitations and validate the model’s clinical utility. Prospective trials should assess this system’s impact on outcomes and resource allocation, alongside cost-effectiveness analyses.
Our study employs SHAP as the principal method for addressing model interpretability. While SHAP offers valuable post-hoc quantification of feature importance and has gained broad acceptance, we recognize its inherent limitations in providing complete clinical interpretability. As critically examined in recent literature42, methods such as SHAP can exhibit instability and do not inherently reflect causal relationships. The insights derived from our analysis—for instance, the identification of SAPS-II and mechanical ventilation as top predictors—primarily reaffirm established clinical understanding of illness severity. These findings do not, by themselves, uncover novel pathophysiology nor ensure that intervening on features with high SHAP values will lead to improved outcomes. Consequently, the SHAP outputs presented in this study should be regarded as a tool to facilitate clinician engagement and critical model evaluation, rather than as a definitive basis for clinical decision-making. Future research should seek to augment such explanatory approaches with causal inference frameworks and prospective validation to assess the clinical utility of these insights.
Conclusions
Through observational analyses using multiple adjustment methods, we found that malignancy was associated with increased in-hospital mortality in HF patients admitted to the ICU. We developed a machine learning model that showed moderate predictive performance for mortality risk in this population. SHAP analysis provided insights into key predictors, offering a potentially useful tool for risk stratification. However, prospective validation and clinical impact studies are needed before this model can be recommended for clinical use.
Supplementary Information
Acknowledgment
We would like to express our sincere gratitude to the official operators of the MIMIC and eICU databases for providing access to these valuable clinical datasets. This study was supported by the Health Commission of Hebei Province and the Department of Science and Technology of Hebei Province. Their support was instrumental in facilitating this research endeavor.
Abbreviations
- AdaBoost
Adaptive boosting
- CBPS
Covariate balancing propensity score
- CRRT
Continuous renal replacement therapy
- eICU
EICU collaborative research database
- HF
Heart failure
- ICD
International classification of diseases
- ICI
Immune checkpoint inhibitor
- ICU
Intensive care unit
- IPTW
Inverse probability treatment weighting
- KNN
K-nearest neighbors
- LR
Logistic regression
- MIMIC
Medical information mart for intensive care
- ML
Machine learning
- NB
Naïve Bayes
- PSM
Propensity score matching
- RDW
Red cell distribution width
- ROSE
Random over-sampling examples
- SAPS-II
Simplified acute physiology score II
- SHAP
SHapley Additive exPlanations
- SMD
Standardized mean difference
- SpO2
Peripheral oxygen saturation
- STROBE
STrengthening the reporting of observational studies in epidemiology
- TRIPOD
Transparent reporting of a multivariable prediction model for individual prognosis or diagnosis
- XGBoost
EXtreme gradient boosting
Author contributions
Tao Zhang and Zihan Nan created the study protocol and wrote the first manuscript draft. Zihan Nan performed all data collection and statistical analyses. Shaohan Guo conceived the study and critically revised the manuscript. Shiju Yang assisted with the study design. Leying Li assisted with manuscript editing. Yifei Zhang assisted with the interpretation of statistical methods. Yan Xin assisted with manuscript revision and data validation. Zhenjie Hu and Congcong Zhao supervised the study, contributed to data interpretation, and finalized the manuscript. All authors read and approved the final manuscript.
Funding
This work was supported by the Medical Science Research Project of Hebei (Grant No. 20250673) and the S&T Program of Hebei, China (No. 223777104D).
Data availability
The data extracted in this study are available from the corresponding authors upon reasonable request.
Competing interests
The authors declare no competing interests.
Ethical approval
The eICU database and MIMIC-III/IV databases were also approved by the Massachusetts Institute of Technology (Cambridge, MA) and Beth Israel Deaconess Medical Center (Boston, MA), and consent was obtained for the original data collection.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Tao Zhang and Zihan Nan contributed equally to this work.
Contributor Information
Zhenjie Hu, Email: 46400533@hebmu.edu.cn.
Congcong Zhao, Email: syicuzcc@hebmu.edu.cn.
References
- 1.Koene, R. J., Prizment, A. E., Blaes, A. & Konety, S. H. Shared risk factors in cardiovascular disease and cancer. Circulation133, 1104–1114. 10.1161/CIRCULATIONAHA.115.020406 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Khan, M. S. et al. Global epidemiology of heart failure. Nat. Rev. Cardiol.21, 717–734. 10.1038/s41569-024-01046-6 (2024). [DOI] [PubMed] [Google Scholar]
- 3.Wang, H. et al. Mortality in patients admitted to hospital with heart failure in China: a nationwide Cardiovascular Association Database-Heart Failure Centre Registry cohort study. Lancet Glob. Health.12, e611–e622. 10.1016/S2214-109X(23)00605-8 (2024). [DOI] [PubMed] [Google Scholar]
- 4.Wu, Z., Xia, F. & Lin, R. Global burden of cancer and associated risk factors in 204 countries and territories, 1980-2021: a systematic analysis for the GBD 2021. J. Hematol. Oncol.17, 119. 10.1186/s13045-024-01640-8 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Nohria, A. Double jeopardy: cancer and heart failure. J. Card. Fail.25, 522–523. 10.1016/j.cardfail.2019.05.002 (2019). [DOI] [PubMed] [Google Scholar]
- 6.Tuzovic, M. et al. National outcomes in hospitalized patients with cancer and comorbid heart failure. J. Card. Fail.25, 516–521. 10.1016/j.cardfail.2019.02.007 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Li, J. et al. Predicting mortality in intensive care unit patients with heart failure using an interpretable machine learning model: retrospective cohort study. J. Med. Internet Res.24, e38082. 10.2196/38082 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Peng, S. et al. Interpretable machine learning for 28-day all-cause in-hospital mortality prediction in critically ill patients with heart failure combined with hypertension: a retrospective cohort study based on medical information mart for intensive care database-IV and eICU databases. Front. Cardiovasc. Med.9, 994359. 10.3389/fcvm.2022.994359 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Vinter, N. et al. Development and validation of prediction models for incident atrial fibrillation in heart failure. Open Heart10.1136/openhrt-2022-002169 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Hounye, A. H., Xiong, L. & Hou, M. Integrated explainable machine learning and multi-omics analysis for survival prediction in cancer with immunotherapy response. Apoptosis30, 364–388. 10.1007/s10495-024-02050-4 (2024). [DOI] [PubMed] [Google Scholar]
- 11.Montazeri, M., Montazeri, M., Montazeri, M. & Beigzadeh, A. Machine learning models in breast cancer survival prediction. Technol. Health Care.24, 31–42. 10.3233/thc-151071 (2016). [DOI] [PubMed] [Google Scholar]
- 12.Lundberg, S. M. & Lee, S.-I. A unified approach to interpreting model predictions. Adv. Neural Inf. Process. Syst.30, 785 (2017).
- 13.Vandenbroucke, J. P. et al. Strengthening the reporting of observational studies in epidemiology (STROBE): explanation and elaboration. PLoS Med4, e297. 10.1371/journal.pmed.0040297 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Collins, G. S., Reitsma, J. B., Altman, D. G. & Moons, K. G. Transparent reporting of a multivariable prediction model for individual prognosis or diagnosis (TRIPOD): the TRIPOD statement. BMJ350, g7594. 10.1136/bmj.g7594 (2015). [DOI] [PubMed] [Google Scholar]
- 15.Pollard, T. J. et al. The eICU collaborative research database, a freely available multi-center database for critical care research. Sci. Data5, 180178. 10.1038/sdata.2018.178 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Johnson, A. E. W. et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci Data10, 1. 10.1038/s41597-022-01899-x (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Johnson, A. E. et al. MIMIC-III, a freely accessible critical care database. Sci Data3, 160035. 10.1038/sdata.2016.35 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Pujianto, U., Wibawa, A. P. & Akbar, M. I. In 2019 5th International Conference on Science in Information Technology (ICSITech), 83–88 (IEEE).
- 19.Haukoos, J. S. & Lewis, R. J. The propensity score. JAMA314, 1637–1638 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Imai, K. & Ratkovic, M. Covariate balancing propensity score. J. R. Stat. Soc. B Stat. Methodol.76, 243–263 (2014). [Google Scholar]
- 21.Kursa, M. B. & Rudnicki, W. R. Feature selection with the BorutaPackage. J. Stat. Softw.36, 152. 10.18637/jss.v036.i11 (2010).
- 22.Lundberg, S. M. et al. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell.2, 56–67. 10.1038/s42256-019-0138-9 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Bloom, M. W. et al. Cardio-oncology and heart failure: a scientific statement from the Heart Failure Society of America. J Card Fail31, 415–455. 10.1016/j.cardfail.2024.08.045 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Henriksen, P. A. Anthracycline cardiotoxicity: an update on mechanisms, monitoring and prevention. Heart104, 971–977. 10.1136/heartjnl-2017-312103 (2018). [DOI] [PubMed] [Google Scholar]
- 25.Agunbiade, T. A., Zaghlol, R. Y. & Barac, A. Heart failure in relation to anthracyclines and other chemotherapies. Methodist Debakey Cardiovasc. J.15, 243–249. 10.14797/mdcj-15-4-243 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Gradishar, W. J. & Vokes, E. E. 5-Fluorouracil cardiotoxicity: a critical review. Ann. Oncol.1, 409–414. 10.1093/oxfordjournals.annonc.a057793 (1990). [DOI] [PubMed] [Google Scholar]
- 27.Iqubal, A. et al. Molecular mechanism involved in cyclophosphamide-induced cardiotoxicity: old drug with a new vision. Life Sci.218, 112–131. 10.1016/j.lfs.2018.12.018 (2019). [DOI] [PubMed] [Google Scholar]
- 28.Perez, E. A. Paclitaxel and cardiotoxicity. J. Clin. Oncol.16, 3481–3482. 10.1200/JCO.1998.16.11.3481 (1998). [DOI] [PubMed] [Google Scholar]
- 29.Arafat Hossain, M. A comprehensive review of immune checkpoint inhibitors for cancer treatment. Int. Immunopharmacol.143, 113365. 10.1016/j.intimp.2024.113365 (2024). [DOI] [PubMed] [Google Scholar]
- 30.Wang, S. J., Dougan, S. K. & Dougan, M. Immune mechanisms of toxicity from checkpoint inhibitors. Trends Cancer9, 543–553. 10.1016/j.trecan.2023.04.002 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Mahmood, S. S. et al. Myocarditis in patients treated with immune checkpoint inhibitors. J. Am. Coll. Cardiol.71, 1755–1764. 10.1016/j.jacc.2018.02.037 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Patel, R. P. et al. Cardiotoxicity of immune checkpoint inhibitors. Curr. Oncol. Rep.23, 79. 10.1007/s11912-021-01070-6 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Keegan, M. T., Gajic, O. & Afessa, B. Severity of illness scoring systems in the intensive care unit. Crit. Care Med.39, 163–169. 10.1097/CCM.0b013e3181f96f81 (2011). [DOI] [PubMed] [Google Scholar]
- 34.Alviar, C. L. et al. Positive pressure ventilation in cardiogenic shock: review of the evidence and practical advice for patients with mechanical circulatory support. Can. J. Cardiol.36, 300–312. 10.1016/j.cjca.2019.11.038 (2020). [DOI] [PubMed] [Google Scholar]
- 35.Tavazzi, G. Mechanical ventilation in cardiogenic shock. Curr. Opin. Crit. Care27, 447–453. 10.1097/MCC.0000000000000836 (2021). [DOI] [PubMed] [Google Scholar]
- 36.Lena, A. et al. Clinical and prognostic relevance of cardiac wasting in patients with advanced cancer. J. Am. Coll. Cardiol.81, 1569–1586. 10.1016/j.jacc.2023.02.039 (2023). [DOI] [PubMed] [Google Scholar]
- 37.Hemu, M. et al. Associations between sinus tachycardia and adverse cardiovascular outcomes and mortality in cancer patients. J. Thorac. Dis.13, 4845–4852. 10.21037/jtd-21-779 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Kapoor, J. R. & Heidenreich, P. A. Role of heart rate as a marker and mediator of poor outcome for patients with heart failure. Curr. Heart Fail. Rep.9, 133–138. 10.1007/s11897-012-0086-8 (2012). [DOI] [PubMed] [Google Scholar]
- 39.Sciatti, E., Vizzardi, E., Bonadei, I., Dallapellegrina, L. & Carubelli, V. The role of heart rate and ivabradine in acute heart failure. Monaldi. Arch. Chest. Dis.10.4081/monaldi.2019.1091 (2019). [DOI] [PubMed] [Google Scholar]
- 40.Kubrychtova, V. et al. Heart rate recovery and prognosis in heart failure patients. Eur. J. Appl. Physiol.105, 37–45. 10.1007/s00421-008-0870-z (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Liebo, M. et al. Elevated heart rate following heart transplantation is associated with increased graft vasculopathy and mortality. J. Card. Fail.25, 249–256. 10.1016/j.cardfail.2019.01.009 (2019). [DOI] [PubMed] [Google Scholar]
- 42.Bienefeld, N. et al. Solving the explainable AI conundrum by bridging clinicians’ needs and developers’ goals. npj Digit. Med.6, 94. 10.1038/s41746-023-00837-4 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The data extracted in this study are available from the corresponding authors upon reasonable request.






