BACKGROUNDMachine learning clustering of patients with ST-elevation acute myocardial infarction (STEMI) may provide important insights into their risk profile, management and prognosis.METHODSAll adult discharges for STEMI in the National Inpatient Sample (October 2015 to December 2019) were included, excluding patients with prior myocardial infarction. Machine-learning clustering analysis was used to define clusters based on 21 clinical attributes of interest. Main outcomes of the study were cluster-based comparison of risk profile, in-hospital clinical outcomes and utilization of invasive management. Binomial hierarchical multivariable logistic regression with adjusted odds ratios (aOR) and 95% confidence intervals (95% CI) was used to detect the between-cluster differences.RESULTSOut of overall 470,960 STEMI cases, the machine-learning analysis revealed 4 different clusters with 205,640 (cluster 0: 'behavioural risk cluster'), 146,400 (cluster 1: 'least comorbidity cluster'), 45,100 (cluster 2: 'diabetes with end-organ damage cluster') and 73,820 (cluster 3: 'cardiometabolic cluster') cases. Attributes with the highest importance for clustering were hypertension and diabetes. After multivariable adjustment, patients from 'diabetes with end-organ damage cluster' exhibited the worst mortality, MACCE and ischemic stroke (p < 0.001 for all), as well as the lowest utilization of invasive management (p < 0.001 for all), in comparison to other clusters. Patients from 'behavioural risk cluster' exhibited the best in-hospital prognosis and the highest utilization of invasive management, compared to other clusters (p < 0.001 for all).CONCLUSIONSMachine learning driven clustering of inpatients with STEMI reveals important population subgroups with distinct prevalence, risk profile, prognosis and management. Data driven approaches may identify high risk phenogroups and warrants further study.