PaReGTA: A Temporally Aware LLM-Based Patient Representation Framework for EHR Analytics
Organizations: Georgia Institute of Technology · Meta · Mayo Clinic
Abstract
Temporal information in structured electronic health records (EHRs) is often lost in sparse one-hot or count-based representations, while sequence models can be costly and data-hungry. We propose PaReGTA, an LLM-based encoding framework that (i) converts longitudinal EHR events into visit-level templated text with explicit temporal cues, (ii) learns domain-adapted visit embeddings via lightweight contrastive fine-tuning of a sentence-embedding model, and (iii) aggregates visit embeddings into a fixed-dimensional patient representation using hybrid temporal pooling that captures both recency and globally informative visits. The resulting fixed-dimensional patient representations can be used with conventional downstream machine-learning models. To examine factor-level sensitivity, we use PaReGTA-RSS (Representation Shift Score), a prespecified factor-removal analysis that recomputes patient representations after removing clinically defined factor groups and quantifies the resulting change in the fitted logit of a fixed logistic-regression model. We evaluated PaReGTA in a cohort of 39,088 patients with migraine from the All of Us Research Program (AoU) on a retrospective patient-level classification task with an EHR-derived target. In an exploratory comparison on the fixed held-out test cohort of 7,818 patients, PaReGTA-Gap + LightGBM, used as a post hoc analytical reference, had the highest reported AUC, accuracy, and F1 values among the evaluated sparse, BERT-based EHR, and recurrent approaches in this cohort.
Figures & tables
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Category name | ICD | Code |
|---|---|---|
| Migraine (all) | ICD-9-CM | 346 |
| Migraine (all) | ICD-10-CM | G43 |
| Chronic migraine without aura | ICD-9-CM | 346.7 |
| Chronic migraine without aura | ICD-9-CM | 346.70 |
| Chronic migraine without aura | ICD-9-CM | 346.71 |
| Chronic migraine without aura | ICD-9-CM | 346.72 |
| Category name | ICD | Code |
|---|---|---|
| Depression | ICD-10-CM | F32.A |
| Depression | ICD-10-CM | Z13.31 |
| Depression | ICD-10-CM | Z13.32 |
| Depression | ICD-10-CM | F53.0 |
| Depression | ICD-9-CM | 290.13 |
| Depression | ICD-9-CM | V79.0 |