Semantic ID Learning for Safe Medication Recommendation
Abstract
Medication recommendation from electronic health records requires jointly modeling longitudinal patient histories, unordered intra-visit clinical concepts, and drug-drug interaction (DDI) safety constraints. Existing methods either represent clinical concepts as flat vocabulary indices without fully leveraging pre-trained biomedical semantics, or enforce DDI constraints through post-hoc filtering, thereby decoupling safety from model optimization. We propose SID-MedRec, a two-stage framework that addresses these limitations through three designs. First, a residual quantized variational autoencoder (RQ-VAE) learns hierarchical discrete semantic IDs from BioBERT embeddings, providing a unified representation for diagnoses, procedures, and medications. Second, a set-aware temporal architecture combines Set Transformers for intra-visit set aggregation with GRU encoders for inter-visit sequence modeling, capturing the structural characteristics of EHR data. Third, an adaptive DDI-aware loss dynamically balances recommendation accuracy and DDI avoidance based on a predefined target DDI rate. Experiments on MIMIC-III and MIMIC-IV demonstrate that SID-MedRec achieves consistent improvements over strong baselines in recommendation performance while maintaining competitive DDI rates.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.