# HADRec: A Hierarchy-Aware Drug Recommendation Framework by Fusing Molecular Knowledge and Electronic Health Record

arXiv: https://arxiv.org/abs/2610.00984 · HTML: https://mlsanity.com/paper/2610.00984/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 8 of its 46 references that are in the map.
- First posted on arXiv 1 Oct 2026.

## Builds on (most cited first, 8 of 8)

- [RETAIN: An Interpretable Predictive Model for Healthcare using Reverse Time Attention Mechanism](https://mlsanity.com/paper/1608.05745/) (2016)
- [GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination](https://mlsanity.com/paper/1809.01852/) (2018)
- [SafeDrug: Dual Molecular Graph Encoders for Recommending Effective and Safe Drug Combinations](https://mlsanity.com/paper/2105.02711/) (2021)
- [Change Matters: Medication Change Prediction with Recurrent Residual Networks](https://mlsanity.com/paper/2105.01876/) (2021)
- [Conditional Generation Net for Medication Recommendation](https://mlsanity.com/paper/2202.06588/) (2022)
- [StratMed: Relevance Stratification between Biomedical Entities for Sparsity on Medication Recommendation](https://mlsanity.com/paper/2308.16781/) (2023)
- [CIDGMed: Causal Inference-Driven Medication Recommendation with Enhanced Dual-Granularity Learning](https://mlsanity.com/paper/2403.00880/) (2024)
- [DNMDR: Dynamic Networks and Multi-view Drug Representations for Safe Medication Recommendation](https://mlsanity.com/paper/2501.08572/) (2025)

## Abstract (arXiv)

Accurate medication recommendation is central to clinical decision-making, directly determining therapeutic efficacy and patient safety. However, existing methods suffer from two key limitations: drugs are often abstracted as discrete tokens, ignoring their molecular structures and pharmacological mechanisms, and the commonly used "flat" recommendation paradigm fails to leverage the hierarchical logic of the internationally standardized Anatomical Therapeutic Chemical (ATC) classification system. To address these issues, we propose HADRec, a Hierarchy-Aware Drug Recommendation framework that integrates molecular knowledge with electronic health records (EHRs). HADRec employs LLaMA-7B to encode clinical notes for rich patient representations and ChemBERTa to encode drug Simplified Molecular Input Line Entry System strings, building a global molecular knowledge base. A cross-attention mechanism then performs deep multimodal fusion between patient states and drug features. The framework further incorporates a hierarchical predictor and a novel consistency constraint loss to enforce strict adherence to ATC logical dependencies. Extensive experiments on MIMIC-III demonstrate that HADRec achieves state-of-the-art performance across Jaccard, F1, and PR-AUC. External validation on MIMIC-IV confirms strong generalization under distribution shifts, and calibration analysis shows well-calibrated predictive confidence on MIMIC-IV with ECE = 0.04, and Brier = 0.06. Counterfactual evaluation reveals clinically aligned reasoning, disentangling disease-specific treatments from general care. Together, these results establish HADRec as a high-performance, interpretable, and clinically grounded pathway toward safe and reliable AI-driven medication recommendation.
