TRACER, a time-to-event EHR foundation model for disease detection across health systems
Organizations: Biomedical AI Research Lab, University of California, Los Angeles, Los Angeles, CA, USA · Department of Radiology, University of California, Los Angeles, Los Angeles, CA, USA · Bioinformatics, University of California, Los Angeles, Los Angeles, CA, USA · Department of Bioengineering, University of California, Los Angeles, Los Angeles, CA, USA ·
Abstract
Foundation models trained on longitudinal electronic health records (EHRs) can predict clinical diagnoses years in the future, making them a potential tool for disease screening. We developed TRACER (Temporal Risk Assessment with Clinical EHR Representations), a decoder-based foundation model pretrained on data from over 4.5 million patients from four health systems, and evaluated it on 16 incident diseases at 1-, 2-, and 5-year horizons in more than 2 million patients from two health systems excluded from model development. In contrast to typical evaluations that focus on global metrics (e.g., AUROC), we measured performance at the low false-positive rates that are realistic for screening. We found that TRACER retained its discrimination in external health systems, and at 95% specificity, the patients it flagged were up to eight times more likely to be diagnosed within a year than unselected patients. Evaluating at this operating point also revealed what global metrics alone did not: detection and false-alert burden varied across diseases and health systems, even when discrimination appeared stable. Our results illustrate the potential of foundation models for screening and underscore the need for evaluation in health systems excluded from development to assess disease detection and false-alert burden at levels appropriate for intended clinical use.}
Figures & tables
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Development domain | Held-out health systems | ||||
| Disease endpoint | Training | Validation | Test | UC5 | UC6 |
| Chronic disease endpoints | |||||
| Hypertension | 10.00 | 10.00 | 10.00 | 11.70 | 15.20 |
| Hyperlipidemia | 9.23 | 9.23 | 9.25 | 15.47 | 9.42 |
| Depression | 6.81 | 6.82 | 6.81 | 8.78 | 6.88 |
| Chronic kidney disease | 2.53 | 2.57 | 2.54 | 2.51 | 2.53 |
| In-domain | UC5 | UC6 | ||||
| Disease endpoint | Decoder | Encoder | Decoder | Encoder | Decoder | Encoder |
| Chronic disease endpoints | ||||||
| Heart failure | ||||||
| Acute myocardial infarction | ||||||
| Lupus | ||||||
| Hypertension | ||||||
| Disease | In-domain | UC5 | UC6 | Worst-site gap |
|---|---|---|---|---|
| Chronic disease endpoints | ||||
| Heart failure | ||||
| Acute myocardial infarction | ||||
| Lupus | ||||
| Hypertension | ||||
| Celiac disease | ||||
| Disease | 52 weeks | 104 weeks | 260 weeks | |
| Small 52-to-260-week change under TRACER ( ) | ||||
| Lupus | 0.778 | 0.807 | 0.795 | |
| Atrial fibrillation | 0.852 | 0.861 | 0.859 | |
| Rheumatoid arthritis | 0.786 | 0.778 | 0.784 | |
| Heart failure | 0.870 | 0.869 | 0.862 | |
| Hyperlipidemia | 0.785 | 0.773 | 0.776 | |
| In-domain | UC5 | UC6 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Disease | Model | 26 wk | 52 wk | 104 wk | 260 wk | 26 wk | 52 wk | 104 wk | 260 wk | 26 wk | 52 wk | 104 wk | 260 wk |
| Chronic disease endpoints | |||||||||||||
| Heart failure | D | — | 0.870 | 0.869 | 0.862 | — | 0.868 | 0.869 | 0.877 | — | 0.850 | 0.844 | 0.836 |
| E | — | 0.829 | 0.821 | 0.822 | — | 0.840 | 0.838 | 0.839 | — | 0.815 | 0.820 | 0.814 | |
| Acute myocardial infarction | D | — | 0.871 | 0.892 | 0.843 | — | 0.854 | 0.844 | 0.830 | — | 0.858 | 0.863 | 0.849 |
| E | — | 0.794 | 0.812 | 0.771 | — | 0.766 | 0.773 | 0.776 | — | 0.791 | 0.811 | 0.801 | |
| Direct patient selection | Censoring-adjusted outcomes | ||||||
| Cohort | Patients scored | Patients selected | Selected (%) | Sensitivity (%) | Not identified (%) | PPV (%) | Case yield per 10,000 |
| Heart failure | |||||||
| In-domain | 28,800 | 1,505 | 5.23 | 44.18 | 55.82 | 13.80 | 78.59 |
| UC5 | 919,344 | 51,998 | 5.66 | 36.88 | 63.12 | 9.47 | 51.59 |
| UC6 | 283,392 | 15,279 | 5.39 | 33.57 | 66.43 | 16.41 | 95.39 |
| Pancreatic cancer | |||||||
| In-domain | UC5 | UC6 | |||||||
| Disease | 90% | 95% | 99% | 90% | 95% | 99% | 90% | 95% | 99% |
| Chronic disease endpoints | |||||||||
| Heart failure | 63.7 | 44.2 | 15.1 | 56.5 | 36.9 | 11.3 | 51.2 | 33.6 | 10.8 |
| Acute myocardial infarction | 55.8 | 42.0 | 6.2 | 54.9 | 36.2 | 11.8 | 57.3 | 39.6 | 15.9 |
| Lupus | 45.8 | 26.0 | 6.4 | 44.5 | 32.3 | 15.0 | 26.4 | 19.0 | 7.9 |
| Hypertension | 41.4 | 25.6 | 7.1 | 36.0 | 21.3 | 5.5 | 40.1 | 25.2 | 7.4 |
| In-domain | UC5 | UC6 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Disease | Horizon (wk) | 90% | 95% | 99% | 90% | 95% | 99% | 90% | 95% | 99% |
| Chronic disease endpoints | ||||||||||
| Heart failure | 52 | 63.7 | 44.2 | 15.1 | 56.5 | 36.9 | 11.3 | 51.2 | 33.6 | 10.8 |
| 104 | 62.9 | 45.0 | 13.3 | 57.9 | 39.1 | 11.0 | 49.8 | 33.1 | 9.5 | |
| 260 | 60.4 | 42.4 | 14.5 | 60.3 | 43.1 | 15.4 | 48.4 | 32.1 | 9.9 | |
| Acute myocardial infarction | 52 | 55.8 | 42.0 | 6.2 | 54.9 | 36.2 | 11.8 | 57.3 | 39.6 | 15.9 |
| Cohort | Scored records | Baseline incidence (%) | Sensitivity (%) (95% CI) | PPV (%) (95% CI) | Enrichment (fold) | Cases per 10,000 (95% CI) |
|---|---|---|---|---|---|---|
| Heart failure | ||||||
| In-domain | 28,800 | 1.779 | 44.18 (39.46–50.63) | 13.80 (11.86–15.95) | 7.76 | 78.59 (70.19–90.07) |
| UC5 | 919,344 | 1.399 | 36.88 (36.02–37.94) | 9.47 (9.19–9.76) | 6.77 | 51.59 (50.40–53.07) |
| UC6 | 283,392 | 2.842 | 33.57 (32.45–35.14) | 16.41 (15.85–17.14) | 5.78 | 95.39 (92.23–99.86) |
| Acute myocardial infarction | ||||||
| In-domain | 29,112 | 0.362 | 42.04 (31.15–54.81) | 2.96 (2.00–4.04) | 8.19 | 15.20 (11.26–19.82) |
| In-domain | UC5 | UC6 | ||||
|---|---|---|---|---|---|---|
| Disease endpoint | D | E | D | E | D | E |
| Heart failure | ||||||
| Acute myocardial infarction | ||||||
| Lupus | ||||||
| Hypertension | ||||||
| Celiac disease | ||||||
| Disease endpoint | In-domain | UC5 | UC6 |
|---|---|---|---|
| 104-week horizon | |||
| Heart failure | |||
| Acute myocardial infarction | |||
| Lupus | |||
| Hypertension | |||
| Celiac disease | |||
| In-domain | UC5 | UC6 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Disease | Horizon (wk) | D | E | (95% CI) | D | E | (95% CI) | D | E | (95% CI) |
| Chronic disease endpoints | ||||||||||
| Heart failure | 52 | 0.692 | 0.672 | +0.020 (+0.003, +0.037) | 0.655 | 0.672 | -0.017 (-0.020, -0.013) † | 0.640 | 0.649 | -0.009 (-0.014, -0.005) † |
| 104 | 0.686 | 0.659 | +0.027 (+0.011, +0.043) | 0.662 | 0.674 | -0.012 (-0.015, -0.009) † | 0.635 | 0.648 | -0.013 (-0.017, -0.009) † | |
| 260 | 0.677 | 0.649 | +0.028 (+0.008, +0.048) | 0.683 | 0.683 | -0.001 (-0.004, +0.003) | 0.631 | 0.652 | -0.021 (-0.026, -0.016) † | |
| Acute myocardial infarction | 52 | 0.664 | 0.640 | +0.024 (-0.017, +0.064) | 0.652 | 0.631 | +0.022 (+0.015, +0.027) | 0.668 | 0.650 | +0.018 (+0.001, +0.035) |
| TRACER | TRACER-Encoder | |||||||
| Disease endpoint | 52 wk | 104 wk | 260 wk | 52 wk | 104 wk | 260 wk | ||
| Small 52-to-260-week change under TRACER ( ) | ||||||||
| Lupus | 0.778 | 0.807 | 0.795 | 0.694 | 0.637 | 0.675 | ||
| Atrial fibrillation | 0.852 | 0.861 | 0.859 | 0.774 | 0.793 | 0.778 | ||
| Rheumatoid arthritis | 0.786 | 0.778 | 0.784 | 0.654 | 0.703 | 0.754 | ||
| Heart failure | 0.870 | 0.869 | 0.862 | 0.829 | 0.821 | 0.822 | ||
| TRACER | TRACER-Encoder | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Disease | Cohort | 10% | 30% | 50% | 100% | 10% | 30% | 50% | 100% | ||
| Heart failure | In-domain | 0.837 | 0.858 | 0.862 | 0.869 | 0.722 | 0.766 | 0.781 | 0.810 | ||
| UC5 | 0.851 | 0.854 | 0.858 | 0.865 | 0.754 | 0.797 | 0.807 | 0.823 | |||
| UC6 | 0.793 | 0.803 | 0.803 | 0.836 | 0.721 | 0.766 | 0.780 | 0.798 | |||
| Acute myocardial infarction | In-domain | 0.788 | 0.837 | 0.830 | 0.842 | 0.709 | 0.735 | 0.736 | 0.775 | ||
| UC5 | 0.801 | 0.830 | 0.820 | 0.830 | 0.719 | 0.737 | 0.737 | 0.776 | |||