DOI: 10.1093/eurpub/ckag169.1073 ISSN: 1464-360X

Large language model (LLM)-based disease clustering for people with multimorbidity

Q Feng, M Woodward

Abstract

Background

Disease clustering is important in understanding multimorbidity heterogeneity. Existing clustering approaches, such as latent class analysis (LCA), fail to capture the temporal dynamics of disease progression.

Methods

We included 80004 individuals with multimorbidity from UK Biobank. Longitudinal sequences of disease diagnoses were transformed into ordered pairs. Process mining was applied to identify disease trajectories. Patient level representations of disease history were generated using LLM, followed by K-means clustering to derive clusters. Analyses were conducted separately by sex. Associations between clusters and mortality were assessed. LLM-derived clusters were compared with LCA in mortality prediction.

Results

We identified 45 common trajectories in both females and males. Frequent trajectories included cancer-respiratory disease and cancer-venous thromboembolism, while highly fatal trajectories often involve cancer and cardiometabolic conditions. Nine clusters were identified in each sex, representing distinct multimorbidity patterns (e.g., cardiometabolic, neuropsychiatric, and cancer-related clusters). Clusters showed marked differences in disease onset, progression duration, and mortality risk. Compared to the lowest-risk cluster, the highest-risk cluster had hazard ratio 9.85 (95%CI 8.35-11.62) in males and 10.87 (9.48-12.46) in females. Cluster-specific trajectory networks revealed heterogenous progression pathways. Regarding mortality prediction, compared with LCA, LLM-based clustering demonstrated better model fit and discrimination (c-index: 0.72 vs. 0.61 for males and 0.75 vs. 0.67 for females).

Discussion

This study presents an integrated framework combining disease trajectories and LLM to characterize multimorbidity. The approach capture both co-occurrence and temporal progression, identifies high-risk disease pathways, and improve risk stratification.

Key messages

• By applying a framework combining disease trajectory analysis with large language model–based clustering, this study identifies distinct patient subgroups and uncovers pathways of disease development.

• The identified clusters show substantial differences in disease progression and mortality risk, with markedly higher predictive performance than conventional approaches such as latent class analysis.

More from our Archive