SurvivEHR: a competing risks, time-to-event foundation model for multiple long-term conditions from primary care electronic health records

Read full text
Authors: C. J. Gadd, Krishna Margadhamane Gokhale, Aditya Acharya, Jennifer N. Cooper, Francesca L. Crowe, Leah Fitzsimmons, Thomas Jackson, Krishnarajah Nirantharakumar, Christopher Yau, Rebecca Birch, Marco Canducci, Dominic Danks
+30 more Alexander d’Elia, Alastair Denniston, Sarah Flanagan, Suzy Gallier, Naijie Guan, Xin Guan, Imane Guellil, Georgios Gkoutos, Shamil Haroon, Eleanor Hathaway, Louise Jackson, Janet Lord, Zeinab Majid, Tom Marshall, George Morris, Charlotte Owen, Elizabeth Sapey, Chris Sainsbury, Charlotte Spurway, Peter Tino, Steven Wambua, Amaya Azcoaga-Lorenzo, Colin McCowan, Luciana Rocha Pedro, Muhammad Usman, Natalia Hong, Sara Matijevic, Kaspar Martens, Tim Williams, Puja Myles
Cited by: 1
References: 63

Abstract

Multiple long-term conditions (MLTCs), or multimorbidity-the co-occurrence of multiple chronic conditions-present a growing challenge for primary care. Existing predictive models typically focus on single outcomes and often fail to capture the temporal and competing-risk structure inherent in longitudinal electronic health records (EHRs). Here, we present SurvivEHR, a generative transformer-based foundation model trained on over 7.6 billion coded events from 23 million patients in UK primary care. SurvivEHR is pre-trained using a competing-risk, time-to-next-event objective, enabling calibrated risk stratification across a broad range of diagnoses, investigations, medications, and mortality events. We show that this pre-training objective yields strong next-event discrimination and learns clinically meaningful patient trajectories. When adapted through fine-tuning, SurvivEHR achieves improved performance on downstream prognostic tasks, including longer-horizon risk prediction, with particular benefits in low-resource settings. By learning longitudinal patient representations directly from routine primary care records, SurvivEHR provides a scalable foundation for developing generalisable clinical risk models that reflect the complexity of MLTCs in primary care.

Fields of Study & Subjects

Machine Learning in Healthcare Chronic Disease Management Strategies Medical Coding and Health Information

Publication details

Journal / source
npj Digital Medicine
Publisher
Springer Science and Business Media LLC
Volume
9
Issue
1
Publication date
9 May 2026
Language
EN