MGRec: Structure-Grounded Medication Recommendation via Condition-Aware Molecular Representation Learning

MGRec: Structure-Grounded Medication Recommendation via Condition-Aware Molecular Representation Learning

Jinke Feng, Wenjie Du

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence
Main Track. Pages 2599-2607. https://doi.org/10.24963/ijcai.2026/289

Medication recommendation plays a critical role in clinical decision-making by supporting personalized and safe treatment planning. Existing methods rely heavily on historical co-occurrence patterns and primarily optimize discrete prescription prediction objectives, limiting generalization in rare or emerging disease settings. We propose MGRec, a framework that shifts learning from discrete prescription prediction to condition-aware modeling in a continuous molecular representation space. MGRec treats molecular structure as the primary modeling target and employs a Therapeutic--Safety Factorized Conditional Variational Autoencoder to disentangle therapeutic and safety-related factors in a condition-aware molecular latent space. The model infers treatment-relevant molecular representations conditioned on current patient-specific clinical context, which are mapped to clinically approved medications for final recommendation. To improve clinical safety, we further introduce a DDI (drug-drug interaction)-guided latent regularization to integrate drug interaction knowledge at the representation level. Experiments on two real-world benchmarks demonstrate that MGRec achieves state-of-the-art accuracy and reduced interaction risk, particularly in data-sparse scenarios.
Keywords:
Data Mining: Recommender systems
Machine Learning: Applications
Multidisciplinary Topics and Applications: Health and medicine