---
title: "MGRec: Structure-Grounded Medication Recommendation via Condition-Aware Molecular Representation Learning"
authors:
  - "Jinke Feng"
  - "Wenjie Du"
doi: "10.24963/ijcai.2026/289"
url: "https://ijcai.org/proceedings/2026/289"
pdf: "https://ijcai.org/proceedings/2026/0289.pdf"
venue: "Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence"
year: 2026
pages: "2599-2607"
track: "Main Track"
keywords:
  - "Multidisciplinary Topics and Applications: Health and medicine"
  - "Data Mining: Recommender systems"
  - "Machine Learning: Applications"
---

# 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*, pages 2599-2607. DOI: [10.24963/ijcai.2026/289](https://doi.org/10.24963/ijcai.2026/289)

## Abstract

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.
