PurposePatients with known coronary artery disease (CAD) comprise a heterogenous population with varied clinical and imaging characteristics. Unsupervised machine learning can identify new risk phenotypes in an unbiased fashion. We use cluster analysis to risk-stratify patients with known CAD undergoing single-photon emission computed tomography (SPECT) myocardial perfusion imaging (MPI).MethodsFrom 37,298 patients in the REFINE SPECT registry, we identified 9221 patients with known coronary artery disease. Unsupervised machine learning was performed using clinical (23), acquisition (17), and image analysis (24) parameters from 4774 patients (internal cohort) and validated with 4447 patients (external cohort). Risk stratification for all-cause mortality was compared to stress total perfusion deficit (< 5%, 5–10%, ≥10%).ResultsThree clusters were identified, with patients in Cluster 3 having a higher body mass index, more diabetes mellitus and hypertension, and less likely to be male, have dyslipidemia, or undergo exercise stress imaging (p< 0.001 for all). In the external cohort, during median follow-up of 2.6 [0.14, 3.3] years, all-cause mortality occurred in 312 patients (7%). Cluster analysis provided better risk stratification for all-cause mortality (Cluster 3: hazard ratio (HR) 5.9, 95% confidence interval (CI) 4.0, 8.6,p< 0.001; Cluster 2: HR 3.3, 95% CI 2.5, 4.5,p< 0.001; Cluster 1, reference) compared to stress total perfusion deficit (≥10%: HR 1.9, 95% CI 1.5, 2.5p< 0.001; < 5%: reference).ConclusionsOur unsupervised cluster analysis in patients with known CAD undergoing SPECT MPI identified three distinct phenotypic clusters and predicted all-cause mortality better than ischemia alone.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00259-023-06218-z.