Development and validation of a multimodal machine learning prediction model for heart failure after acute myocardial infarction Authors: Xiaojun Wu, Haoning Cui, Shiyu Wang, Xianghui Zheng, Xinyu Hou, Liyan Ran, Jiaqi Liu, Zhuozhong Wang, Meiqiao Ren, Jing Yao, Huan Ma, Yang Zheng, Jian Wu, Bo Yu Published: 2026 ABSTRACT AbstractHeart failure after acute myocardial infarction (post-MI HF) has become a major global health problem. Accurate risk prediction is essential for optimising management and preventing post-MI HF. However, existing models rely mainly on resting-state clinical examinations and inadequately reflect the complex pathophysiology of post-MI HF. We aimed to develop and validate a multimodal machine learning (ML) model incorporating cardiopulmonary exercise testing (CPET) data to predict post-MI HF risk and to quantify CPET’s incremental value.This study included 3172 acute myocardial infarction (AMI) patients who underwent CPET at three hospitals from 2018 to 2023. The primary outcome was post-MI HF within 1 year. Thirteen ML algorithms were used to select clinical and CPET variables and to construct multimodal prediction models. The incremental predictive value of CPET was evaluated by the area under the curve (AUC), integrated discrimination improvement index (IDI), and net reclassification improvement index (NRI).After screening, 2221 patients were included, of whom 221 (10.0%) developed post-MI HF. The optimal multimodal ML model achieved an AUC of 0.987 (95% CI: 0.982–0.992) in training set and 0.929 (95% CI: 0.903–0.955) in external validation set. Ablation analyses showed that CPET significantly improved discrimination (AUC: 0.890 vs. 0.929, P=0.003), calibration (IDI=0.135 [95% CI: 0.082–0.189], P<0.001), and reclassification (NRI=0.154 [95% CI: 0.073–0.234], P<0.001). The model effectively stratified low- and high-risk patients (3.1% vs. 54.7%, P<0.001). The multimodal ML model accurately predicted post-MI HF and highlighted the additive value of CPET in risk stratification. The web-based risk calculator derived from this model may support early identification of high-risk patients and facilitate personalised management.Supplementary InformationThe online version contains supplementary material available at https://doi.org/10.1007/s10238-026-02230-3.Keywords: Cardiopulmonary exercise testing, Cardiac rehabilitation, Acute myocardial infarction, Heart failure, Machine learning Introduction Heart failure after acute myocardial infarction (post-MI HF) is a major global health problem[1]. Although advances in acute reperfusion therapy, pharmacological treatment, and secondary prevention have improved survival in patients with acute myocardial infarction (AMI) [1, 2], a growing number of survivors remain at high risk of impaired cardiac function [3]. In recent years, approximately one quarter of patients with AMI have progressed to post-MI HF and face increased risks of mortality and rehospitalisation [4], highlighting the urgent need for effective strategies to reduce HF risk [5, 6]. Importantly, the progression from myocardial injury to HF is often silent, and early pathophysiological changes frequently occur before clinical symptoms appear [7, 8]. Therefore, early identification of patients at risk of post-MI HF is essential for timely prevention, and the development of accurate prediction models is a key approach for risk stratification and prognosis improvement. Previous models for predicting post-MI HF risk have mainly been based on resting-state clinical characteristics, laboratory biomarkers, and echocardiographic parameters [9–13]. Although these models have partly advanced post-MI HF risk assessment, their predictive performance remains limited because they rely largely on resting measurements and do not adequately reflect the complex and dynamic pathophysiological processes involved in the progression from myocardial injury to overt HF [14]. To address this limitation, the present study introduces cardiopulmonary exercise testing (CPET), the clinical gold standard for assessing cardiopulmonary function [15, 16]. CPET allows comprehensive evaluation of cardiovascular, respiratory, and peripheral tissue function under exercise stress and provides functional information that cannot be obtained from resting examinations [15, 16]. Many studies have shown that CPET-derived parameters, such as peak oxygen uptake (VO₂ peak) and the ventilatory equivalent for carbon dioxide slope (VE/VCO₂ slope), reflect early cardiovascular functional impairment and predict adverse outcomes across different cardiovascular diseases [17, 18]. However, although CPET has clear advantages in assessing global cardiopulmonary function, detecting early functional impairment, and predicting adverse cardiovascular outcomes, its application in post-MI HF risk prediction remains limited. To date, no study has combined CPET variables with routine clinical characteristics and imaging parameters to develop a multimodal model for post-MI HF risk assessment. In addition, whether CPET-derived functional changes provide predictive information beyond traditional resting indices and their potential value in risk stratification remain unclear. This key evidence gap limits the wider use of CPET in risk assessment and preventive management of patients with AMI. Therefore, it is necessary to explore the feasibility and incremental predictive value of incorporating CPET into post-MI HF risk prediction models. In recent years, machine learning (ML) has shown clear advantages in cardiovascular risk prediction because it can handle high-dimensional data, capture complex nonlinear relationships, and integrate multi-source heterogeneous information [19]. Compared with traditional statistical models, ML algorithms are better at identifying latent associations among clinical, imaging, and functional features, which improves model accuracy and robustness [20, 21]. However, most previous studies have relied on a single ML algorithm for feature selection, which is prone to investigator selection bias and feature redundancy and limits clinical application [22]. To address this issue, the present study constructed an integrated feature selection framework by combining multiple ML algorithms with feature engineering techniques to reduce selection bias and improve predictive accuracy and robustness. On the basis of this background, this study aimed to develop and validate a multimodal ML model for predicting 1-year post-MI HF risk and to evaluate the incremental predictive value of CPET. This approach is expected to provide data-driven decision support for early identification and personalized prevention of post-MI HF and to promote a shift from symptom-driven treatment to early screening and proactive prevention, thereby having the potential to improving patient outcomes and optimising healthcare resource allocation. Methods Study design and participants The data used in this prognostic study were obtained from 3172 AMI patients who received standardized cycle ergometer-based symptom-limited CPET at the Second Affiliated Hospital of Harbin Medical University, Hegang People’s Hospital, and Guangdong Provincial People’s Hospital from January 2018 to December 2023. Patients were eligible for inclusion if they had a first diagnosis of AMI, were aged between 18 and 80 years, and underwent cycle ergometer-based symptom-limited CPET within 1 month after discharge. Patients were excluded if they developed HF during the index hospitalisation or before CPET, had a peak respiratory exchange ratio (RER) < 1.0 during CPET, or had missing data. This study was approved by the Ethics Committee of the Second Affiliated Hospital of Harbin Medical University (KY2025-028), and informed consent was obtained from all participants involved in the study. This research was conducted in accordance with the principles of the Declaration of Helsinki and reported following the Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis (TRIPOD) statement [23]. The research process of this study is shown in the Supplemental Material, Figure S1. Outcome The primary outcome was new-onset post-MI HF within 1 year after discharge for AMI, defined as the first occurrence of HF during this period in patients with AMI. The diagnosis of HF was strictly determined according to the 2021 ESC Guidelines for the diagnosis and treatment of acute and chronic heart failure [24]. We collected patient information by reviewing medical records and follow-up data. Follow-up was conducted at 1, 3, 6, and 12 months after discharge through telephone or outpatient interviews. Cardiopulmonary exercise testing This study included CPET data from patients with AMI from three hospitals. All CPET assessments were performed before the initiation of cardiac rehabilitation and were conducted by experienced staff in accordance with published guidelines [16]. All participants underwent a standardised cycle ergometer-based symptom-limited CPET. A ramp protocol was used for all tests, in which the work rate was increased continuously in small increments to provide a smooth, progressive increase in exercise intensity. This protocol is designed to achieve a symptom-limited exercise duration within the recommended range [25]. Peak RER was used as an objective indicator of exercise effort adequacy, and a peak RER < 1.0 was considered suggestive of inadequate effort. Peak VO₂ was defined as the highest 30 s average obtained within the last minute of exercise up to the first 15 s of recovery [26]. The VE/VCO₂ slope was calculated by linear regression from exercise onset to peak exercise [27]. In all tests, the ramp protocol involved continuous increases in work rate in small increments to provide a smooth and progressive rise in exercise intensity, with the aim of achieving a symptom-limited exercise duration within the recommended range. Since the subjects of this study were patients with AMI, exercise duration was not used as an exclusion criterion. Statistical analysis All the statistical analyses were performed via R 4.3.2 and Python 3.12.0. Continuous variables with normal distributions are expressed as the means and standard deviations [means (SDs)] and were compared via t tests. Continuous variables with a nonnormal distribution are presented as medians and quartiles [M (Q1, Q3)] and were analysed via the Mann–Whitney U test. The chi-square test or Fisher’s exact test was used to compare categorical variables, which are expressed as the number of cases and the constituent ratio [N (%)]. A comprehensive list of all R packages used in this study, along with their versions, is provided in the Supplemental Material, Table S1. Ensemble feature selection framework and post-MI HF risk assessment system Currently, numerous ML algorithms are available for data analysis and outcome evaluation. However, the predictions provided by different algorithms may vary depending on the characteristics of the dataset, and constructing models via a single ML algorithm still has limitations. Ensemble modelling reduces the generalization error and improves the reliability of prediction results by utilizing a series of different and independent models for prediction [28, 29]. Therefore, in the present study, we combined multiple ML algorithms and feature engineering techniques to build an ensemble feature selection framework (Supplemental Material, Figure S2) to further enhance the predictive performance of binary classification tasks. The workflow for developing and validating the post-MI HF risk assessment system via the feature selection framework is described in Supplemental Material, Methods. Results Patient characteristics A total of 2221 AMI patients who underwent symptom-limited CPET met our inclusion criteria for preliminary analysis. The baseline characteristics of patients who did not develop post-MI HF within 1 year (n = 2000) and those who developed post-MI HF within 1 year (n = 221) are presented in Table 1. The median age was 57.0 years (IQR, 50.0–63.0), 610 (27.5%) patients were female, and 1507 (67.9%) patients had ST-segment elevation myocardial infarction (STEMI). During the 1-year follow-up period, 221 (10.0%) patients developed post-MI HF. The most common comorbidities were hypertension in 1046 (47.1%) patients, dyslipidaemia in 932 (42.0%) patients, and diabetes in 516 (23.2%) patients. Table 1Comparison of baseline between patients with and without HFCharacteristicOverall,n = 2,221Non-HF,n = 2,000HF,n = 221P valueDemographicsAge, years57.00 (50.00, 63.00)56.00 (49.00, 62.00)60.00 (54.00, 68.00)< 0.001Sex, n (%)0.080Male1,611 (72.5%)1,462 (73.1%)149 (67.4%)Female610 (27.5%)538 (26.9%)72 (32.6%)BMI, kg/m225.60 (23.50, 27.70)25.60 (23.50, 27.77)25.40 (23.40, 27.30)0.052STEMI, n (%)1,507 (67.9%)1,331 (66.6%)176 (79.6%)< 0.001 Disease history Hypertension, n (%)1,046 (47.1%)927 (46.4%)119 (53.9%)0.039Dyslipidemia, n (%)932 (42.0%)853 (42.7%)79 (35.8%)0.052Diabetes, n (%)516 (23.2%)461 (23.1%)55 (24.9%)0.557Stroke, n (%)169 (7.6%)145 (7.3%)24 (10.9%)0.061Smoke, n (%)1,633 (73.5%)1,477 (73.9%)156 (70.6%)0.297 Medication Antiplatelet medications, n (%)2,186 (98.4%)1,971 (98.6%)215 (97.3%)0.152Beta-blocker, n (%)1,382 (62.2%)1,236 (61.8%)146 (66.1%)0.242ACEI, n (%)656 (29.5%)582 (29.1%)74 (33.5%)0.187 Laboratory examination LVEDD, mm47.50 (44.50, 50.00)47.10 (44.20, 50.00)50.00 (46.60, 54.00)< 0.001EF, %61.00 (57.00, 63.00)61.00 (58.00, 63.00)55.00 (53.00, 59.00)< 0.001LDH, U/L318.00 (194.00, 571.00)292.50 (190.00, 508.50)773.00 (362.00, 1,378.00)< 0.001PLT, 109/L221.00 (177.00, 271.00)219.00 (176.00, 271.00)228.00 (180.00, 278.00)0.213RBC, 1012/L4.77 (4.30, 5.15)4.77 (4.30, 5.14)4.72 (4.30, 5.16)0.832WBC, 109/L10.80 (7.80, 14.20)10.70 (7.80, 14.00)12.10 (9.00, 15.70)< 0.001HGB, g/L152.00 (142.00, 161.00)152.00 (142.00, 161.00)152.00 (138.00, 160.00)0.201Crea, µmol/L85.00 (75.00, 93.00)85.00 (75.00, 93.00)86.00 (77.00, 99.00)0.009CK-MB, µg/L15.00 (9.00, 100.50)13.95 (9.00, 85.70)127.70 (13.20, 292.20)< 0.001TNI, µg/L12.00 (5.81, 38.47)11.00 (5.42, 32.00)49.10 (11.61, 123.58)< 0.001Bloodglucose, mmol/L6.74 (5.30, 9.04)6.64 (5.26, 8.89)7.33 (5.68, 9.56)0.003BUN, mmol/L5.40 (3.50, 6.90)5.30 (3.40, 6.81)6.16 (4.26, 7.89)< 0.001TC, mmol/L4.78 (4.10, 5.30)4.80 (4.10, 5.30)4.68 (4.05, 5.32)0.292TG, mmol/L1.22 (0.93, 1.76)1.22 (0.93, 1.76)1.24 (0.97, 1.78)0.372LDL, mmol/L3.00 (2.47, 3.54)3.01 (2.48, 3.54)2.88 (2.40, 3.57)0.457HDL, mmol/L1.12 (0.96, 1.28)1.12 (0.96, 1.28)1.12 (0.94, 1.30)0.926ALT, U/L24.00 (18.00, 38.00)23.00 (18.00, 36.00)31.00 (20.00, 58.00)< 0.001CK, U/L288.00 (96.00, 1,183.00)267.00 (96.00, 1,041.50)1,105.00 (105.00, 3,010.00)< 0.001NT-proBNP, pg/mL485.00 (177.00, 998.00)436.50 (158.50, 881.00)1,999.00 (667.00, 4,428.00)< 0.001NEUT, 109/L8.68 (5.10, 11.79)8.57 (5.09, 11.69)10.04 (6.39, 13.22)< 0.001Albumin, g/L42.00 (39.30, 44.60)42.10 (39.35, 44.70)41.30 (39.20, 44.30)0.118Lymphocytecount, 109/L2.12 (1.34, 2.89)2.12 (1.34, 2.90)2.14 (1.36, 2.86)0.551 CPET parameters VO2 peak, mL/kg/min16.30 (14.00, 18.70)16.50 (14.20, 19.00)13.60 (11.50, 16.00)< 0.001VE/VCO2 slope27.37 (24.67, 30.50)27.07 (24.46, 30.17)30.60 (27.57, 33.20)< 0.001SBP peak, mmHg166.00 (150.00, 184.00)167.00 (151.00, 185.00)154.00 (137.00, 168.00)< 0.001DBP peak, mmHg88.00 (79.00, 97.00)89.00 (79.00, 98.00)84.00 (74.00, 93.00)< 0.001PETCO2 peak, mmHg38.90 (36.00, 42.10)39.00 (36.00, 42.45)36.00 (33.00, 39.30)< 0.001PETO2 peak, mmHg110.00 (106.80, 113.10)110.00 (106.70, 113.00)110.60 (107.10, 114.60)0.035O2pulse peak10.00 (8.30, 11.60)10.10 (8.50, 11.70)8.50 (7.00, 10.20)< 0.001VT peak, L/min1.44 (1.20, 1.72)1.46 (1.22, 1.73)1.24 (0.97, 1.47)< 0.001EQCO2 peak30.40 (27.76, 33.15)30.22 (27.56, 32.77)32.59 (30.20, 37.20)< 0.001EQO2 peak33.60 (30.50, 37.20)33.47 (30.38, 37.03)34.98 (31.50, 38.98)< 0.001Power peak, W101.00 (82.00, 120.00)102.00 (84.00, 121.00)82.00 (65.00, 103.00)< 0.001HR peak, bpm123.00 (112.00, 133.00)123.00 (112.50, 133.00)115.00 (107.00, 130.00)< 0.001HRr44.30 (35.63, 56.80)43.69 (35.51, 55.81)50.18 (38.71, 68.42)< 0.001HRR peak, bpm40.00 (30.00, 52.00)40.00 (30.00, 52.00)42.00 (31.00, 55.00)0.158VE peak, L/min39.84 (33.01, 47.90)40.56 (33.68, 48.23)33.77 (27.66, 41.65)< 0.001RER peak1.11 (1.05, 1.17)1.11 (1.05, 1.17)1.05 (1.02, 1.13)< 0.001Abbreviations: BUN, blood urea nitrogen; BMI, body mass index; CPET, cardiopulmonary exercise testing; CK, creatine kinase; Crea, creatinine; EF, ejection fraction; EQCO2 peak, peak ventilatory equivalent for carbon dioxide; EQO2 peak, ventilatory equivalent for oxygen; HRR peak, peak heart rate reserve; HRr, heart rate response; LDH, lactate dehydrogenase; LVEDD, left ventricular end-diastolic diameter; NEUT, neutrophil; NT-pro BNP, N-Terminal Pro-Brain Natriuretic Peptide; OUES peak, oxygen uptake efficiency slope; O2pulse, oxygen pulse; PETO2 peak, peak prtial pressure of end tidal oxygen; PETCO2 peak, peak prtial pressure of end tidal carbon dioxide; RER peak, peak respiratory exchange ratio; TNI, troponin I; STEMI, acute ST-segment elevation myocardial infarction; VT peak, peak tidal volume; VE/VCO2 slope, minute ventilation/carbon dioxide production slope; VO2 peak, peak oxygen uptake; VE peak, peak ventilation Comparison of baseline between patients with and without HF Abbreviations: BUN, blood urea nitrogen; BMI, body mass index; CPET, cardiopulmonary exercise testing; CK, creatine kinase; Crea, creatinine; EF, ejection fraction; EQCO2 peak, peak ventilatory equivalent for carbon dioxide; EQO2 peak, ventilatory equivalent for oxygen; HRR peak, peak heart rate reserve; HRr, heart rate response; LDH, lactate dehydrogenase; LVEDD, left ventricular end-diastolic diameter; NEUT, neutrophil; NT-pro BNP, N-Terminal Pro-Brain Natriuretic Peptide; OUES peak, oxygen uptake efficiency slope; O2pulse, oxygen pulse; PETO2 peak, peak prtial pressure of end tidal oxygen; PETCO2 peak, peak prtial pressure of end tidal carbon dioxide; RER peak, peak respiratory exchange ratio; TNI, troponin I; STEMI, acute ST-segment elevation myocardial infarction; VT peak, peak tidal volume; VE/VCO2 slope, minute ventilation/carbon dioxide production slope; VO2 peak, peak oxygen uptake; VE peak, peak ventilation This study further compared the clinical and CPET characteristics between patients who did and did not develop post-MI HF (Table 1). The results revealed significant differences between the two groups in terms of age, AMI type, history of hypertension, left ventricular end-diastolic diameter (LVEDD), ejection fraction (EF), lactate dehydrogenase (LDH), white blood cell count, creatinine, creatine kinase-MB (CK-MB), troponin I (TNI), blood glucose, blood urea nitrogen (BUN), alanine aminotransferase, creatine kinase, N-terminal pro-brain natriuretic peptide (NT-proBNP), and neutrophil (NEUT) and CPET characteristics, except for peak heart rate reserve (HRR peak). Identification of the optimal feature set through the ensemble feature selection framework First, we generated 146 ML models through an ensemble feature selection framework (Supplemental Material, Figure S3). We then extracted and comprehensively analysed the features and weights used in the 146 models and selected the 14 most influential variables as the optimal feature set (Fig. 1A). It comprises seven clinical variables (EF, NT-proBNP, LDH, LVEDD, CKMB, TnI, and age) and seven CPET variables: VO2 peak, VE/VCO2 slope, peak tidal volume (VT peak), ventilatory equivalent for carbon dioxide (EQCO2 peak), peak partial pressure of end tidal carbon dioxide (PETCO2 peak), RER peak, and peak power. (A) Frequency of feature usage and weight contribution in the 146 models. (B) AUC of each machine learning models in the development and validation cohort. (C) Predictive performance comparison of XGBoost models with different feature combinations. (D) Calibration curves and (E) decision curves of the best XGBoost model Model development and validation Using these features, we refitted the models with the 13 ML algorithms in the training set. The AUC of each model in the development and validation cohorts is shown in Fig. 1B. The XGBoost model performed the best. In the training set, the AUC was 0.987 (95% CI: 0.982–0.992). After three cross-validation methods, the average internal validation AUC was 0.924, and the AUC of the external validation cohort was 0.929 (95% CI: 0.903–0.955) (Supplemental Material, Table S3), indicating strong discriminative ability. We subsequently selected this optimal model as Model 1 (CPET-integrated model), and after removing the CPET-specific indicators, we refitted Model 2 (Clinical-only model) using the same hyperparameters. The performance comparison of the three models is presented in Supplemental Material, Table S4. As shown in Fig. 1C, the AUC of Model 1 was significantly greater than that of Model 2 (0.929 vs. 0.890, DeLong test, P = 0.003), indicating that CPET-specific variables significantly enhance the discrimination ability for predicting post-MI HF. The results of the NRI and IDI analyses consistently highlighted the incremental predictive value of CPET. Compared with Model 1 and Model 2, adding CPET significantly improved both reclassification (categorical NRI = 0.154, 95% CI: 0.073–0.234, P < 0.001), corresponding to a 15.4% net improvement in correctly reclassifying patients, and discrimination (IDI = 0.135, 95% CI: 0.082–0.189, P < 0.001), reflecting a 13.5% net gain in distinguishing between the HF and non-HF groups. Collectively, these findings underscore that CPET-specific parameters contribute substantial and unique incremental value beyond clinical variables in predicting post-MI HF. The calibration curve (Fig. 1D) of Model 1 showed good agreement between the predicted probabilities and actual observed probabilities. In the validation cohort, model calibration was further confirmed by a non-significant Hosmer–Lemeshow test (χ²(df = 8) = 8.94, P = 0.347). The Brier score was 0.044 in the training set and 0.064 in the test set, indicating low prediction error and reliable probability outputs. Decision curve analysis (Fig. 1E) was performed to assess the potential clinical utility of the model. The model showed greater net benefit than the strategies of treating all patients or treating none across a range of threshold probabilities. The model achieved an area under the precision-recall curve (PR-AUC) of 0.886 in training set and 0.709 in test set, suggesting good performance in identifying positive cases with a favourable trade-off between precision and recall (Supplemental Material, Figure S4). The model demonstrated high specificity (0.919) and a high negative predictive value (NPV = 0.969), effectively identifying patients at low risk of post-MI HF and avoiding unnecessary interventions. Its sensitivity of 0.771 indicates that most high-risk patients can be detected, facilitating timely preventive measures. The model’s high sensitivity and NPV make it suitable for early screening of post-MI HF, ensuring that high-risk patients are not missed. Although the positive predictive value (PPV = 0.547) and F1 score (0.640) were moderate, analysing the characteristics of misclassified patients may help optimize risk identification and further improve clinical utility. This model is suitable for clinical risk stratification and can assist clinicians in focusing preventive strategies on those most likely to benefit from early intervention, thereby reducing the risk of post-MI HF (Supplemental Material, Table S3). In summary, the CPET-integrated model constructed by the XGBoost algorithm exhibited excellent discriminative ability, calibration, and clinical utility. Its outstanding performance across multiple metrics and evaluation methods indicates its potential for use in clinical decision-making to assess HF risk and guide early interventions. The contribution of variables to the model’s predictions is expressed as Shapley additive explanation values, which help elucidate the directional association (positive or negative) of each variable within the model, enhancing insights into the model’s decision-making process [30]. The global interpretability of the XGBoost model and the 14 most influential features are displayed in the SHAP summary plot (Fig. 2A, B). The SHAP values reflect the effects of the characteristics and their positive or negative effects on each sample. In these figures, the contributing factors are arranged in descending order of importance. Each point represents a sample; the red points indicate higher feature values, and the right of the vertical line indicates higher odds of a poor prognosis. The superiority of the key CPET variables influencing the model’s predictions is demonstrated in the SHAP dependence plots. When the shape value of a specific feature exceeds zero, it indicates an increased likelihood of HF. The x-axis represents the feature value, whereas the y-axis represents the feature’s contribution to the prediction outcome. (A) SHAP summary plot showing the feature importance and the direction of feature value influence in the XGBoost model. (B) Variable importance of the top 14 predictive factors in the XGBoost model. The SHAP dependence plot shows how individual features impact the prediction model’s output. (C) VO2 peak. (D) VE/VCO2 slope. (E) RER peak. (F) PETCO2 peak. (G) VT peak. (H) EQCO2 peak Key CPET thresholds for predicting post-MI HF Figure 2C, D, E, F, G, H shows the relationships between the scatter distributions of the SHAP values of the VO2 peak, VE/VCO2 slope, RER peak, PETCO2 peak, VT peak, EQCO2 peak and the LOWESS fitting curve. SHAP analysis showed that a higher VE/VCO₂ slope (> 30.55) and EQCO₂ peak (> 35.67), together with a lower VO₂ peak (< 13.50), RER peak (< 1.06), PETCO₂ peak (< 34.11), and VT peak (< 1.07), were associated with a higher risk of post-MI HF. Post-MI HF risk score and CPET-based post-MI HF Assessment System The post-MI HF risk score is used to categorize patients into two distinct risk groups: low- (risk score ≤ 3.81) and high-risk (risk score > 3.81). This risk stratification demonstrated significant differences in HF risk between the two groups in the external validation cohort (3.1% vs. 54.7%, P < 0.001), indicating that this statistically derived cut-off was effective for risk stratification in the present dataset (Fig. 3). Subgroup analysis of the risk score on the basis of age, sex, MI type, and VO2peak revealed its robustness in different populations. The results revealed that the AUC value for patients under 60 years of age was 0.916 (95% CI: 0.877–0.956), and for patients over 60 years of age, it was 0.950 (95% CI: 0.915–0.986) (Fig. 4A). For male patients, the AUC value was 0.916 (95% CI: 0.877–0.956), and for female patients, it was 0.950 (95% CI: 0.915–0.986) (Fig. 4B). For NSTEMI patients, the AUC value was 0.942 (95% CI: 0.900–0.984), and for STEMI patients, it was 0.921 (95% CI: 0.886–0.955) (Fig. 4C). For patients with a VO2peak < 16, the AUC value was 0.917 (95% CI: 0.879–0.955), and for patients with a VO2peak ≥ 16, it was 0.916 (0.854–0.978) (Fig. 4D). The above results indicate that the AUC values of the model in different subgroups are relatively stable, suggesting that the model performs well in predicting the outcomes of different population subgroups. Risk stratification based on the Post-MI HF risk score Subgroup analysis to evaluate the clinical prognostic value of the post-MI HF risk score in different subgroups. (A) Age, (B) sex, (C) MI type, and (D) VO2 peak The post-MI HF assessment system driven by the CPET-integrated model provides clinicians with a simple and practical tool for predicting the occurrence of post-MI HF and is now available in a user-friendly application [https://cpet-hf-assessment.streamlit.app/]. It allows healthcare providers to use it easily in clinical settings. By inputting 14 features, the application helps quickly access and obtain individualized HF risk probabilities, post-MI HF risk scores, and prognostic stratification results. In addition, the risk assessment system also provides an individualized and visualized risk report, which details the importance of risk factors, protective factors and characteristics. Red represents risk factors, and blue represents protective factors. The importance of each factor is arranged from high to low from top to bottom. For example, in the case shown in Fig. 5, the patient is estimated to have a 74.3% probability of developing post-MI HF and is marked as a high-risk patient. Among the incorporated features, NT-proBNP, LVEDD, LDH, and the VE/VCO2 slope are risk factors, and the rest are protective factors. User-friendly web-based risk assessment system In the context of real-world clinical application, risk prediction models should not solely aim for maximal performance but must also emphasize simplicity and feasibility. To address this, we performed an ablation experiment on the best-performing model, exploring whether a simplified yet practical version could be achieved without compromising predictive value. After systematically evaluating feature availability and predictive importance, we removed variables that are less accessible or infrequently measured in routine practice (peak power, RER, EQCO2 peak, VT peak, TNI, and CK-MB). The resulting simplified model retained only eight variables (EF, BNP, LDH, LVEDD, age, VO2 peak, VE/VCO2 slope, and PETCO2 peak). As shown in Supplemental Material Table S5, this simplified model substantially reduced complexity while maintaining robust predictive performance, striking a balance between accuracy and generalizability. This result not only enhances the clinical feasibility of the model but also provides more practical evidence and a pathway for embedding the prediction tool into routine clinical practice. The calibration performance of the simplified model, DCA analysis, and risk stratification ability are presented in Supplemental Material, Figure S5. In addition, we developed a risk assessment system on the basis of the simplified model, as shown in Supplemental Material, Figure S6, which can also be accessed at [https://simplified-cpet-hf-assessment.streamlit.app/]. Discussion Post-MI HF markedly increases mortality, rehospitalisation, and healthcare resource use and has become an important public health problem worldwide [1, 31, 32]. Early and accurate prediction of post-MI HF risk in patients with AMI is therefore essential for identifying high-risk individuals and optimising secondary prevention strategies [1]. In this study, we developed and validated a multimodal ML model integrating CPET variables, routine clinical indicators, and echocardiographic parameters. Among multiple ML algorithms, the XGBoost model showed the best performance, with an AUC of 0.929 (95% CI: 0.903–0.955), accuracy of 0.902, sensitivity of 0.771, and specificity of 0.919 in the external validation cohort, indicating good discrimination and stability for 1-year post-MI HF risk prediction and stratification. In addition, we found that CPET variables significantly improved discrimination and risk stratification beyond traditional assessments, which indicates that functional information obtained under exercise conditions provides important incremental value for post-MI risk evaluation. These findings further support the clinical value of incorporating CPET into AMI risk assessment and help establish a multidimensional risk evaluation framework that includes cardiac structure, metabolic status, and overall functional performance. By introducing CPET as a function-oriented assessment tool, preventive management of AMI may gradually shift from symptom-driven treatment to a precision strategy focused on early screening and proactive prevention, thereby potentially supporting improved long-term outcomes and more efficient use of healthcare resources. To date, several studies have used ML methods to build prediction models for the risk of post-MI HF. One of the studies used seven ML algorithms to build a prediction model based on nine laboratory indicators. Among those ML algorithms, the XGBoost model performed the best [11]. Another study used LASSO to select features and four ML algorithms to build a prediction model based on six indicators, EF, LVEDD, LDH, NT-pro BNP, hypersensitive C-reactive protein, and CKMB. Among them, the XGBoost model also performed the best [10]. However, these two studies have several limitations. First, both predictive models were developed using single-centre data and were not validated with independent external data. The generalizability of their findings to external data is unknown. Second, these studies considered only variables from laboratory and imaging tests and did not consider other predictive variables that might reflect the patient’s functional status. More multidimensional data need to be included to improve the prediction of post-MI HF [1, 4]. Finally, although these two studies successfully developed ML models, they did not transform the models into directly usable tools, making it difficult for medical staff to apply them in clinical settings. Most existing studies predicting post-MI HF have relied primarily on resting variables, which often fail to fully reflect patients’ true functional status and integrated cardiopulmonary reserve under exercise stress [10, 11]. To address this limitation, we developed and validated a multimodal prediction model based on multicentre data, integrating CPET variables, routine clinical indicators, and echocardiographic parameters. This approach reduces the risk of overfitting to some extent and demonstrates the model’s generalizability and effectiveness. The XGBoost model showed the best predictive performance, with an AUC of 0.929 (95% CI: 0.903–0.955), indicating its high-efficiency predictive ability. As the gold standard for objective and noninvasive assessment of cardiopulmonary function, CPET provides information on the body’s stress state during incremental exercise in AMI patients that cannot be obtained from resting tests such as laboratory tests and echocardiography. The construction of a multidimensional structure, function, and metabolism prediction system overcomes the limitations of previous studies, which only relied on laboratory and imaging indicators, and significantly improved the model’s discrimination, classification, and calibration abilities. The ensemble feature framework constructed using multiple algorithms and feature engineering techniques avoids researcher bias, eliminates redundant features, and enhances the model’s robustness. In addition, we deployed the best-performing predictive model as an easy-to-use risk assessment system. By inputting 14 parameters, the system can automatically estimate an individual patient’s risk and perform risk stratification, thereby helping to identify patients who may require closer follow-up, intensified HF surveillance, and more individualised rehabilitation management. For patients identified as being at high risk, enhanced follow-up and monitoring may be considered, together with more standardised treatment and rehabilitation strategies in accordance with guideline recommendations [33, 34]. At the same time, patients classified as low risk should not be managed less carefully on the basis of risk stratification alone; rather, clinical management should still be guided by a comprehensive assessment of the individual patient’s overall condition. Our research revealed that multiple clinical features are closely associated with 1-year new-onset HF in AMI patients. These findings are consistent with those of previous studies, which have indicated that AMI patients with lower EF; higher levels of NT-pro BNP, LVEDD, TnI, LDH, and CK-MB; and older age are more likely to develop HF [10, 11, 32, 35, 36]. The increase in NT-pro BNP, LVEDD, TnI, LDH, and CK-MB reflects changes in the structure and function of the heart, indicating an increase in the degree of cardiac load and myocardial injury. These are key factors in evaluating the progression of post-MI HF. We observed that patients who developed post-MI HF had significantly higher baseline levels of NT-pro BNP, Crea, and BUN compared with those without HF. Impaired renal function can reduce the clearance of NT-pro BNP, thereby contributing to its elevation. However, such elevation not only reflects a limitation of specificity but also highlights the additive impact of comorbidities and risk factors on HF development. Thus, elevated NT-pro BNP captures both increased cardiac stress and the influence of comorbid conditions on adverse outcomes. Notably, higher baseline NT-pro BNP levels in AMI patients without established HF may indicate a state of heart stress, identifying individuals at higher risk of subsequent HF. Elevated LDH reflects the extent of myocardial injury and cell membrane disruption and is closely associated with infarct size, impaired cardiac function, and adverse left ventricular remodelling [37, 38]. In addition, LDH serves as a marker of myocardial stress and metabolic disturbance [39], and these pathological changes collectively contribute to an increased risk of post-MI HF. Older age indicates related physiological changes, such as reduced cardiac reserve, increased burden of comorbidities, and poor recovery, which accelerate the progression of HF [35]. In addition to resting-state assessment parameters, this study further demonstrates the unique value of CPET-based cardiopulmonary function indices for predicting post-MI HF risk in patients with AMI. As an objective, non-invasive, and multidimensional tool, CPET reflects the integrated stress responses of the cardiovascular system, respiratory system, and peripheral tissues under exercise conditions and thus captures early functional abnormalities that are difficult to detect at rest. At present, most post-MI HF risk assessments still rely mainly on biomarkers and imaging-based structural parameters [13, 36, 37, 40]. Our findings show that CPET provides more sensitive functional information at the cardiopulmonary level in patients with AMI. Specifically, we found that lower values of VO₂ peak, RER peak, PETCO₂ peak, VT peak, and peak power, as well as higher VE/VCO₂ slope and EQCO₂ peak values, were significantly associated with increased post-MI HF risk. These indices jointly reflect reduced cardiac output reserve, impaired ventilatory efficiency, decreased peripheral oxygen utilisation, and lower overall exercise capacity. HF is essentially a multisystem functional decompensation driven by an imbalance between oxygen supply and demand [41, 42]. Therefore, CPET provides physiologically grounded functional evidence for early identification of post-MI HF risk by quantifying global cardiopulmonary function during exercise. VO₂ peak is a core measure of overall cardiopulmonary fitness and exercise capacity. A reduced VO₂ peak value indicates limited cardiac output, impaired ventilatory efficiency, or reduced skeletal muscle oxygen extraction. It has been closely associated with adverse outcomes in patients with HF [43], and the present study extends this association to prognosis prediction in patients with AMI. An increased VE/VCO₂ slope reflects reduced ventilatory efficiency and ventilation–perfusion mismatch, which indicates that greater ventilation is required to eliminate metabolically produced carbon dioxide. This feature is also linked to the development and progression of HF [44, 45]. The PETCO₂ peak is an important indicator of ventilation–perfusion matching. A lower value suggests hyperventilation and has been established as a strong predictor of mortality and rehospitalisation in HF [18]. Our results further show that a lower PETCO₂ peak is also associated with higher post-MI HF risk in patients with AMI, which suggests that early improvement of ventilatory function and pulmonary perfusion may have preventive value. In addition, this study explored the associations of VT peak, EQCO₂ peak, RER peak, and peak power with post-MI HF risk. VT peak reflects the maximal expansion of tidal volume during increasing exercise, and lower values indicate limited ventilatory reserve [25]. An elevated EQCO₂ peak indicates reduced efficiency of carbon dioxide elimination and abnormal ventilation–perfusion efficiency [46]; RER peak and peak power reflect tolerance to metabolic load and peripheral muscle work capacity [18]. Together, these exercise-induced functional abnormalities represent early signals of a transition from compensation to decompensation of the cardiopulmonary and peripheral systems. Such changes are often not detected by resting clinical, biochemical, or imaging examinations, which highlights the unique role of CPET in capturing subclinical functional decompensation and assessing post-MI HF risk. Limitations Despite the promising findings of our study, several limitations should be acknowledged. First, this study used only patient data from China, and further validation of its validity and applicability in patients from other countries is needed. Second, this study was retrospective in design, a degree of selection bias was unavoidable. In addition, the model and its related findings were derived primarily from patients with AMI who were able to complete CPET with an adequate level of exercise effort; accordingly, its applicability is largely confined to this patient group. Third, this study did not include comorbidities that may influence the risk of HF, such as atrial fibrillation, and future research should further investigate their specific role in HF development. Finally, misclassification remains an inherent limitation of prediction models, as some patients classified as high risk ultimately did not develop post-MI HF. This reflects the uncertainty intrinsic to risk prediction and highlights the need for such models to be applied in conjunction with ongoing follow-up and dynamic individualized assessment in clinical practice. Conclusion In conclusion, this study developed a multimodal post-MI HF risk prediction model by integrating CPET, clinical variables, and echocardiographic parameters and deployed it as an easy-to-use risk assessment system, which enables effective translation of post-MI HF risk prediction from research to clinical practice. This system identifies early signals of transition from functional compensation to decompensation in patients with AMI across dimensions of cardiac structure, metabolic status, and global cardiopulmonary function and therefore provides more accurate estimation of post-MI HF risk and data-driven decision support for early risk stratification and intervention. For patients identified as high risk, the visualized decision support provided by the system allows clinicians to optimize management strategies, including early initiation or intensification of guideline-directed HF therapy, adjustment of the intensity and modality of cardiac rehabilitation, and closer follow-up. This function-oriented risk prediction and stratification approach helps shift AMI management from symptom-driven intervention to early screening and proactive prevention and provides a practical tool with the potential to reduce post-MI HF incidence, improve long-term outcomes, and lessen health care burden. Future studies are needed to further clarify the pathological mechanisms linking CPET-derived multisystem functional abnormalities to post-MI HF progression and to promote wider clinical application. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Author contributions Conceptualization: Xiaojun Wu, Haoning Cui; Methodology: Haoning Cui, Zhuozhong Wang, Xinyu Hou; Formal analysis and investigation: Shiyu Wang, Xianghui Zheng, Liyan Ran, Jiaqi Liu; Writing - original draft preparation: Xiaojun Wu, Haoning Cui, Jing Yao; Writing - review and editing: Jian Wu, Yang Zheng, Meiqiao Ren; Funding acquisition: Bo Yu, Jian Wu; Resources: Bo Yu, Jian Wu, Huan Ma; Supervision: Bo Yu, Jian Wu, Yang Zheng. Funding This study was supported by the Natural Science Foundation of Heilongjiang Province (Grant no.ZL2024H007), Heilongjiang Provincial Medical and Health Scientific Research Project (Grant no. 20240303010021), and National Natural Science Foundation of China (Grant nos. 82172537, 82372565). Data availability The dataset and code used during the current study is available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Xiaojun Wu and Haoning Cui contributed to the work equally and should be regarded as co-first authors. Contributor Information Yang Zheng, Email: zhengyanghmu@163.com. Jian Wu, Email: wujian780805@163.com. References Associated Data Data Availability Statement The dataset and code used during the current study is available from the corresponding author on reasonable request.