Medication recommendation, a crucial application of artificial intelligence in healthcare, has garnered widespread attention due to its research and practical value. However, existing methods often struggle to address three key challenges: misleading co-occurrence correlations, insufficient medication representation, and the balance between recommendation accuracy and drug–drug interaction (DDI). To overcome these challenges, we propose CDMed, a medication recommendation framework based on causal inference and dual-granularity information enhancement. First, the framework applies causal inference to identify and quantify the real therapeutic pathways among diseases, procedures, and medications in electronic health record (EHR), effectively filtering out spurious correlations commonly found in co-occurrence statistics. Second, by integrating coarse-grained medical entity relationships with fine-grained molecular structural information, it achieves effective multi-scale information fusion and enhances medication representation. Additionally, CDMed jointly models the 2D and 3D molecular structures of medications, serving as the foundation for subsequent molecular feature extraction. Finally, to achieve a balance between recommendation accuracy and safety, we applied a DDI-Constrained Bias Correction at the output stage, which enhances recommendation accuracy while controlling clinical risks. Extensive experiments on two public datasets demonstrate that CDMed improves recommendation accuracy by 2.2%, while maintaining a low DDI rate of 0.0661 alongside high inference efficiency. This result proves that CDMed achieves an optimal balance among recommendation accuracy, safety, and computational efficiency.
Liu et al. (Wed,) studied this question.