A Bayesian framework for longitudinal EHR and genetic discovery.

Urbut, Sarah M; Ding, Yi; Nakao, Tetsushi; Koyama, Satoshi; Misra, Anika; Jiang, Xilin; Harish, Achyutha; Gaffney, Leslie et al. · Nature · 2026

Where this comes from

Abstract

Electronic health records (EHRs) provide rich longitudinal disease histories, but existing methods for analysing these data typically treat diseases in isolation<sup>1</sup> and rarely integrate germline genetics. Here we present ALADYNOULLI, a Bayesian generative framework that jointly models longitudinal EHR diagnoses, age and polygenic risk to recover latent time-varying disease signatures and patient-specific signature loadings; the model is formulated as a mixture of probabilities rather than a probability of a mixture<sup>2</sup>, correctly accommodating simultaneous and chronic conditions. Applied to three independent biobanks (UK Biobank<sup>3</sup>, Mass General Brigham<sup>4</sup> and All of Us; total n > 683,000) spanning up to 52 years of follow-up and 348 diseases, the model recovers 21 replicable signatures with high cross-cohort composition preservation (median of 80%) and reveals biological subtypes within diagnostic categories (Cohen's d up to 4.25; P ≤ 1 × 10<sup>-8</sup> for 95% of comparisons). Signatures are concordant with established disease biology: carriers of familial hypercholesterolaemia<sup>5</sup> enrich in the cardiovascular signature; carriers of clonal haematopoiesis of indeterminate potential<sup>6</sup> in the inflammation signature; and a rare variant burden in LDLR, TTN and BRCA2 (refs. <sup>7,8</sup>) aligns with disease specificities. A signature-based genome-wide association study identifies 151 genome-wide significant loci including cardiovascular associations missed by single-trait analyses. An explicit likelihood enables inverse probability weighting for selection bias<sup>9</sup> while preserving biological signal. For disease prediction, ALADYNOULLI outperforms Pooled Cohort Equation (PCE), PREVENT and Gail at 1-year and 10-year horizons; disease-level (PheCode) predictions complement code-level foundation models such as Delphi-2M (ref. <sup>10</sup>).