REFINE: LLM Refinement over Budgeted Text-Attributed Graphs for Personalized Medical Concept Representation
Organizations: University of Kansas, USA
Abstract
Learning rich medical concept representations is essential for EHR prediction. Text-attributed knowledge graphs (TKGs) provide a natural foundation by organizing heterogeneous medical relations together with textual semantics. However, most existing encoders process concepts uniformly across patients, despite the fact that a code's meaning and predictive value depend on patient-specific clinical context and trajectory. Learning patient-personalized concept representations from TKGs introduces two key challenges: (1) deciding how much KG context to incorporate for each observed code, and (2) aligning semantic information with the patient-specific relational structure. We propose REFINE, a KG-aware budgeted LLM graph refinement framework for patient-personalized medical concept encoding. Starting from a global TKG, REFINE constructs patient-specific temporal graphs. A sequential reinforcement learning policy selects a personalized KG expansion budget for each observed code. The resulting patient graph is processed by a heterogeneous GNN to capture relation-aware structural dependencies, while a frozen LLM uses graph-aware soft prompts to semantically refine concept representations. Experiments on MIMIC-III and MIMIC-IV show that REFINE consistently improves diverse EHR backbones, outperforms strong baselines, and demonstrates robust gains across component ablation, KG selection, and data insufficiency.
Figures & tables
| Model | General Performance | Label-Frequency AUPRC | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| AUPRC | F1 | Acc@15 | Acc@20 | Acc@30 | 0–25% | 25–50% | 50–75% | 75–100% | ||
| MIMIC-III | Base ( Vaswani, 2017 ) | |||||||||
| GRAM ( Choi et al., 2017 ) | ||||||||||
| MMORE ( Song et al., 2019 ) | ||||||||||
| KAME ( Ma et al., 2018 ) | ||||||||||
| G-BERT ( Shang et al., 2019 ) | ||||||||||
| Metric | MIMIC-III | MIMIC-IV |
|---|---|---|
| # Patients | 7,515 | 18,829 |
| # Visits (samples) | 12,430 | 25,028 |
| # Labels/sample | 12.31 | 10.56 |
| # Unique conditions (ICD) | 515 | 562 |
| # Conditions/sample | 22.94 | 59.50 |
| # Drugs/sample | 54.95 | 118.16 |
| Variant | AUPRC | F1 | Acc@20 | |
|---|---|---|---|---|
| MIMIC-IV | Full REFINE | 50.24 | 45.48 | 62.82 |
| w/o RL budgeting | 49.18 | 44.18 | 61.92 | |
| w/o full LLM refiner | 49.32 | 44.05 | 61.84 | |
| w/o soft prompt tokens | 49.38 | 44.12 | 61.90 | |
| w/o KG soft tokens | 49.72 | 44.78 | 62.32 | |
| w/o full personalized GNN | 47.35 | 40.82 | 60.25 |
| Code / Patient | Code Freq. | Selected Budget | Patient Context | Interpretation |
|---|---|---|---|---|
| conditions:14.5.23 | 7 | 2-hop | 2 visits, 9 observed codes | A rare diagnosis receives deeper multi-hop relational context in a short patient history. |
| procedures:7.12.2 | 10 | 2-hop | 1 visit, 41 observed codes | A rare procedure also receives deeper expansion, showing that adaptive budgeting is not limited to diagnosis codes. |
| drugs:B05XA | 10,809 | 0-hop | 5 visits, 211 observed codes | A highly frequent drug receives no additional KG context, showing selective expansion. |
| conditions:16.10.1.4 | 683 | 1-hop | 5 visits, 182 observed codes | A medium-frequency diagnosis receives only one-hop context expansion. |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Text-Attributed Graph Learning
Text-attributed graph learning combines node text and graph structure to improve classification, retrieval, anomaly detection, and reasoning.
See all 62 papers