Integrating Drug Substructures and Longitudinal Electronic Health Records for Personalized Drug Recommendation
Authors: Wenjie Du
Xuqiang Li
Jinke Feng
Shuai Zhang
Wen Zhang
Yang Wang
Venue: NeurIPS 2025 poster ()
Keywords: Drug-Drug interaction; Drug Recommendation; Drug Substructures
Primary area: machine_learning_for_sciences
TL;DR: By jointly modeling patient conditions and substructure-aware representations, Our model enhances both accuracy and interpretability, ultimately enabling safer, more personalized drug recommendations.

Abstract: Drug recommendation systems aim to identify optimal drug combinations for patient care, balancing therapeutic efficacy and safety. Advances in large-scale longitudinal EHRs have enabled learning-based approaches that leverage patient histories such as diagnoses, procedures, and previously prescribed drugs, to model complex patient-drug relationships. Yet, many existing solutions overlook standard clinical practices that favor certain drugs for specific conditions and fail to fully integrate the influence of molecular substructures on drug efficacy and safety. In response, we propose \textbf{SubRec}, a unified framework that integrates representation learning across both patient and drug spaces. Specifically, SubRec introduces a conditional information bottleneck to extract core drug substructures most relevant to patient conditions, thereby enhancing interpretability and clinical alignment. Meanwhile, an adaptive vector quantization mechanism is designed to generate patient–drug interaction patterns into a condition-aware codebook which reuses clinically meaningful patterns, reduces training overhead, and provides a controllable latent space for recommendation. Crucially, the synergy between condition-specific substructure learning and discrete patient prototypes allows SubRec to make accurate and personalized drug recommendations. Experimental results on the real-world MIMIC III and IV demonstrate our model's advantages.  
The source code is available at \href{https://anonymous.4open.science/r/DrugRecommendation-5173}{https://anonymous.4open.science/}.

Integrating Drug Substructures and Longitudinal Electronic Health Records for Personalized Drug Recommendation
Wenjie Dul.?, Xuqiang Jinke Feng'.?, Shuai Zhang" 1.2.4, Zhang Wen', Yang Wang 1.2.1
1 University Science and Technology of China, China Suzhou Institute for Advanced Research, USTC, China 'Huazhong Agricultural University "Baidu, Inc (jinkefeng, shuaizhang, xuqiangli| @mail cs edu, on zhangwen@mail hzau, edu. cn {duwenjie angyan @ustc. edu. cn
Abstract
Drug recommendation systems aim to identify optimal drug combinations for patient care, balancing therapeutic efficacy and safety. Advances large-scale longitudinal EHRs have enabled learning-bass based approaches that leverage patient histories such as diagnoses, procedures, and previously prescribed drugs, to model complex patient-drug relationships. Yet, many existing solutions overlook stan- dard clinical practices that favor certain drugs for specific conditions and fail fully integrate the influence of molecular substructures safety. In response, we propose SubRec, a unified framework that integrates rep- resentation learning across both patient and drug spaces. Specifically, SubRec introduces a conditional information bottleneck to extract core drug substructures most relevant patient conditions, thereby enhancing interpretability and clinical alignment. Meanwhile, an adaptive vector quantization mechanism is designed to generate patient-drug interaction patterns into condition-aware codebook which reuses clinically meaningful patterns, reduces training overhead, and provides a controllable latent space for recommendation. Crucially, the synergy between condition condition-specific substructure learning and discrete patient prototypes allows SubRec to make accurate and personalized drug recommendations. Experimental results on the real-world MIMIC III and IV demonstrate our model's advantages. The source code is available at hhtps:/DDngkeecommenddinn/
drug efficacy and
Introduction
Drug recommendation is pivotal task healthcare, focused identifying the optimal combination of drugs to address patient's diagnosed conditions (26] 40 8). This task aligns conceptually with sequential recommendation systems, where decisions are made iteratively across patient's 'ss series of clinical visits. With the increasing availability of individual medical data, such as longitudinal electronic health records (EHRs)
which capture patients' historical visit sequences, includ- ing diagnoses, procedures, and prescribed medications- there is rich foundation for developing learning- predictive models. In this context, drug recommendation emerges as critical data mining challenge. It leverages advanced machine learning techniques, particularly deep neural networks, to analyze complex clinical event sequences. By integrating a patient's 's current clinical events with their historical records, these systems aim to generate personalized drug plans while minimizing drug-drug interactions (DDIs) to satisfy safety principles 19]
corresponding author
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

Building upon this, EHRs serve as crucial basis for the recommendations made by the model. Early works typically focused on a patient's individual EHRs, using deep learning models to uncover the intrinsic relationships between a patient's s health conditions and prescribed medications. For example, 4SDrug 27 constructed historical visit sets and proposed measuring the similarity between symptom and drug sets for drug recommendation. COGNet (35] developed novel copy-or-preddee mechanism, predicting whether a drug should be copied from historical recommendations or a new drug combination should be suggested. However, from a healthcare provider's 's perspective, the primary focus is often on the clinical case rather than individual differences [35]. For instance, in the case of alcohol dependence, doctors typically prescribe Naltrexon, whereas for pneumonia, Amoxicillin is commonly prescribed, without the need to consider personal variations, as shown in Figure | (a). Therefore, similarity in current patient visits is more common than similarity in the complete medical histories of patients [35] 33 Representations of patient cases would aid in drug recommendation outcomes, accelerating the process of drug identification 9 21 44) However, directly modeling full patient histories would significantly increase memory and computation costs due to the vast and diverse nature of clinical records. Therefore, adopting a condensed and reusable reference paradigm during the recommendation process is a worthwhile consideration in real applications.
Furthermore, researchers have gradually realized that the biochemical activities of a drug are often linked to a few privileged molecular substructures [14] 17 45). Therefore, the active ingredient of a drug can be associated with the function of specific substruc- tures within the drug molecules, and making pre- scriptions based on molecular substructure awareness may lead to more desirable efficacy and explainabil- ity 44. 17 15). For example. MoleRec [40) adopts the Break Retrosynthetically Interesting Chemical Sub- structures (BRICS) method [3] to decompose drug molecules into substructures. SafeDrug also employs the BRICS method to split chemical substructures and is equipped with a global message passing neu- ral network and local bipartite learning module to fully capture the connectivity and functionality of drug molecules. These methods decompose drugs into several substructures to learn the relationships between case representations. However, directly us- ing rule-based decomposition may disrupt the effec- tive substructure connectivity in drugs, as shown in Figure (b)- Drug activity is typically achieved through the combination of multiple substructures rather than a single one. Moreover, the extraction of substructures should consider the patient's health condition, as other comorbidities may also influence prescription decisions, which is crucial prerequisite.
Diggncs and Preseiting
(8)
Aloohol depen
Preamenta
Parumonts
Alcchoi
Vidi1
Maxdoot
Viss
(b)
(c)
[d)
Figure I: Doctor's Diagnosis and Prescribing Pro- cess. (a) Doctors often prescribe Naltrexone for Alcohol Dependence and Amoxicillin for Pneumo- nia, even for different patients. This is guided by professional medical knowledge, (b) 3D molecular structure of Amoxicillin. (c) The five molecular scaffolds of Amoxicillin, derived using the BRICS method B] (d) The 3-lattam ring, the active in- gredient of Amoxicillin.
In light of this, we propose SubRec, deep learning framework that integrates drug substructures with longitudinal electronic health records (EHRs) for precise and interpretable drug recommendation. SubRec is designed address two key challenges in personalized medicine: (1) the complexity and sparsity of patient historical records, and (2) extracting patient-specific core substructures. To handle the vast and diverse nature of patient cases, we extend the idea of vector quantization (VQ) [31] 23
by constructing an adaptive codebook that clusters heterogeneous patient-drug interactions into a compact set of prototypes. This quantized representation avoids the instability of variational modeling in high-dimensional latent spaces, and yields a lightweight, discrete structure that supports efficient similarity matching across patient representations. On the drug side, SubRec improves conditional information bottleneck (CIB) to extract condition-specific core substructures by treating the patient health context as a conditional variable and the molecular graph as the prediction target. This results in concise, interpretable drug embeddings that capture substructures most relevant to a given clinical state. These representations are then aligned with the patient's 's prototype for personalized drug recommendation. The quantization process avoids the complexity and instability of modeling variational distributions in high-dimensional latent spaces, making the model lighter and more stable during training [37] 46). The discrete structure of the latent space naturally supports the CIB principle

---

by enforcing a compact representation [34]. Through the joint modeling of condition-as condition-aware aware drug substructures and quantized patient states, SubRec effectively balances predictive accuracy and interpretability. This synergy represents novel mechanism for learning discrete, clinically grounded representations, enabling reliable and safe decision-making in drug recommendation tasks.
2
Preliminaries
2.1 Problem Formulation
Based on the patient's visit history, the model aims to predict the optimal drug combination for current visit, balancing both accuracy and safety. Accuracy is defined as the alignment between the predicted medications and those prescribed by the doctor. Safety assessed by the DDI rate.
Electronic Health Records (EHRs). EHRs of patient x are represented as sequence of visit
records: V = [v(1), v22), v()),
vNNa], where y-() corresponds to the i-th visit, and N₂ is the total number of visits for patient æ. Each visit v(1) contains diagnosis, procedure (e.g., surgery), and drug
information, encoded as: v(0) = vdd
(i)
(i) where v E {0, 1| (6) E {0, 1)PP and
v {0, 131-) are multi-hot hot encoded vectors representing diagnosis, procedure, and medication, respectively. And P, and M are corresponding code sets.
Graph Representation. Let G (X, A) denote graph [6]. where X RNxF is the node feature matrix, with N and F denoting the number of nodes and feature dimensions, and A E RNNx x is the adjacency matrix, with A. 1 an edge exists between nodes and j. and otherwise, Aij =
Drug Combination Recommendation. Given the longitudinal diagnosis sequence v
....., v up to time t, as well as the DDI relation matrix D, our objective is to learn a drug combination recommendation function
Va v.....''' v0) and procedure sequence vf = Vp (1) (2)
(t)
f(-) that generates multi-label output g(() E 10,1)lMM Specifically, g(t) f(v', v
2.2 Graph Information Bottleneck (GIB)
The Information Bottleneck (IB) principle [29] aims to extract a compact representation that retains maximal predictive information about the labels. Graph IB (36) extends this idea to irregular graph data, addressing the challenge of substructure recognition. Given a graph & and its label Y, the optimal substructure Gn (X AB) obtained by optimizing the following objective:
GmB = arg min
(Y; 9uub) + 3T (G; Gsuh),
Pun
where X18 and A④ denote the task-relevant feature set and the adjacency matrix of G. I(-) is the mutual information term.
3
Methodology
As shown in Figure 2
SubRec consists of four components, which will be detailed below:
3.1
Patient Representation Module
We represent the patient's health status using diagnosis and procedure information, and define two learnable embedding matrices: the diagnosis embedding table Es R|D|xF and the procedure embedding table Ep R XF The embeddings extracted via dot product between the multi-hot vectors and the embedding tables, and the resulting embeddings are summed as follows:
Fat
(i) Ep:
where (.) indicates matrix multiplication between two matrices. We use single-layer Transformer Encoder 32 to model the historical diagnosis and procedure information, processing the entire sequence of embeddings up the i-th visit. Given the sequences of diagnosis and procedure
3

---

Patient Representation Module
Vector Quantitation Module
Prediction Module
Ed
e!9
etg
Transtormer Erioder
C1
P
Ap
Transformer Encoder
122
15
V's Paal Ps
PL.
Drug Combination
Lu
Representation and Substructure Capture Module
MLP
Importance
Xd
H
Drug molecuie
Concitional Interaction
Luce
muitti
comp
Eddt
Figure 2: Overview of SubRec. First, diagnosis and procedure sequences are independently encoded Censformer-Encodee and concatenated to generate the patient representation e at the i-th visit. Then, based on the GIB theory. drugs d undergo core substructure extraction using (*) as conditional variable. The extracted core substructure vectors are pooled to form the drug substructure representation 2d. and collectively, these representations constitute z(a Simultaneously, (f)) recorded as a codebook vector, and corresponding drug recommendation result un is stored. During prediction phase, ((), z!!) and un are utilized combined generate the final drug recommendation.
embeddings for Cd ..... Cd and (cp epp Cp ). the Transformer Encoder generates the corresponding output embeddings:
(i) EEncoder((fc)) od
1),,
h (fcoder,(fo,)) co c
(
Next, we concatenate the diagnosis embedding patient representation:
(8) d and procedure embedding h to form the final
h (
3.2 Drug Representation and Substructure Capture Module
3.2.1
Graph Encoding
We adopt GIN
38 encode the molecular graph as E GIN(X, A), where E {E denotes the node embeddings. To model interactions between nodes and drug-level feature vector e we concatenate each E, with ( and feed the result into multi-layer perceptron (MLP). The resulting interaction features are denoted as H:
H MLP([E; e 1)),
(5)
where [E; [ represents the concatenation of the E E NxF and the vector e( E IRF along the feature dimension, resulting in a matrix of size (2FF), The MLP operates independently on each row of the concatenated matrix, producing the interaction features H E Nx
3.2.2 Conditional Core Substructure Discovery
We focus on learning the core substructure GCus = (XCIs. ACES) the input graph 9, conditioned on the paired patient representation (
Definition 1. (Conditional Information Bottleneck, CIB) Given random variables V1, V2 and Y, the CIB principle compresses V into bottleneck variable T while preserving information relevant to predicting Y conditioned on 22, The objective is optimized as:
min T 22
(I 1
(6)

---

where 3 is hyperparameter balancing trade-ofi off between two conditional mutual information terms.
Definition (CIB-Graph) Given a drug graph and patient representation (g, e()) and their la- bel information Y. the optimal graph ŚCIB (XCIB, ACIB) discovered under the Conditional Information Bottleneck (CIB) principle is referred to as the CIB-Graph. defined as:
GCIB arg min I(Y; e
3I Gsub e()))
Roub
By focusing on essential substructure information and reducing redundancy, 9CTB offers a more efficient, task-specific way to address complexities of personalized medicine modeling.
Minimizing -1 (Y; Gsub e()). It ensures that the optimal substructure Gsub retains sufficient information predict Y. conditioned on the patient representation e According to the chain rule of mutual information, the first term -1 (Y: Gsub
e()) can be expanded follows:
-7 -T(Y: Gsuh e - Y gsun, e(1) + 7 (Y:e()).
(8)
For the term -1 (Y; Goab, e introducing a variational approximation pe (Y Gsub, e(t) for the intractable distribution p (Y Gaub. euub,e()), we derive the following result based the non- negativity property of the Kullback-Leible (KL) divergence:
log p (Y) Gsub ) p(Y)
-Ex Suneel)) log Pe (Y Guub, e(!))
-I (Y:
Gub, Gsub, Gubb, ) -Ey, Sun,ee)))
p(Y)
[log po (Y| Gsubs e(!)) }
=-E Sun.c()) --x.ss..
H(Y).
(9)
Here, H(Y represents the entropy of Consequently, the upper bound - (Y; Isnh, e(1))
calculated by minimizing the prediction loss Lpedd (Y, Gsuh, e(!)).
Epred (Y, Guub e(") ((f(z), Y),
(10)
where z = (H the graph-level embedding of G, obtained from Haub of the subgraph Gsub- and f denotes the prediction head. Details extracting Gsub provided in Equation (3)). The term (Y;:e(t) is omitted, as minimizing it has been empirically shown to impair performance.
Minimizing Gsu
Goub
e e)) We decompose into:
I C; Goub
e(()) 1( 9. e. -1 Goub :e())
(1I)
To address the inefficiency and instability in the optimization process caused by mutual information estimation, we introduce a method called noise injection. The core idea is to allow the model inject noise into less informative substructures while introducing minimal noise into more informative ones. Specifically, given the node embedding H, we compute probability p using a neural network P:
p = P (H)
(12)
Based on the calculated p, we replace the node representation H with noise ~ N (μH o as:
H = AH + (1 X)
(13)
where x ~ Bernoulli (Sigmoid (p)). and дии and o are the mean and variance of H. respectively. To ensure the differentiability of the sampling process, utilize the Gumbel-Sigmoid
20 function
for the discrete random variable x, defined as: À Sigmoid log - + log I- where
~ Uniform(O, 1), and is the temperature parameter and 1.0 is chose. We minimize the upper bound of (Grabi G. e!) as follows:
(g ee()) S <Egger - log B + 2NT B+
2NT C² [-logpg (e(9) (suu))
1
(14)
-1 (Quub: E Begnnee(t)
5

---

where -E (1 (1- 22)² and C
Pe (e(*) 9aub) is the variational approxi- mation of (el0) Gaub). The final Lcomp is optimized by refining the two variational upper bounds.
AN1
A,
OHt
1 log B + 2N
B
1 C2 2N
+ el [- logge
(el))
( (sab)
Coomp
(15)
2
Each drug undergoes the above substructure extraction process with e to obtain zd, Finally, all representations of drug molecules are collected together and compose an embedding table Z e I R of which each row corresponds to a drug.
3.3 Vector Quantitation Module (VQ)
In this section, we introduce the VQ to enhance drug recommendations by utilizing all patients information from the database. Specifically, for each visit we do not only record the prior visit information of the current patient, but also store all visits from other patients up to the current patient
as auxiliary information, denoted as e(t) (t) where e represents the health representation of
patient x at visit i, and Um is the multi-hot encoded drug information at the corresponding visit.
However, directly storing all this information would result in excessive memory and time consumption, as the dataset can grow very large. To address this issue, we introduce the concept of vector quantization [30] to create a trainable, discrete codebook, which helps to compress the vast medical history into a fixed number prototypes. The codebook W defined as follows:
W = {er U1, 62 , Us):
(16)
where each pair (em, Um) corresponds to a discrete entry, with em being patient's health representa- tion and Um being the associated drug recommendation. The parameter S represents the number of distinct patient-drug combinations in the latent space.
For each test patient visit, we search for the most similar health representation in this latent space by using a nearest-neighbor approach, indexed by k. This process serves as a non-linearity that maps the latent vector (1)) to one of the M codebook entries. The selection process is follows:
1, if k arg miny ||e(() eyl12:
q( (9)
(17)
0, otherwise.
Once index & is identified, the corresponding drug recommendation UY is retrieved from the codebook.
To update the codebook and ensure that the encoder's output remains close to the selected codebook embedding, we define the vector quantization loss Luq as follows, where sg]:] denotes the stop- gradient operation and ô is a hyperparameter. This loss function consists of four terms:
|sg[e ex 112 + 6l sg[ex]112 + [|sg[[[[]] - 12 2 + 8110 - sgivx]13
(18)
(4) Here, um represents the actual drug prescribed to the patient visit and vy is the drug associated with the selected codebook entry ex. The last two terms in the loss function ensure the selected drug
vector 24K is close to the actual prescribed drug (t) for accurate drug recommendations.
As Fry gradually converge, we obtain stable codebook W, which clusters the infinite possible combinations of conditions and medications into discretized set of M finite pairs, enabling efficient and context-aware drug recommendations for new patients. The well-trained codebook provides insights into potential patient-drug distributions.
3.4 Recommendation Prediction Module
In this module, we leverage the outputs from the previous three modules: the patient representation f the drug molecular representation Zm, and the recommended drug embedding Us retrieved via codebook. Using these components, we apply attention based reading procedure calculate the output om to retrieve the most relevant information with respect to the query (+))
(Z(9) 3 Z(0)
0 y
Softmax
(19)

---

Additionally, we can obtain prior drug category information from the codebook. To further refine the drug recommendation, we calculate the output to follows:
(t)
2k 2
(20)
The final step to utilize patient representation and memory output predict the multi-label drug:
z +) = ([et0)
(21)
where the sigmoid function, and ((D) represents appearance probability of each drug in the prescription. Then obtain multi-hot prediction vector ( by picking out the entries of g() whose value is greater than a predefined threshold value r (in this work, 7 0.5).
3.5 Loss function
In this section, we summarize our loss function. We instantiate Lired Equation (T).. which includes both binary cross-entropy loss Love and multi-label margin loss Lmmtti Specifically, Lace is the binary cross-entropy loss, while Lmulti the multi-label margin loss, which ensures that the predicted probability for ground truth labels is at least margin larger than for other labels.
[
Licce
Σ
o
log(U,) ( + (1 000) 1og((1
1=1
max
Upp Dq ))
(
(22)
Lmult
[
P. (8)
1,00
(5) m0
Cpred
0 Lhce (1 0)
Lmmlti-
where the superscript denotes the i-th entry of the vector.
DDI Loss. We define the DDI loss as [0]
I M
CDDI ΣΣΣ
0 010) Dpg
(23)
where (ib) D4 Dm gives the pairwise DDI probability. Subsequently, the final total loss is:
C = 0r (Pered + 3.ecopp + 7/ + (1 -0--a a) LDDI.
(24)
where a, B, 0, and y are hyperparameters that control the trade-off' between different losses. Lpred and Ceomp compress G into a substructure Guub while retaining the minimal information relevant to the task, with B controlling the balance between prediction and compression. Lug updates the environment codebook, with 7 governing the update process. To control DDI rates, we dynamically adjust a during training to balance prediction and safety [40]
4 EXPERIMENTS
In this section, we conduct extensive experiments to answer the following questions:
RQ1: Can SubRec improve the accuracy of combinatorial drug recommendations?
RQ2: To what extent do the proposed VQ and GIB modules enhance the performance?
RQ3: What do codebook vectors represent and learn within the model?
4.1 Experimental Settings
Here, briefly introduce the dataset, baseline models, evaluation metrics, and configurations.
Dataset. use the EHR data from MIMIC-II and MIMIC-IV [3]. These dataset include various patients and clinical events. More detailed data analysis results can be found in Appendix B

---

Table I: Performance of different methods MIMIC-II and MIMIC-IV. (Underlined are the best baseline results, while the top-performing method is highlighted in bold which is under t-tests, the 95% confidence level. The calculation method of DDI rate is consistent with previous studies 127 40 35).)
Method
MIMIC-II
MIMICIVV
Jaccard (1)
PRAUC
(T
IND (1)
BMKD
Jaccard 67)
PRAUC (1)
FB
AMED
General Methods
POC
0. 0.4915 pwems
01788
16 16.559
044622 yomm
06783 piers
0.5651 mor
0,001 aae
LEAP
0.4521 nuoes
0.658 02029
0.0720 (o00h
18 M8677
0,3909 waoes
0.5542 muose
0.5439 outto
0,0850 10016
12,6355 (012))
<SDay
0.5 moryy
0.6762 woo
0.078) ( d-aon
16. (654) owor
0.400 soonn
0.6835 yome
0.5933 suine
0.07 18 co00
12,8924 y1sae
Lengituiinal History Conaduree
COGNa
0.5231
0,7600
0.6676
0.0737
74.455
0.448
0,5050
0,0866
RETAIIN
1.4968
0,6422
0,8623
010755
04885
0.4518
0,5035
0,0825
VITA
0.5412 mooe
0.7730
0,6838 (0.00
0. 0.0630 m00
19, 19.5941 18.120
0.4420 suas
0.6955 mumm
0 (2001
0 (20000
12.5123 (u152)
GAMMNNet
0.5119
nome
0,5150
0.0610 c win
30:9433 vn teams
(14595 yoon
0-4355
0.4035 (1007
0,0882 (imm
14. 5174 yM
Subetructure- llased Methods
015167 auga
(5
20,2601 (8:07T:
MoleRe:
0.775
0,6844
0092
0.4500
0,5010
0,0699
1402555
Our Methoo
Subieee
0.5585 LAOIA
0.7917 (000
0,7016 mm
(1 0.0623 i m00
19.5040 131
R.4635 Maasn
0,7022 HumSE
0.6216 cuMes
14.0634 (20674 12000)
Baselines. In our comprehensive evaluation, our model is compared with nine SOTA baselines, grouped into three categories. The first includes general methods based on patient representations, in- cluding ECC [24]. LEAP [43], and 4SDrug [27]. The second category includes experienceerule-baasee methods that leverage longitudinal patient history, such as RETAIN (2) VITA [16], GAMENet (25), and COGNet 33 The third category consists of drug recommendation methods that consider molecular substructures, including SafeDrug 33 and MoleRec 40) Details are in Appendix C
Evaluation Metries. Four metries employed to evaluate model performance: DDI Rate, Jaccard Similarity Score (Jaccard), Fl-score, and Precision-Recal AUC (PRAUC). The Jaccard Similarity Score measures the similarity between predicted and true drug sets, while the Fi-score and PRAUC are used to assess the model's classification performance. The DDI Rate focuses on controlling the The detailed definitions are in Appendix D
occurrence of adverse drug interactions 22 10 47
4.2 Model performance
Similar to previous studies [25 40], the longitudinal patient history is split into training, validation, and test sets with a ratio of 4: 1: 1 for evaluating model performance. The experimental results are recorded in Table Appendix F Based these outcomes, we delineate three key observations:
Obs.1: The drug recommendation results exhibit higher similarity when patient cases are similar. We analyzed the MIMIC-III dataset, using patient's visit record as the reference point. As shown in Appendix[]l. we randomly selected 10,000 samples and calculated the diagnosis and drug similarity using the Jaccard index as the similarity measure. The Pearson correlation coefficient between the two was found to be 0.53, indicating a relatively positive correlation between the patient visit characteristics and the recommended drug combinations. This result is consistent with clinical understanding, as similar diagnoses often lead to the prescription of similar drugs.
Obs.2: SubRec exhibits optimal predictive performance compared to other baseline models. Specifically, ECC and LEAP perform relatively poorly as they only consider diagnoses and procedures from the current visit. In contrast, RETAIN, VITA, and GAMENet perform better because they take longitudinal patient information into account. SafeDrug and MoleRee incorporate drug molecule structures in drug recommendation, leading to further performance improvements. However, these models, which adopt the BRICS method [3], focus solely on molccular fcatures and ignore the relationships between patient health conditions and molecular substructures. Consequently, SubRec outperforms these two models by integrating both aspects.
Obs.3: SubRec exhibits better robustness in cases with limited or no historical drug information. The MIMIC-III dataset has an imbalanced distribution of patient visit records, with the majority of patients visiting the hospital fewer than five times. This creates a challenge for models that need to learn patient-drug relationships from other patients' visit records for accurate recommendations. As shown in Appendix F 2, overall, models tend to perform better with more visits, suggesting that historical visit records contribute to the model's inference process. However, SubRec demonstrates superior prediction performance in this scenario while maintaining a low and stability DDI rate.
8

---

4.3 Sensitivity analysis
In this section, we investigate the impact of 3.7, 6 and codebook size S on model performance.
Obs.4: The parameter 3 aims to achieve optimal prediction performance while maintain- ing a reasonable substructure compression rate. We first analyze the effect of the parame- ter 3 in the substructure extraction process, which controls the trade-off between prediction ac- curacy and compression efficiency in our final objective, as outlined in Equation (7) When = 0. the model performs poorly, as preserves the original graph input without capturing the essential substructure information. As 3 increases, the model's performance improves, in- dicating that some compression is beneficial for prediction. However, excessively large values of / do not result in continuous performance gains, overly aggressive compression can dis- tort the substructure and hinder the model's ability to make accurate predictions. For example, when 3 > 5E-4, slight decline in performance is observed. Therefore, 3 5E-4 is selected. Obs.5: We also conducted a sensitivity analy- sis on the hyperparameters å and y within the loss function Lyy The hyperparameter is used to balance the commitment loss and embedding loss, while y represents the weight Lvg in the total loss function, outlined in Equation (T8) and Equation (24). We tested multiple combi- nations of these hyperparameters, and observed that varying and did not significantly affect the model's performance, with overall perfor- mance remaining stable. This finding is consis-
0.75
0.5
0.70
0.70
$0.5
fots
Flazze PRAUC
PRALC
1E-1
16-3
1822
Figure 3: Sensitivity analysis results for & and y.
tent with the other studies (30 34 46 There- fore we set 8 to 0.40 and r to 5E-4 (in Appendix
G
0bs.6: The codebook size has slight impact the recommendation results but significantly influences the training duration. We conducted an in-depth investigation into the effect varying the number of vector embeddings reveal that changes in the number of codebook embeddings have a negligible impact on test perfor- mance across test datasets, demonstrating the robustness of our model. On the other hand, increasing the number of codebook vectors significantly increases training time and memory consumption (more in Appendix G). To balance these factors, we chose 32 as the final configuration for our model.
model's performance, shown in Figure 5 The results
4.4 Ablation study
To verify the effectiveness of each module of SubRec, we design the following variants:
Replace the Transformer module with an RNN module in the Patient encoder.
w/o substructure capture. SubRec no longer considers z(ii when assessing substructure impact.
Remove the auxiliary codebook. Replace codebook vectors with noise.
Obs.7: Ablation on model components. As shown in Table 2 when the RNN module is used as replacement for the Transformer, the model performance slightly decreases. This may be due to RNN less effective at capturing long-range dependencies EHRs compared Transformer. Removing either the substructure capture or auxiliary codebook results in a noticeable performance drop. This suggests that SubRec effectively models the relevancy between patients and molecular substructures. thereby enhancing the drug recommendation process. The role of the auxiliary codebook is more prominent in enabling the model learn and summarize knowledge from historical patient records. Without this knowledge, the recommendation results deteriorate obviously.
4.5
Case study
Obs.8: Different embeddings in the codebook exhibit clear boundaries in the visualization. This indicates that the model effectively captures diverse range of patient-drug variables. Moreover, embeddings derived from each distinct environment form tight clusters around their corresponding environment embeddings. This suggests that updating the codebook vectors essentially clusters the molecular embeddings, with the environment embeddings acting cluster centers (in Appendix H..

---

Table 2: Ablation study MIMIC-III in terms of DDI rate, Jaccard, F1 F1-score, and PRAUC.
Method
DD)
Jaccard (1)
F F--score
(RAUC(1)
Avg. Drugs
Patient Encoder Transformer-RNN
0.5353 0.0737 (c.037
0.6886 (.0027)
19.6349 (.7812/o.002;
w/o substructure capture
0,0748 cou7))
0.5228 (0041)
(o
0.7701
(u.00s
19,3808
w/o auxiliary codebook
0.0729 00000)
0.5257
0.6810/o.0026)
0.7723
19.2589 1640)
SubRec
0.0623 (.0008)
0.5585 (0.0033]
0.7016 (.0000)
0.7827 (0.0025)
19,5040
Conclusion
In this work, we propose SubRec, novel framework for personalized drug recommendation. SubRec first encodes historical patient visit records and quantize to to construct discrete codebook, while simultaneously capturing the complex relationships between patient health conditions and drug substructures. The quantization process eliminates the need to model variational distributions in high- dimensional latent spaces, resulting substructure representations and discrete prototypes, SubRec improves training stability and efficiency, while enabling accurate and clinically reliable recommendations on cal-world datasets.
more stable and lightweight training process. By integrating
6
Acknowledgement
This paper is partially supported by the National Natural Science Foundation of China (No. (2229927 The Al-driven experiments, simulations and model training were performed on the robotic Al-Scientist platform of Chinese Academy of Sciences., Anhui Science Foundation for Distinguished Young Scholars (N0.19080)))24), Natural Science Foundation of China (No.62502491).
References
[1] Benson Chen. Molecular Graph Representation Learning and Generation for Drug Discovery. PhD thesis, Massachusetts Institute of Technology, 2022.
[2] Edward Choi, Mohammad Taha Bahadori, Jimeng Sun, Joshua Kulas, Andy Schuetz, and Walter Stewart. Retain: An interpretable predictive model for healthcare using reverse time attention mechanism. Advances in neural information processing systems, 29, 2016.
[3] Jorg Degen, Christof Wegscheid-Gerlach, Andrea Zaliani, and Matthias Rarey. On the art of compiling and using' drrggddulkke chemical fragment spaces. ChemMedChem, 3(10):1503, 2008
[4] RW DeSimone, KS Currie, SA Mitchell, JW Darrow, and DA Pippin. Privileged structures: applications drug discovery. Combinatorial chemistry & high throughput screening, 7(5):733 493, 2004.
[5] P Kingma Diederik. Adam: A method for stochastic optimization. (No Title), 2014.
[6] Wenjie Du, Xiaoting Yang, Di Wu, FenFen Ma, Baicheng Zhang, Chaochao Bao, Yaoyuan Huo, Jun Jiang, Xin Chen, and Yang Wang. Fusing 2d and 3d molccular graphs unambiguous molecular descriptors for conformational and chiral stereoisomers. Briefings in Bioinformatics, 24(1):bbac560, 2023.
[7] Michael Gabay and SH Spencer. Drug interactions: scientific and clinical principles. Am. Fam. Physician, 99:558-566 2019.
[8] Luis Fernando Granda Morales, Priscila Valdiviezo-Diaz, Ruth Reátegui, and Luis Barba- Guaman. Drug recommendation system for diabetes using a collaborative filtering and clustering approach: development and performance evaluation. Journal of Medical Internet Research, 24(7)x33733,, 2022.
[9] Arya Hadizadeh Moghaddam, Mohsen Nayebi Kerdabadi, Mei Liu, and Zijun Yao. Contrastive learning on medical intents for sequential prescription recommendation. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pages 748-757, 2024.
10

---

[10] Kyuho Han, Edwin E Jeng, Gaelen T Hess, David W Morgens, Amy Li, and Michael C Bassik. Synergistic drug combinations for cancer identified crispr screen for pairwise genetic interactions. Nature biotechnology, 35(5):463-474, 2017.
[11] Alexander Hoerbst and Elske Ammenwerth. Electronic health records. Methods of information in medicine, 49(04):320-336, 2010.
[12] Jia Jia, Feng Zhu, Xiaohua Ma. Zhiwei W Cao, Yixue X Li, and Yu Zong Chen. Mechanisms of drug combinations: interaction and network perspectives. Nature reviews Drug discovery. 8(2):111-128) 2009.
[13] Alistair EW Johnson, Tom Pollard, Lu Shen, Li-wei H Lehman, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific data, 3(1):199 2016.
[14] Yu-Ting Kao, Shu-Fen Wang, Meng-Hsiu Wu, Shwu-Huey Her, Yi-Hsuan Yang, Chung-Hssee Lee, Hsiao-Feng Lee, An-Rong Lee. Li-Chien Chang, and Li- Pao. A substructure- -ased screening approach to uncover n-nitrosamines drug substances. Journal of Food and Drug Analysis, 30( 1051,)150, 2022.
[15] Jonghoon Kim, Hcejun Kim, and Seung Bum Park. Privileged structures: efficient chemical "navigators" toward unexplored biologically relevant chemical spaces. Journal of the American Chemical Sociery, (36(42):146291144 14629-14633 2014.
[16] Taeri Kim, Jiho Heo, Hongil Kim, Kijung Shin, and Sang-Wook Wook Kim. Vita:' carefully chosen and weighted less' is better in medication recommendation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 8600-860 0600-867,-000 2024.
[17] Justin Klekota and Frederick P Roth. Chemical substructures that enrich for biological activity. Bioinformatics, 24(21):2518-22 22222225, 2008
[18] Rajiv Kohli and Sharon Swee-Lin Tan. Electronic health records. Mis Quarterly, 40()):55--574 2016.
[19] Yabin Kuang and Minzhu Xie. Drugdoctor: enhancing drug recommendation cold-start scenario via visit-level representation learning and training. Briefings in Bioinformatics, 2566),bbae464, 2024.
[20] Chris Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: contin- uous relaxation of discrete random variables. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017.
[21] Arya Hadizadeh Moghaddam, Mohsen Nayebi Kerdabadi, Mei Liu, and Zijun Yao. Con- trastive learning medical intents for sequential prescription recommendation. arXiv preprint 2.Xi::2408..0259, 2024.
[22] Minh-Van Nguyen, Duy-Thinh Nguyen, Quoc-Huy Trinh, and Bac Le. Algnet: Attention light graph memory network for medical recommendation system. In Proceedings of the 12th International Symposium on Information and Communication Technology, pages 570-577, 2023.
[23] Ali Razavi, Aäron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In NeurlPS, pages 14837-14847, 2019.
[24] Jesse Read, Bernhard Pfahringer, Geoff Holmes, and Eibe Frank. Classifier chains for multi- label classification. Machine learning, 85:333-359, 2011.
[25] Junyuan Shang, Cao Xiao, Tengfei Ma. Hongyan Li, and Jimeng Sun. Gamenet: Graph augmented memory networks for recommending medication combination. In proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 1 1126-1133 2019.

---

[26] Kazuyuki Shimada, Hidekatsu Takada, Satoshi Mitsuyama, Hideyuki Ban, Hitoshi Matsuo, Hitoshi Otake, Hiroyuki Kunishima, Keiji Kanemitsu, and Mitsuo Kaku. nrugreccommenittion system for patients with infectious diseases. In AMIA Annual Symposium Proceedings, volume 2005, page 1112. American Medical Informatics Association, 2005.
[27] Yanchao Tan, Chengjun Kong, Leisheng Yu, Pan Li, Chaochao Chen, Xiaolin Zheng, Vicki S Hertzherg, and Carl Yang. 4sdrug: Symptom-based set-to-set small and safe drug recommenda- tion. In Proceedings of the 28th ACM SIGKDD Conference Knowledge Discovery and Data Mining, pages 3970-3980, 2022.
[28] Hugh Tilson, Lisa E Hines, Gerald McEvoy, David M Weinstein, Philip D Hansten, Karl Matuszewski, Marianne Le Comte, Stefanic Higby-Bakenn Joseph T Hanlon, Lynn Pezzullo, et al. Recommendations for selecting drug-drug interactions for clinical decision support. American Journal of health-systenn pharmacy, 73(8):576-58) 2016.
[29] Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
[30] Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. Advances in neural information processing systems, 30, 2017.
[31] Aäron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In NIPS, pages 6306-6315, 2017.
[32] A Vaswani. Attention is all you need. Advances in Neural Information Processing Systems, 2017.
[33] Yejing Wang, Shen Ge, Xiangyu Zhao, Xian Wu, Tong Xu, Chen Ma, and Zhi Zheng. Doctor specific tag recommendation for online medical record management. Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 5150-5161, 2023.
[34] Lirong Wu, Yijun Tian, Yufei Huang, Siyuan Li, Haitao Lin, Nitesh V Chawla, and Stan Z Li. Mape-ppi: Towards effective and efficient protein-protein interaction prediction via microenvironment-awaal protein embedding. arXiv preprint arXiv:2402. 140,9191.. 2024.
[35] Rui Wu, Zhaopeng Qiu, Jiacheng Jiang, Guilin Qi, and Xian Wu. Conditional generation net for medication recommendation. In Proceedings of the ACM Web Conference 2022, pages 935-945, 2022.
[36] Tailin Wu, Hongyu Ren, Pan Li, and Jure Leskovee, Graph information bottleneck. Advances in Neural Information Processing Systems, 33:20437-20448, 2020.
[37] Jun Xia, Chengshuai Zhao, Bozhen Hu, Zhangyang Gao, Cheng Tan, Yue Liu, Siyuan Li, and Stan Z Li. Mole-bert: Rethinking pre-training graph neural networks for molecules. 2023.
[38] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint 1rXiv:1810.00826, 2018
[39] Chaoqi Yang, Cao Xiao, Fenglong Ma, Lucas Glass, and Jimeng Sun. Safedrug: Dual molec- ular graph encoders for recommending effective and safe drug combinations. arXiv preprint arXiv:2105.02711 2021.
[40] Nianzu Yang, Kaipeng Zeng, Qitian Wu, and Junchi Yan. Molerec: Combinatorial drug recommendation with substructure-awer molecular representation learning. In Proceedings of 2023.
the ACM Web Conference 2023, pages
[41] Junchi Yu, Jie Cao, and Ran He. Improving subgraph recognition with variational graph information bottleneck. In Proceedings of the IEFF/CVF Conference on Computer Vision and Pattern Recognition, pages 19396-19405, 2022.
[42] Junchi Yu, Tingyang Xu, Yu Rong, Yatao Bian, Junzhou Huang, and Ran He. Graph information bottleneck for subgraph recognition. arXiv preprint arXiv:2010.05563, 2020.
12

---

[43] Yutao Zhang, Robert Chen, Jie Tang, Walter F Stewart, and Jimeng Sun. Leap: learning to prescribe effective and safe treatment combinations for multimorbidity. In proceedings of the 23rd ACM SIGKDD international conference on knowledge Discovery and data Mining, pages 1315-1324, 2017.
[44] Zhi Zheng, Chao Wang, Tong Xu, Dazhong Shen, Penggang Qin, Baoxing Huai, Tongzhu Liu, and Enhong Chen. Drug package recommendation via interaction-awasn graph induction. In Proceedings of the Web Conference 2021, pages 1284-1295, 2021.
[45] Jiajing Zhu, Yongguo Liu, Chuanbiao Wen, and Xindong Wu. Dgdfs: Dependence guided discriminative feature selection for predicting adverse drug-drug interaction. IEEE Transactions on Knowledge and Data Engineering, 34( ():71)228.5 2020.
[46] Xiang Zhuang, Qiang Zhang, Keyan Ding, Yatao Bian, Xiao Wang, Jingsong Lv, Hongyang Chen, and Huajun Chen. Learning invariant molecular representation in latent discrete space. Advances in Neural Information Processing Systems, 36:78435-7844 2023.
[47] Marinka Zitnik, Monica Agrawal, and Jure Leskovec. Modeling polypharmacy side effects with graph convolutional networks. Bioinformatics, 34(13):1457-i46 2018.
13

---

A Related Work
In this work, we classify drug recommendation research into two main categories: experience/rule- based drug recommendation models and drug molecular structure- based approaches.
Experience/rule-base methods learn drug recommendation paradigms from historical data. These methods leverage current patient health conditions or longitudinal patient history. summarizing experiential knowledge to perform drug combination recommendations. LEAP 4
formulates drug
recommendation multi-instance multi-label (MIML) task and utilizes attention mechanisms to capture dependencies between drug labels during a patient's 's current visit to generate prescriptions. 4SDrug [27] proposes measuring the similarity between symptom and drugsets for recommendation. Researchers have increasingly realized that incorporating longitudinal patient history leads to more effective recommendations. Consequently, RETAIN (2] develops two-level neural
attention model for healthcare time-series prediction. GameNet [25 utilizes neeorry-augmente
neural networks, storing patient's longitudinal visit history as references for future predictions. ALGNET [22] further enhances GameNet by incorporating Dual-Self-AIre Self-Attenioonn and Light-GCN to address challenges related to the lack of long-range dependency information. COGNet (35 introduces a novel copy-or-predics mechanism to achieve drug recommendation. While these methods perform successfully, they overlook the functional substructures drug selection.
Drug Structure-considered methods emphasize the relationship between the drug molecular sub- structure and patient's 's health condition to enhance drug recommendations. For example, Safe- Drug 39 proposes a DDI-controllable drug recommendation model that leverages molecular struc- tures and more effectively models drug-drup interactions (DDIs). MoleRec [4]] adopts the BRICS method 3 to decompose drug molecules into substructures and models the relationships between patient health conditions and molecular substructures to improve prediction accuracy. However, de- spite the advantages of molecular substructure-awee aware models in improving efficacy and explainability, neglecting patient health conditions when extracting substructures may disrupt the integrity of func- tional groups within drug molecules. This could lead to misguided model predictions regarding the relevance between given patient's health condition and the corresponding molecular substructures.
Graph Information Bottleneck (GIB) theory provides a precise methodology for extracting sub- graphs and has been widely applied in the task of subgraph extraction from single graph. PGIB [4 introduces a GIB framework designed to identify informative yet compact subgraphs from the original graph, addressing key graph learning challenges such graph denoising and compression. To optimize the challenging GIB objective, PGIB incorporates a mutual information estimator tai- lored for irregular graph data, bi-level optimization scheme, and a connectivity loss to stabilize the optimization process. VGIB [41] further stabilizes the subgraph extraction process by introducing Gaussian noise into node representations, modulating the information flow from the original graph to the perturbed graph. Here, directly applying the GIB theory to extract core substructures proves challenging, as the importance of substructure is context-dependent, i.e., patient's health condition, which requires further consideration.
B
The statisties result of dataset
The statistics are summarized in Table Specifically, we record the total number of patients, clinical events, diagnoses, procedures, and medications, along with the average number of visits per patient, average diagnoses per visit, and other related information.
C Baselines
detailed description of the baselines presented here:
Ensemble Classifier Chain (ECC) 24 : This multi-label model organizes logistic regression (LR) classifiers into sequential chain, where each classifier receives the predictions from the preceding classifier as additional features.
LEAP formulates drug recommendation as sequential decision-making process, employing recurrent decoder to model label dependencies and content-based attention mechanism to capture the mapping between labels and instances.
LEAP 43
14

---

Table Statistics of processed data.
Item
MIMIC-11I
MIMIC-IV
Visits Patients
14949 6344
19461 7567
Disease Proc. Size
1959 / 1440
3973 1338
ATC3/ / ATC4 Size
112 / 141
212 302
Avg. Max Visits
4.92 / 29
7.28 / 42
Avg. Max Diag.
13.79 /
13.39 39
Avg. Max Proc.
4.40 / 28
2.57 / 28
Avg. Max ATC3
19.58 / 52
10.82 / 55
Avg. Max ATC4
26.23 63
13.31 70
4SDrug is designed to recommend small sets of drugs, aiming to minimize drug-drug interactions (DDIs) while ensuring effective treatment options.
4SDrug 27
RETAIN (2): RETAIN utilizes a two-level neural attention mechanism that identifies influential past visits and significant clinical variables within those visits, enabling better interpretation of temporal healtheare data.
VITA [6]:
VITA aims to recommend effective medications for patients' current visits by leveraging information from their present and past medical histories. It identifics relevant historical medical visits for each patient's current condition and accurately quantifies the correlation between the current visit and each historical visit.
GAMENet is based on memory networks enhanced with memory bank that integrates drug usage information, Drug-Drug Interaction (DDI) graphs, and dynamic memory to incorporate patient history into predictions.
GAMENet [25]:
SafeDrug
39 SafeDrug extracts and encodes molecular structure information enrich the drug recommendation process, improving drug selection by considering structural characteristics.
MoleRec 40) investigates the relationships between the health condition of patients and molecular substructures to improve the prediction.
COGNet proposes novel approach where it decides whether to replicate previously prescribed drug or recommend new drug combination by analyzing historical recommendations and the current patient visit.
COGNet 35
D Evaluation Metrics calculation method
Here, we provide the detailed calculation methods for the four metrics used to evaluate model performance: Drug-Drug Interaction Rate (DDI), Jaccard Similarity Score (Jaccard), F1-score, and Precision-Recal AUC (PRAUC).
Drug-Drug.
Interaction Drag-Drug-Interactiin
Rate (DDI) For a certain patient x, the corresponding DDI is defined as:
Σ No DDI
A= E EnIeLi =1) [1Da=1)
(25)
EN Ex.
where N₂ represents the total number of visits for patient x, (9) denotes the multi-label predictions the t-th visit, of denotes the j-th entry of ((t)_ D is the prior DDI relation matrix and is indicator function which returns when Du = otherwise 0.
Jaccard Similarity Score (Jaccard) For certain patient the t-th visit, the definition of Jaceard is as follows:
{ i fi:0!' = 1 n i of = 1
(!)
(26)
{ i 01:000) = 1)
(1) =
15

---

where d(4) and ol denote the multi-label predictions and ground-truth truth recommendation, respectively. Note that *, represents the i-th entry of Then, we take the average over all the patient's visits to obtain the final Jaccard Similarity Score for patient J,
N
Jaccard
Jaccard (
(27)
Nº
where N, represents the total number of visits for patient x.
F1-scoreWe first provide the definitions of Precision and Recall for a patient a at the (-th visit,
Precision (6) {i 6 (i:o = =11
(28)
[[i 06 =1}
Recall [ 0
n {i: (0) = Mi:0! 1}}
(29)
The Fl-score is the harmonic mean of Precision and Recall,
F1 (t)
(30)
Precision
Recall
Then, we average over all visits and obtain F1 score for patient
N₂ N
Fl
F1
(31)
where N2 represents the total number of visits for patient x.
Precision Recall AUC (PRAUC) Note that we treat drug combination recommendation as an information retrieval problem. For the patient æ the t-th visit, PRAUC defined as follows:
IM
(
Σ
Precision(k))
(32)
k=1
ARecall(k)) Recall(A)) Recall(A: 1)(0)
(33)
where A: is the rank in the sequence of the retrieved drugs, |M denotes the number of drugs. Precision(k))() represents the precision at cut-off & in the ordered retrieval list and Recall(k)) denotes the change recall from drug kt - 1 to k. We also average over all visits and then obtain the PRAUC value for patient œ.
1 N N.
PRAUC
Σ (RAUC(
(34)
where N₂ represents the total number of visits for patient
E Proof
The proof of Equation 9 is as follows
I(Y e())= -By log p(Y Gouds c())
(35)
p(Y)
Since the true conditional distribution p(Y X) intractable, we introduce variational approxima- tion pe (Y X). Then:
16

---

log p(Y] Goud: e(1))
p(Y)
log Po Gsuds e(1))
p(Y goubr el1))
=
(36)
P(V)
Po geub: c(i))
log Po Gsubs elt))
log P(Y gsub, e!())
--By,
Ey Ey Srun,e))
(37)
p(Y) log PY Gsub, e(9)
Po
Gsuhs e(s))
Egnssiet)) [DKL (p(r) Isubs el el (l Goub, (
e
p(Y)
(38)
By the non non-negativviy of the KL divergence, we have:
p(Y Gouds { < - -EY
log PY Goub e(1)
Buusee log
(39)
p(Y)
p(Y)
Continuing, we can rewrite the right-hand side as:
-By log Po(Y Goub, e(t))
By.ssuw.. log Gsuh, e!1)) Ey ((o)
p(Y)
(40)
-Y(Y) - Ex.gras.e()) pog goub e(o))
(41)
where H(Y) = -Eyllog is the entropy of -By [Log Goud, e(o) is calcu-
lated by the prediction loss in Eq. 10. Cyr e()), where pool(Hsut)) the graph-level embedding of G obtained from Haus of the subgraph Grub. and denotes the prediction head. H (Y) constant value that can be ignored.
F
Additional Experimental Results
F1
Configurations
The hidden size is set to 128. The model is trained by Adam optimizer [5]. The code is based on Python 3.8.16 and PyTorch 1.9.0. The model was trained on an NVIDIA Tesla V100 16GB. We applied bootstrapping sampling 10 times the validation set, and the results presented the mean and standard deviation.
F22 Similarity Analysis
Using the MIMIC-III dataset, we analyzed patient visit records as reference points and randomly selected 10,000 samples to calculate diagnosis and drug similarities with the Jaceard index. The analysis revealed Pearson correlation coefficient of 0.53 between diagnosis similarity and drug recommendation similarity, indicating a moderately positive correlation. This finding reinforces the idea that drug recommendation models align closely with climical practices by leveraging patterns in patient diagnosis data, as shown in Figure 4 (a). To further illustrate this point, we additionally examined the similarity between patient diagnoses and recommended drugs. The results, summarized in Table 4 clearly show that higher diagnosis similarity corresponds to a greater overlap in drug recommendations.
E33 Limited Scene Analysis
In scenarios with limited patient visits or sparse longitudinal history, models relying heavily on memorized patterns from past records tend to degrade in performance. For instance, COGNet's
17

---

Table 4: Relationship between diagnosis similarity and drug recommendation overlap.
Diagnosis Similarity Range
0.0-0.1
0.1-0.2
0.2-0.3
0.3-0.4
0.4-0.5
Pair Count
2641
1820
1681
1400
1023
Avg. Jaccard (Drug Rec.)
0.2835
0.2945
0.3047
0.3155
0.3222
Diagnosis Similarity Range
0,5-0.6
0.6-0.7
0.7-0.8
0.8-0.9
0.9-1.0
Pair Count
672
206
108
Avg. Jaccard (Drug Rec.)
0.3367
0.3541
0,3873
0.4140
0,5067
(e)
=.D D.0.5411
(b)
Our model
SafeDrug
(c)
COGNet
0.074
0.54
Sminit
0.6
0D1 rate
Jaccord
8..4
0.50
0.070
0.2
0000
0.0
0:48
0.088
0.8
Diagnasia Similarty
Visit
Figure 4: Model performance on a limited number of patient visits scenarios.
"copy-or-predice" mechanism be effective when sufficient history exists, but it suffers when contextual information is scarce. Under these constraints, our evaluation on the MIMIC-III dataset shows that SubRec maintains consistently low and stable DDI rates (Figure 4 (b). (c)), underscoring its ability to ensure patient safety while providing effective recommendations Extremely, in single-drug recommendation setting Table where each visit results in only one prescribed drug, historical signals are insufficient to support accurate predictions., Compared to COGNet, which exhibits the highest memory consumption and relies on historical repetition, SubRec leverages structure-aware design to extract condition-specific drug substructures via the GIB module and further refines them through the VQ mechanism. This enables efficient similarity matching and ensures that the learned representations remain both clinically relevant and robust, even with restricted historical input. As result, SubRec outperforms other baselines, achieving superior accuracy relative to SafeDrug and MoleRec.
G Additional sensitivity analyses
As shown in Table 6 increasing the number of vectors in the codebook directly leads to rise in model parameters, memory consumption, and training time. Given the vast potential space and the diversity of patient-drug combinations, our objective is to make the latent codes compact, meaningful, and represented with few bits possible. Simultaneously, it is crucial for the latent codes to convey as much information as possible, ensuring the model remains confident in the latent codes derived from the input. Thus. balancing the trade-off between description length and information content in the latent code becomes essential.
H
Case study
Here, we present the dimensionality reduction analysis results of the codebook vectors in SubRec, as shown in Figure 6 The training samples are effectively clustered, with the environment embeddings serving as cluster centers. Further analysis cluster center embeddings from category reveals that they correspond to the diagnoses recorded in Visit 30, alongside their associated prescribed medications. A closely related vector, Visit 37, shows a high degree overlap in diagnostic records (red color), with corresponding similarity in prescribed drugs.
Moreover, Visit 44, a test sample vector, is assigned to category 5 based on calculations from Equation (7). Visualization reveals that its diagnoses and drug recommendation results are highly
18

---

Table 5: Performance comparison under single-drug recommendation scenario.
Table 6: Performance with different codebook sizes.
Size
Time (min)
Memory (MB)
Params
Model
Jaccard
16
392.95
1762
2.96M
SubRec
0.1620 + 0.1641
32
459.45
1762
2.97M
MoleRec
0.1269 + 0.1108
2000
582.42
1770
3.48M
COGNet
0.1037 1 0.0086
5000
580.94
1782
4.26M
SafeDrug
0,0755 + 0,0043
20000
975.18
1864
8.14M
GameNet
0.0521 = 0.0032
0.80
0.80
0.70
0.70
0.66
Jaccard F1 11-5000e
Jaccard F1 Fi-score FRAUC
0.60
PRAUC
0.60
0.55
0.55
Code
Figure 5: Sensitivity analysis results for different hyperparameters and codehook size
similar to those of Visit 30 (green color). This indicates that the VQ-based codebook encoding effectively captures and stores representative patient-drug relationships, enabling the model to achieve accurate drug recommendations.
TSME
-02
-00
-20
0
20
40
62
TSME-1
Diagmoses
Medications
140, 130, 180, 54 188, 160,
158. 170, 157, 82, 22, 111.
AD6A, B01A, CO2D, AC2B, NO3A,
Visil 30
157. 155. 198, 611
164.
NDRA, DS4A, VOSA, GD1B, CETA
148, 150, 160, 54, 160, 82.
AD6A, NO28, BO1A, CO2D, A02B.
Visit 37
186,
169, 151,
200, 198
NO3A, AD4A, NOBA, VOSA, C018,
COSC,
CO2A.
111..
164, 81
NO58
148, 130. 180, 54. 170, 156,
B01A, CD2., A02B, NCSA, CIID. AD4A, NO6A, VOSA, C01B, NO1A,
Visit 44
183.
151,
82, 22, 157, $111.
1/1,
164,
Figure 6: TSNE analysis of codehook vectors in SubRec codebook. The table below displays the patient records. with red indicating the overlap of diagnoses and drugs between training sample vectors and cluster center vectors, green indicating overlap between test sample vectors cluster center vectors.
I Complexity Analysis
While our method introduces some additional computational cost compared to lightweight baselines, the overhead remains manageable and can be effectively mitigated through practical strategies. As shown in Table 7, SubRec consumes less memory than COGNet and is only marginally slower than
19

---

Table Comparison of model efficiency in of memory, parameters, training, and inference (Shared GPU,
NVIDIA Tesla V100 16G).
Model
Memory (MB)
Para. (M)
Train (h)
Test (10 runs; min)
GameNet
496
0.44
5.33
1.22
SafeDrug
1716
0.37
4.06
0.45
MoleRec
1422
0.51
10.71
0,85
COGNet
3266
1,36
24.44
6,44
SubRec (codebook size 32)
1762
2.97
20.63
4.50
Table Efficiency improvements of SubRec under different strategies.
Variant
Train (h)
Test (10 runs; min)
SubRee (Shared GPU)
20.63
4.50
SubRec (Early stopping)
8,71
4.01
SubRec (Dedicated GPU)
7.23
2.07
SafeDrug and MoleRec, while achieving substantially better predictive accuracy. The increased complexity largely stems from modeling the sparsity of longitudinal EHRs and the heterogeneity of drug structures- ctruttuees-calllenees that prior methods struggle to address. For instance, COGNet exhibits the highest memory consumption due to its reliance on historical information, whereas GameNet adopts lookup-basee based mechanism that falls outside the scope of deep learning. In contrast, SubRec introduces a VQ module to cluster heterogeneous patient-drug interactions into a compact codebook, mitigating the instability of variational modeling and enabling efficient similarity matching. To further reduce runtime, we evaluate optimization strategies (Table X) applying early stopping yields over 2x training speedup with negligible performance loss, and a dedicated GPU environment reduces training time to about hours. Beyond efficiency, SubRec improves interpretability by incorporating an enhanced CIB to extract pharmacologically meaningful substructures conditioned on patient context, while the VQ mechanism enforces a discrete latent structure that preserves only the most relevant features. This design overcomes the limitations of prior rule-based fragmentation approaches (e.g., BRICS in SafeDrug and MoleRec), which disrupt functional group connectivity and overlook the synergistic effects of substructures. As pharnacological studies have shown, many drugs act through shared pharmacophores (c.g.. simvastatin and atorvastatin targeting HMG-CoA reductase), and reactive substructures often explain adverse drug interactions. SubRec explicitly captures such motifs, balancing efficiency, accuracy, and interpretability to provide personalized and clinically meaningful recommendations.
Boarder Impacts Statements
The proposed framework, SubRec, advances personalized medicine by integrating longitudinal electronic health records (EHRs) and molecular substructure knowledge for precise and safe drug rec- ommendations. Future societal consequences include the potential democratize access advanced healthcare technologies by enabling scalable and cost-effective drug recommendation systems across diverse healtheare settings. Additionally, the incorporation of molecular substructure knowledge opens new pathways for drug repurposing and accelerated drug discovery, further benefiting global healthcare. By aligning Al systems with clinical practices and ethical standards, SubRec holds promise to not only improve individual patient outcomes but also transform the broader landscape of medical treatment and drug safety.
K
Limitation
While SubRec demonstrates strong performance personalized drug recommendation, it has several limitations. First, the learned discrete codebook reflects the latent space of the training dataset and thus provides strong adaptability within this space. However, for outtof-distribution (OOD) patient pases-whose profiles deviate significantly from the training distribution the model may require retraining or codebook extension to maintain performance. Second, the framework assumes access to detailed molecular graph information for all candidate drugs, which may not always be available in
20

---

practical clinical settings. Future work could explore dynamic codebook updates and alternative drug representations to improve generalizability and scalability.
21

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification:
The abstract and/or introduction has clearly stated the claims.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or
NA answer to this question will not perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results
be expected to generalize other settings.
is fine to include aspirational goals as motivation as long is clear that these goals are not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification:
We have discussed the limitations.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification. asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low images are taken in low lighting. Or speech-to-text system might be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach address problems of privacy and faimess.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and proofs
Question:
For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [Yes]
22

---

Justification:
We have provided the full proof.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but they appear in the supplemental material, the authors are encouraged to provide short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that affects the main claims and/or conclusions of the paper (regardless whether the code and data are provided or not)?
Answer: [Yes)
Justification: Yes, have fully disclosed all the information.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily a new algorithm, the paper should make clear how to reproduce that algorithm. (b) the contribution is primarily a new model architecture, the paper should describe the architccture clearly and fully.
(c) If the contribution is new model (e.g., a large language model), then there should either way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. the case of closed-source models, may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers have some path to reproducing or verifying the results.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
23

---

Answer:
[Yes]
Justification:
We have provided the code and data.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please the NeurlPS code and data submission guidelines (https://nips.. cc/
publ ic gu des Codeeubmie ss ssionn cesionooliii icy) for more details.
While we encourage the release of code and data, we understand that this might not be possible, so "No" an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https //nips. cc/ wwublic/guideen / //odiddee/Cdeeeeeeee SudeSuumiiee Swwmisssiiii wsssnooliccyyyyooo for more details.
The authors should provide instructions on data access and preparation, including how access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information possible in supplemental material (appended to the paper) recommended, but including URLs to data and code permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification:
We have provided the details for training and testing.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
7. Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: We have done the statistical significance.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, statistical significance tests, at least for the experiments that support main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g.. Normally distributed errors).
should be clear whether the error bar is the standard deviation the standard error of the mean.
24

---

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of enrors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out range (e.g. negative error rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification:
We have present the compute resources.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g.. preliminary or failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics
Answer: [Yes]
Justification:
We have made sure preserve anonymity.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special cireumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is a special consid- eration due to laws or regulations their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: We have discussed the potential impacts.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No. they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that improvement in the quality of generative models could be used to
25

---

generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
there are negative socictal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification: The paper poses such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards challenging, and many papers do require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification:
We have cited the original paper that produced the code package or dataset
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (e.g.. CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (c.g., website), the copyright and terms of service of that source should be provided.
assets are released, the license, copyright information, and terms of in the package should be provided. For popular datasets, paperssw amperswwthhoocs com/ dataset has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if has changed) should be provided.
this information is not available online, the authors are encouraged to reach out to the asset's is creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
26

---

Answer: [Yes]
Justification:
we create an anonymized URL for our code.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include an anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, other labor should be paid at least the minimum wage in the country of the data collector.
Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent)
may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, originality of the research, declaration is not required.
Answer: [NA]
27

---

This research does not involve LLMs as any important, original, or non- standard components.
Justification:
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, or non non-standale standard components.
Please refer to our LLM policy pecttps:/neurigeee c 2025/ LLM) for what should should not be described.
28


Reviews:
[{"review_id": "nO91BSDssy", "reviewer": "Reviewer_Ch3Q", "summary": "This paper introduces SubRec, a unified framework that integrates representation learning across both patient and drug spaces. The framework employs a conditional information bottleneck to extract core drug substructures most relevant to patient conditions, thereby improving interpretability and alignment. Additionally, it incorporates adaptive vector quantization to model patient-drug interactions effectively. The proposed approach is validated on the MIMIC-III and MIMIC-IV datasets, demonstrating its efficacy.", "questions": "I will consider increasing my score if the authors fully address the concerns outlined in the weaknesses section.", "limitations": "yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 1, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n1. The paper is complete, and the results and figures are well-visualized.\n2. The paper is easy to read and follow.\n\nWeaknesses:\n1. Unclear Motivation and Novelty: The motivation behind the proposed SubRec is not sufficiently clear, and its novelty remains ambiguous. The authors have not clearly articulated the differences between the proposed method and prior works such as SafeDrug [39] and MoleRec [40]. Specifically: (1) What are the key limitations of SafeDrug and MoleRec that SubRec aims to address? (2) Why is SubRec expected to outperform these prior methods?\n\n2. Challenges in Personalized Medicine: The authors claim that “SubRec is designed to address two key challenges in personalized medicine: (1) the complexity and sparsity of patient historical records, and (2) extracting patient-specific core substructures.” However:\nThe complexity and sparsity of patient historical records are common challenges in this domain. The authors have not explained why existing methods cannot adequately address these challenges, or how SubRec overcomes them more effectively. This makes the rationale for the proposed method unclear. \n\n3. Graph Information Bottleneck (GIB): The GIB theory referenced in Figure 2 is not explicitly explained. What are the key differences between the proposed method and the following work?\n\n[1] Tailin Wu, Hongyu Ren, Pan Li, and Jure Leskovec. \"Graph Information Bottleneck.\" Advances in Neural Information Processing Systems, 33:20437–20448, 2020.\n\n4. It is unclear how the CIB is integrated into the proposed framework (as shown in Figure 2). A more detailed explanation is required.\n\n5. Lack of Comparisons with Recent SOTA Methods: The paper does not include comparisons with more recent state-of-the-art methods in this field. The following works should be considered for comparison to provide a more robust evaluation:\n\n[1] SeqCare: Sequential training with external medical knowledge graph for diagnosis prediction in healthcare data. Proceedings of the ACM Web Conference 2023, 2819–2830.\n\n[2] Stage-Aware Hierarchical Attentive Relational Network for diagnosis prediction. IEEE Transactions on Knowledge and Data Engineering, 2023.\n\n[3] Beyond Sequential Patterns: Rethinking Healthcare Predictions with Contextual Insights.\" ACM Transactions on Information Systems, 2025.", "was_revised": true, "final_justification": "Thank you to the authors for the detailed response. After reviewing the authors' rebuttal and the comments from other reviewers, my concerns have been addressed. Therefore, I increase my score to 4.", "rebuttal": "# Response to Reviewer Ch3Q:\n\n>**W1&W2:** Substructure-based modeling has already been explored in prior work.\n\nThank you for this comment. We acknowledge that **SafeDrug** [1] and **MoleRec** [2] are important prior works in substructure-based DDI modeling. However, these approaches rely on **rule-based decomposition (like BRICS)** of drugs, which may disrupt the intrinsic connectivity of functional groups, as illustrated in Figure 1. Drug activity usually arises from the **synergistic effect of multiple substructures** rather than isolated fragments. Moreover, meaningful substructure extraction should also account for patient-specific factors, such as comorbidities, which influence prescription decisions (Line 64–72).\n\nTo better clarify our contributions, we have added **drug substructure visualization results** in revised version demonstrating that our method captures chemically coherent and clinically relevant motifs. Due to policy restrictions, we are unable to include these figures in the rebuttal, and we appreciate your understanding.\n\n>**W1:** How SubRec overcomes the challenges.\n\nThank you for your valuable comment. Current research on drug recommendation can generally be divided into two categories: (i) methods that rely on historical patient information, such as COGNet, and (ii) methods that leverage drug substructures, such as SafeDrug and MoleRec. The former often suffers from the complexity and sparsity of longitudinal EHRs, resulting in high computational costs and difficulty in capturing transferable patterns (as shown in the following table). In particular, COGNet, as a typical historical information–based model, exhibits the highest memory consumption. GameNet is another early approach relying on historical data, but it primarily performs lookup-based matching with dynamic memory in key–value form, which falls outside the scope of deep learning models. To address these challenges,  SubRec employs a vector quantization (VQ) module to cluster heterogeneous patient–drug interactions into a compact codebook, mitigating the instability of variational modeling and enabling efficient similarity matching.\n\n|      | Memory (MB) | Para. (M) |\n| ---------- | -------- | ----- |\n| GameNet  | 496 | 0.44  |\n| SafeDrug   | 1716| 0.37 |\n| MoleRec    | 1422 | 0.51  |\n| COGNet     | 3266  | 1.36 |\n| SubRec (codebook size = 32) | 1762| 2.97 |\n\nThe latter, represented by approaches such as SafeDrug and MoleRec, typically uses rule-based method (e.g., BRICS) to split molecules into fragments, which disrupts the natural connectivity of functional groups and fails to reflect the synergistic effect of multiple substructures.  Here, we would like to emphasize that while it is true that clinicians typically rely on medical knowledge and pharmacological guidelines, **the molecular structure remains a fundamental determinant** of a drug’s pharmacodynamics and mechanism of action[1,2]. 1) Many drugs exert their therapeutic effects through **functional substructures**, or pharmacophores. For example, _simvastatin_ and _atorvastatin_ share a common pharmacophore that inhibits HMG-CoA reductase, making both effective for lowering cholesterol[3]. 2) Moreover, the latest research has present that  **substructures also contribute significantly to potential adverse drug interactions**. Shared or reactive substructures can lead to overlapping metabolic pathways or toxicity profiles, which are crucial in assessing the safety of drug combinations[4,5].  Therefore,  we incorporates an improved CIB to extract core drug substructures conditioned on patient health context, ensuring that the learned representations remain both concise and clinically relevant. The VQ mechanism further supports CIB by enforcing a discrete latent structure that preserves only the most task-relevant information. Through this design, SubRec overcomes the limitations of prior methods, achieving a better balance between predictive accuracy, robustness, and interpretability.\n\nIndeed, existing works in this field, especially **SafeDrug[1] and MoleRec [2], do not provide explicit demonstrations of the importance of drug substructures. Therefore, our original manuscript did not include such visualizations. In the revised version, following your advice, we have added drug substructure visualization results**, which clearly show that our method captures chemically coherent and clinically relevant motifs. Due to policy restrictions, we are unable to include these figures in the rebuttal, and we kindly ask for your understanding.\n\n[1] Why drugs fail—a study on side effects in new chemical entities. Nat. Rev. Drug Disc.  2005\n[2] Pharmacophore modeling in drug discovery. Nat. Rev. Drug Disc. 2016\n[3] Large-scale prediction and testing of drug activity on side-effect targets. Cell. 2012\n[4] Learning motif-based graphs for drug–drug interaction prediction via local–global self attention. Nat mach Intell. 2024\n[5] Emerging drug interaction prediction enabled by a flow-based graph neural network with biomedical network. Nat Comp Sci. 2023\n\n>**W2:** The complexity and sparsity of patient historical records.\n\nThank you for your insightful comment. We would like to further elaborate on how our framework addresses the complexity and sparsity of patient historical records.\n\nFirst, regarding complexity, as noted in our response to the previous question, modeling the full visit history of patients can lead to significant memory consumption, especially in deep learning frameworks. To mitigate this, we designed a VQ module to encode heterogeneous patient–drug interactions into a compact codebook. This representation reduces computational overhead while retaining valuable information from historical visits.\n\nSecond, concerning sparsity, our dataset is split based on patients, but the number and frequency of visits vary significantly. Some patients have rich historical records, while others have only a few visit. This inconsistency introduces sparsity into the training process. In the extreme case of one-shot scenarios (i.e., patients with only one visit), we evaluate model performance and report the results in Figure 4, with detailed descriptions in Appendix E.3.\n\nIn addition, we considered a single-drug recommendation scenario, where each visit results in only one prescribed drug. This setting provides limited contextual information from longitudinal history. Our evaluation on the MIMIC-III dataset shows that models heavily dependent on patient history (e.g., COGNet) perform worse under this constraint. In contrast, structure-based models, MoleRec and SafeDrug, maintain superior performance, as they can capture intrinsic associations between molecular substructures and clinical conditions. The GIB module further strengthens this by extracting condition-specific drug substructures, allowing SubRec to remain effective even in sparse or low-information settings, and outperforming other baselines.\n\n| SubRec   | 0.1620 ± 0.1641  |\n| ------- | --------- |\n| MoleRec  | 0.1269 ± 0.1108  |\n| COGNet   | 0.1037 ± 0.0086  |\n| SafeDrug | 0.0755 ±  0.0043 |\n| GameNet  | 0.0521 ± 0.0032  |\n\n>**W3:** What are the key differences between the SubRec and GIB (NIPS 2020) ?\n\nRecently, information bottleneck (IB) theory (Arxiv., 2000) has been applied to learning significant subgraphs of the input graph for explainable GNNs (NIPS 2020, CVPR 2022; 2020; ICML 2022), which provides a principled approach to determine which aspects of data should be preserved and which should be discarded (AAAI 2021). However, directly applying GIB in the context of drug recommendation is non-trivial. Traditional GIB-based methods learn the core subgraph solely from the input graph itself, while in drug recommendation, the task requires **considering patient-specific conditions** to recommend optimal drug combinations. Therefore, our framework learns a **condition-specific core subgraph** $\\mathcal{\\widetilde{G}}_{\\mathrm{IB}}$ that maximizes the mutual information between drug substructures and the prediction target $Y$ (Eqs. 6–7).\n\nMoreover, our approach aims to go beyond existing GIB applications by integrating precise substructure-level reasoning with longitudinal patient records in an organic manner. This joint modeling allows SubRec to leverage both molecular structural knowledge and patient-specific clinical context, carefully balancing their contributions to achieve high predictive performance while simultaneously maintaining a low DDI rate.\n\n>**W4:** How the CIB is integrated into the proposed framework.\n\nThe framework models patient representations for prediction from three complementary aspects.\nFirst, by leveraging drug substructure information and the conditional drug CIB mechanism, the model focuses on extracting condition-specific core features from drug substructures while suppressing irrelevant information. This enables the generation of targeted molecular representations for all candidate drugs, thereby improving prescription accuracy. Second, by incorporating historical information, the framework employs a VQ module to construct a compact codebook that reduces complexity and efficiently encodes heterogeneous patient–drug interactions. Finally, through the interaction between condition-aware substructures and quantized patient states, the model produces reliable recommendation outcomes while maintaining a low DDI rate.\n\n\n>**W5:** Lack of Comparisons with Recent SOTA Methods.\n\nThank you for your suggestion. We have added the mentioned baseline model (Jaccard Index) in the revised version. The results show that our method maintains a clear advantage on the **MIMIC-III** dataset, while on **MIMIC-IV** it performs slightly lower than **BSP**, **SeqCare**, and **HAR**.\n\n|      | MIMI-III | MIMI-IV |\n| ----- | ------ | ----- |\n| HypEHR  | 0.5139   | 0.4837|\n| MedPath | 0.4997  | 0.4547|\n| HAR     | 0.5049 | 0.4789 |\n| SeqCare | 0.5097| 0.4827|\n| BSP     | 0.5375 | 0.4986 |\n| SubRec  | 0.5585  | 0.4635 |"}, {"review_id": "nzO66OFEtN", "reviewer": "Reviewer_Y23r", "summary": "This paper propose a personalized drug recommendation method called SubRec, which innovatively combines drug molecular substructure information with EHR to improve the accuracy, interpretability and safety of drug recommendations. The model proposes two core modules: a key substructure extraction mechanism for CIB to make drug representations highly relevant to the patient's current health state, and VQ for compressing a large number of patient-drug interaction patterns into a discrete prototype space to improve efficiency and enable memory reuse. On the MIMIC-III and MIMIC-IV datasets, the authors demonstrate that the model outperforms multiple existing methods in terms of both accuracy and safety.", "questions": "1. Please identify specific innovations in substructure modeling in this method compared to SafeDrug and MoleRec. If it can be demonstrated that the extracted substructures are more targeted or more relevant to the disease mechanism, it will significantly improve the model interpretation and innovation score.\n2. Lack of citations to relevant literature: \n[1] Enhancing Precision Drug Recommendations via In-depth Exploration of Motif Relationships \n3. Does the specific strategy for constructing the codebook in the vector quantization module shift significantly due to changes in the training set?", "limitations": "NA", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 1, "clarity": 3, "significance": 1, "originality": 2, "strengths_and_weaknesses": "Strengths:\n1. The method design is complete, including patient representation, drug substructure extraction, memory mechanism and final recommendation, with clear structure and reasonable module collaboration.\n2. A combination of CIB and VQ is proposed, which helps to improve the degree of personalization and efficiency of recommendation, and has some practical value. \n3.Comparative experiments are conducted on two real medical datasets, covering different categories of baseline methods with rich evaluation indexes.\n\nWeaknesses\n1.\tLimited Technical Novelty: The proposed CIB module aims to extract condition-specific drug substructures, but substructure-based modeling has already been explored in prior work. For instance, SafeDrug [1] and MoleRec [2] both model drugs as combinations of molecular substructures with considerations of drug-drug interaction (DDI) safety. Moreover, the use of vector quantization in representation compression is not new — techniques like VQ-VAE [3] are well-established. The overall design appears to rely heavily on empirical tuning rather than principled innovation.\n2.\tInsufficient Validation of Model Interpretability: While Figure 6 presents a case study on substructure clustering, it lacks expert annotations or supporting biomedical literature, making it difficult to assess whether the extracted substructures are truly pharmacologically meaningful or disease-relevant.\n3.\tLack of Pharmacological Alignment in Substructure Extraction: Although Section 3.2 introduces a substructure extraction strategy based on Graph Information Bottleneck theory, the paper does not provide concrete examples of the extracted substructures nor any explanation of their alignment with known pharmacological mechanisms. This weakens the model’s claim of clinical interpretability.\n4.\tCharts need to be optimized: for example, the background color of “DrugRepresentation and Substructure Capture Modul” in Figure 2 is too light for the reader's intuitive understanding.\n\n[1]\tYang C, Xiao C, Ma F, et al. Safedrug: Dual molecular graph encoders for recommending effective and safe drug combinations[J]. arXiv preprint arXiv:2105.02711, 2021.\n[2]\tYang N, Zeng K, Wu Q, et al. Molerec: Combinatorial drug recommendation with substructure-aware molecular representation learning[C]//Proceedings of the ACM web conference 2023. 2023: 4075-4085.\n[3]\tVan Den Oord A, Vinyals O. Neural discrete representation learning[J]. Advances in neural information processing systems, 2017, 30.", "was_revised": true, "final_justification": "The authors' diligent efforts during the rebuttal stage have addressed my concerns. Moreover, I recognize that there were misunderstandings on my part, which led me to misjudge the paper's quality. I am very satisfied with the authors' responses and therefore believe the paper deserves acceptance.", "rebuttal": "# Response to Reviewer Y23r:\n\nThank you very much for your valuable comments. We are sincerely encouraged by your recognition of our motivation, technical design, and experimental results. Below, we provide point-by-point responses to your suggestions and concerns. \n\n> **W1&Q1:** Limited Technical Novelty?\n\nThank you for the thoughtful comment. Each module in our framework is carefully designed with domain-specific considerations for both molecular drug structures and clinical patient data.  We acknowledge that prior works, such as SafeDrug [1] and MoleRec [2], also adopt substructure-based modeling and consider DDI safety. However, SafeDrug and MoleRec rely on rule-based fragmentation (e.g., BRICS), which disrupts the natural connectivity of functional groups and fails to capture the synergistic effects of multiple substructures. In contrast, our CIB module learns condition-specific core substructures in a data-driven manner, conditioned on patient health context, ensuring that the extracted motifs are clinically relevant and task-dependent.  Furthermore, motivated by the observation that similarity in current patient visits is often more informative than full-history similarity, we introduce a VQ module to store representative patient–drug interaction prototypes. This module acts as a compact, reusable memory that enhances recommendation in data-limited settings. The VQ also avoids the complexity and instability of high-dimensional variational modeling, making the framework lighter and more stable during training [1,2]. In addition, the discrete latent structure naturally aligns with the CIB principle by encouraging representations that retain only task-relevant information [3].\n\nOverall, SubRec is a framework that unifies condition-aware substructure extraction and discrete patient modeling under a principled architecture. This synergy allows SubRec to achieve SOTA performance while providing chemically and clinically meaningful interpretability, which has not been addressed by prior works.\n\n[1] Mole-BERT: Rethinking Pre-training Graph Neural Networks for Molecules. ICLR, 2023.\n\n[2] Learning Invariant Molecular Representation in Latent Discrete Space. NIPS, 2024.\n\n[3] Conditional Graph Information Bottleneck for Molecular Relational Learning. ICML, 2024.\n\n> **W2:** Insufficient Validation of Model Interpretability.\n\nIndeed, existing works in this field, especially **SafeDrug[1] and MoleRec [2], do not provide explicit demonstrations of the importance of drug substructures. Therefore, our original manuscript did not include such visualizations. In the revised version, following your advice, we have added drug substructure visualization results**, which clearly show that our method captures chemically coherent and clinically relevant motifs. Due to policy restrictions, we are unable to include these figures in the rebuttal, and we kindly ask for your understanding.\n\n\n> **W3:** Lack of Pharmacological Alignment, provide concrete examples of the extracted substructures.\n\nFollowing your suggestions，indeed, existing works in this field, especially **SafeDrug[1] and MoleRec [2], do not provide explicit demonstrations of the importance of drug substructures. Therefore, our original manuscript did not include such visualizations. In the revised version, following your advice, we have added drug substructure visualization results**, which clearly show that our method captures chemically coherent and clinically relevant motifs. Due to policy restrictions, we are unable to include these figures in the rebuttal, and we kindly ask for your understanding.\n\nRegarding **pharmacological alignment**, we have addressed your concern from two perspectives. First, we present results showing that our model recommends similar drugs for patients with similar diagnostic codes, reflecting alignment with clinical prescribing practices (Table 6). Second, we provide real case studies of the recommended drugs, demonstrating that the extracted substructures correspond to known pharmacological mechanisms. These additions reinforce our claim that the proposed method offers clinically interpretable and pharmacologically meaningful predictions.\n\n| **Category**   | **Patient X**                                                                                                                                               |\n| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Diagnosis**  | Postconcussion syndrome, Cerebral artery occlusion, Subarachnoid hemorrhage, Acute kidney failure, Retention of urine, Hypertensive chronic kidney disease. |\n| **Procedure**  | Insertion of indwelling urinary catheter, Venous catheterization.                                                                                           |\n| **Medication** | Neomycin, Cefotaxime, Chlorhexidine, Nimodipine, Heparin, Glyceryl trinitrate, Sultiame, Amiodarone, Potassium chloride, Furosemide...                      |\n| **SubRec**     | Neomycin, Cefotaxime, Nimodipine, Heparin, Glyceryl trinitrate, Sultiame, Potassium chloride, Furosemide, Carbamazepine, Mannitol...                        |\n| **Category**   | **Patient Y**                                                                                                                                               |\n| **Diagnosis**  | Subendocardial infarction, Coronary atherosclerosis, Hypertension, Asthma, Hypercholesterolemia.                                                            |\n| **Procedure**  | Insertion of coronary artery stent, heart cardiac catheterization, Coronary arteriography. Insertion of transvenous pacemaker system.                       |\n| **Medication** | Ditazole, Simvastatin, Paracetamol, Practolol, Potassium, Omeprazole, Chloride, Thonzylamine, Tilidine, Sultiame, Oxitriptan, Zafirlukast, Captopril...     |\n| **SubRec**     | Ditazole, Simvastatin, Practolol, Potassium, Chloride, Thonzylamine, Sultiame, Oxitriptan, Zafirlukast, Captopril, Oxyphenisatine...                        |\n\nWith regard to the pharmacological alignment analysis of molecular substructures, current research has rarely considered this issue, and thus there are not enough real-world cases for analysis. However, to further address your concern, we have **re-adjusted our model** to specifically target the prediction of **metabolism-mediated diseases**, while focusing on the **active regions** of drugs. Since this is an approximate analysis, we conducted testing in the form of **drug pair inputs**. This setting allows us to better examine whether the extracted substructures correspond to the regions where the drugs exert their effects. Specifically, we utilized a curated dataset of 73 chemicals (perpetrators) known to inhibit metabolic enzymes via specific functional groups, leading to metabolism-mediated DDIs. These chemicals formed 13,786 pairs with other drugs. Using SubRec, we conducted interpretability analysis by comparing the substructures identified by our model with the enzyme-inhibition functional groups reported in the literature.\n\n| **Evaluation Aspect**                   | **Hit-Rate (%)** |\n| --------------------------------------- | ---------------- |\n| **DDI-level Matching**                  | **60.13**        |\n| **Perpetrator-level Matching**          | **87.53**        |\n| **Frequent Functional Groups Matching** | **78.32**        |\n\n[1] Learning motif-based graphs for drug–drug interaction prediction via local–global self attention. Nature machine intelligence. 2024.\n\n\n> **W4:** Charts need to be optimized.\n\nThank you for this helpful suggestion. In the revised version, we have optimized the figure 2 design by enhancing the color contrast to improve visual clarity and ensure a more intuitive understanding for readers.\n\n\n\n> **Q2:** Lack of citations to relevant literature.\n\nIn response to your comments, we have added relevant references.\n\n\n> **Q3:** Does the specific strategy for constructing the codebook in the vector quantization module shift significantly due to changes in the training set?\n\nThank you for this insightful comment. In our design, the codebook in the vector quantization module is constructed to capture shared latent patterns across the training set, clustering heterogeneous patient–drug interactions into a compact set of prototypes. This design inherently leverages the semantic similarities present across patients and drug interactions, rather than overfitting to individual samples.\n\nWhether the codebook shifts significantly depends primarily on the distribution of the training data. When new training sets share similar distributions with the original data, the learned codebook remains largely stable, as the latent prototypes continue to capture the dominant interaction patterns. Even when novel or previously unseen conditions appear, the codebook still provides meaningful representations because it encodes generalizable structures (Eqs.16-18). Furthermore, its impact is jointly optimized with the overall learning objectives, rather than acting as an isolated component, which further mitigates sensitivity to data shifts.\n\nTherefore, while extreme distributional changes could lead to adjustments in the learned prototypes, under typical conditions the codebook remains stable and continues to support robust and efficient modeling without requiring frequent reconstruction.\n\n---------------\nWe greatly appreciate your insightful and helpful comments, as they will undoubtedly help us improve the quality of our article. If our response has successfully addressed your concerns and clarified any ambiguities, we respectfully hope that you consider raising the score. Should you have any further questions or require additional clarification, we would be delighted to engage in further discussion."}, {"review_id": "HanRobZXvI", "reviewer": "Reviewer_3FcV", "summary": "Drug delivery is a prominent research area with significant industrial relevance, and accurate, safe medication recommendation systems have the potential to revolutionize clinical practice. This paper presents a novel framework, SubRec, which integrates molecular drug substructures with longitudinal electronic health records (EHRs) to enable personalized drug recommendation. The authors leverage the Graph Information Bottleneck (GIB) theory to extract core pharmacologically relevant substructures and employ vector quantization to cluster patients based on clinical similarity via a learned codebook, ultimately improving both the accuracy and safety of drug recommendations.", "questions": "- Can the authors provide more details on the computational efficiency comparison with baseline models?\n\n- I want to konw how does SubRec perform if the noise injection is removed?\n\n- What is the underlying connection between the CIB-graphs and the VQ module?", "limitations": "yes", "rating": 5, "confidence": 5, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "##### Strengths\n\n- The paper addresses a well-motivated and practically significant research problem.\n\n- The proposed approach is conceptually sound and clearly articulated.\n\n- The manuscript is well-organized, clearly written, and logically structured.\n\n- The theoretical formulations are rigorous and provide a solid foundation for the proposed methodology.\n\n\n##### Weaknesses\n\n- The paper lacks a comprehensive analysis of the computational complexity and resource requirements (e.g., training time, memory consumption) of SubRec, which is essential for real-world deployment, especially in clinical settings.\n\n- Additional ablation studies are needed to further isolate the contributions of key components, such as the GIB module, vector quantization, and the patient-clustering mechanism.\n\n- What is the underlying relationship between the CIB-derived subgraphs and the vector quantization (VQ) module? Specifically, how do these two components interact or complement each other in enhancing the representation learning and recommendation accuracy?\n\n- How does SubRec perform when the noise injection mechanism is ablated? This point was not discussied in the paper.", "was_revised": true, "final_justification": "The response addressed my concerns and I recommend accept.", "rebuttal": "# Response to Reviewer 3FcV:\n\nThank you very much for your valuable comments. We are deeply encouraged by your recognition of our paper's motivation, central theme, and  sufficient experimental results. Below, we provide point-by-point responses to your suggestions and concerns. \n\n>**W1&Q1:** Lake computational complexity and resource requirements analysis.\n\nThank you for your suggestion, we have added relevant efficiency experiments. While our method does introduce some additional cost compared to lightweight baselines, we would like to emphasize that the computational overhead is manageable and can be effectively mitigated. Importantly, we found that this issue can be addressed in several practical ways:\n- By applying an **early stopping strategy**, we observed more than 2× improvement in efficiency with minimal impact on performance.\n- In a **dedicated GPU setting**, the training time can be reduced to approximately 7 hours, making the approach much more feasible in practice.\nAdditionally, we believe that further optimization strategies, such as pruning or model distillation, could be applied to significantly reduce runtime, without sacrificing performance.\n\n|                                | Train (h) | Test (10 times；min) |\n| ------------------------------ | --------- | ------------------- |\n| GameNet                        | 5.33      | 1.22                |\n| SafeDrug                       | 4.06      | 0.45                |\n| COGNet                         | 24.44     | 6.44                |\n| MoleRec                        | 10.71     | 0.85                |\n| SubRec                         | 20.63     | 4.50                |\n| SubRec (Early stopping)        | 8.71      | 4.01                |\n| SubRec (dedicated GPU setting) | 7.23      | 2.07                |\n\n>**W2:**  Additional ablation studies are needed to be added.\n\nThank you for your helpful suggestion. In the revised version, we have conducted the requested ablation experiments, which are reported in **Table 2**. Specifically, the ablation of the **substructure extraction module** is denoted as **“w/o substructure capture”**, while the ablation of the **VQ component** is denoted as **“w/o auxiliary codebook”**. Furthermore, we performed an additional analysis on the **effect of varying the codebook size**, and the results are presented in **Table 4**.\n\n\n>**W3&Q3:**  What is the underlying relationship between the CIB-derived subgraphs and the vector quantization (VQ) module?\n\nThanks for your valuable suggestion. Actually, we are motivated by the observation that similarity in current patient visits is often more informative than full-history similarity, we introduce a VQ module to store representative patient–drug interaction prototypes. This module acts as a compact, reusable memory that enhances recommendation in data-limited settings. The VQ also avoids the complexity and instability of high-dimensional variational modeling, making the framework lighter and more stable during training [1,2]. In addition, the discrete latent structure naturally aligns with the CIB principle by encouraging representations that retain only task-relevant information [3].\n\n\n>**W4&Q2:** How does SubRec perform if the noise injection is removed?\n\nWe have conducted the requested ablation by removing the noise injection. The results show **training becomes unstable**, and the performance variance significantly increases. This supports the necessity of the noise injection component for robust optimization.\n\n*From a theoretical perspective, we also provide the proof analysis.*\n\n* **Without noise injection**, the $G_\\{IB}$ selection objective reduces to:\n$\\min_{G_\\{sub}}-I\\left(G_\\{sub}, Y\\right)+\\beta I\\left(G_\\{sub}, G\\right) $\nLet $G \\in \\mathbb{G}$ and $Y \\in \\mathbb{R}$ be the graph and its label．$G_\\{n} \\in \\mathbb{G}$ is the label-irrelevant substructure，independent to $Y$. If $G_\\{n}$ influences $G_\\{sub}$ only through $G$ , then：\n$$\nI\\left(G_\\{sub}, G_n\\right) \\leq I\\left(G_\\{sub}, G\\right)-I\\left(G_\\{sub}, Y\\right)\n$$\nWhen $\\beta=1$ ,the objective encourages $G_\\{sub}$ to be minimally informative about $G_\\{n}$. This inequality is supported by the theoretical results in [1].\n\n* **With noise injection**, let $G_\\epsilon \\in \\mathbb{G}$ is the injected noise and $G_\\{N}$ the resulting noised graph. We consider selecting $G_\\{sub}$​ by filtering out $G_\\epsilon$​ from $G_\\{N}$ ​, and show:\n$$\nI\\left(G_\\{sub}, G_n\\right) \\leq I\\left(G_N, G_n\\right) \\leq I\\left(G_N, G\\right)-I\\left(G_N, Y\\right)\n$$\nSuppose $G, G_N, G_n$ and $Y$ satisfy the Markove condition $\\left(Y, G_n\\right) \\rightarrow G \\rightarrow G_N$. Then:\n$$\nI\\left(G_N ; G_n\\right) \\leq I\\left(G_N ; G\\right)-I\\left(G_N ; Y\\right)\n$$\n$G_N$ is a deterministic function of $G_\\epsilon$ and $G_{sub}$, since we can obtain $G_{sub}$ by filtering out $G_\\epsilon$ from $G_N$. Then, we have:\n$$\n\\begin{aligned}\nI\\left(G_N ; G_n\\right) & =I\\left(G_\\epsilon, G_{sub} ; G_n\\right) \\\\\n& =I\\left(G_{sub} ; G_n\\right)+I\\left(G_{sub} ; G_\\epsilon \\mid G_n\\right) \\\\\n& \\geq I\\left(G_{sub} ; G_n\\right)\n\\end{aligned}\n$$\nTherefore:\n$$\nI\\left(G_{sub} ; G_n\\right) \\leq I\\left(G_N ; G\\right)-I\\left(G_N ; Y\\right)\n$$\nNoise injection also facilitates a tractable variational upper bound for optimization (Eq. 16).\n\n[1]  Improving Subgraph Recognition with Variational Graph Information Bottleneck. CVPR. 2022\n\n----\nWe greatly appreciate your insightful and helpful comments, as they will undoubtedly help us improve the quality of our article. If our response has successfully addressed your concerns and clarified any ambiguities, we respectfully hope that you consider raising the score. Should you have any further questions or require additional clarification, we would be delighted to engage in further discussion. Once again, we sincerely appreciate your time and effort in reviewing our manuscript. Your feedback has been invaluable in improving our research."}, {"review_id": "64oyDPeUc5", "reviewer": "Reviewer_2y9i", "summary": "The authors propose a novel drug recommendation approach, SubRec, which is inspired by the common clinical practice of referring to a patient’s past diagnoses when prescribing new medications. SubRec models the relationship between patients and drugs by identifying drug substructures that are relevant to the individual patient. It then learns a discrete representation of these substructures to effectively recommend new drugs.", "questions": "-  Longitudinal patient records are often highly sparse and contain significant amounts of missing data. Have the authors accounted for this in their method? If not, could they clarify how their approach could be adapted to handle such practical challenges associated with missing data?\n\n- In Line 164, the authors omit a specific loss function that would capture the relevance between the prediction and the encoded representation. What is the rationale for this omission? Wouldn’t this potentially compromise the objective described in Equation 8?\n\n- The objectives described in Equations 8 and 9 are somewhat unclear. Equation 8 aims to minimize the negative conditional mutual information, whereas Equation 9 provides an upper bound in terms of log-likelihood for the same function. Does the objective ultimately require minimizing the conditional log-likelihood? If so, wouldn’t that have a negative impact? Please clarify if there is any misunderstanding on my part.\n\n - What is the motivation for using discrete embeddings in this context? It is unclear what specific problem discretizing the embedding space is intended to solve.\n\n-  Have the authors considered incorporating gene expression or mutation data in their framework for drug recommendation?", "limitations": "- The authors should clarify the specific design choices in the losses; please refer to the question section.\n\n- The absence of publicly available code makes it difficult to fully understand  the implementation.\n\n- It remains uncertain whether the proposed method would perform reliably in real-world clinical setting.", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 2, "significance": 3, "originality": 2, "strengths_and_weaknesses": "strength:\n\n- The paper is well-motivated and addresses the important challenge of providing explainable diagnoses using machine learning methods.\nDiagnosing many diseases often relies on understanding a patient's medical history and previously prescribed medications, and incorporating such data into drug recommendations seems like an interesting research direction.\n\n- The proposed method models drug substructures and their relationships with various patient-level information to support this process.\n\n- The authors also conduct a sensitivity analysis to examine how individual hyperparameters influence the model’s overall performance, which will be beneficial in replicating the results. \n\nweakness:\n-  While the authors address an interesting problem in explainable drug recommendation, the proposed approach offers limited novelty. The use of longitudinal patient history has been extensively studied, and discrete representations have also been explored in prior drug recommendation research [1]. The authors should more clearly articulate their specific methodological contributions and the overall impact of their approach.\n\n\n- The paper leverages past diagnoses, procedures, and medications to model patient-specific records and learn relevant drug substructures. While this information is indeed important, there is no clear evidence that the learned embeddings capture the critical information necessary for effective drug recommendation, as suggested in Figure 1. A more comprehensive explainability analysis is needed to demonstrate that the embeddings have learned meaningful representations aligned with the proposed hypothesis and have correctly identified relevant substructures in the graph.\n\n- The proposed method appears to be a combination of several existing techniques, relying on multiple assumptions. It remains unclear whether this approach would generalize effectively to real-world clinical settings.\n\n\n- I have reservations about the way the problem is addressed in the paper. Please refer to the questions section for specific concerns. \n\n[1] Wiser: Weak supervision and supervised representation learning to improve drug response prediction in cancer, ICML 2024.", "was_revised": true, "final_justification": "In light of the discussion, I believe the paper would benefit from further refinement, and hence I am leaning toward rejection. However, the new results did clear my major doubts.", "rebuttal": ">**W1&Q1:** The authors should more clearly articulate their specific methodological contributions and the overall impact of their approach.\n\nThanks for your valuable comment. Current drug recommendation methods fall into two categories: (i) those relying on historical patient information (e.g., COGNet) and (ii) those leveraging drug substructures (e.g., SafeDrug, MoleRec). The former suffers from the complexity and sparsity of longitudinal EHRs, leading to high computational costs and difficulty in capturing transferable patterns, with COGNet showing the highest memory usage. GameNet also uses historical data but relies on lookup-based matching with dynamic memory, which is beyond deep learning. To address these issues, **SubRec** uses a **vector quantization (VQ)** module to cluster heterogeneous patient–drug interactions into a compact codebook, reducing modeling instability and enabling efficient similarity matching.\n\n**Our approach is fundamentally different from WISER (ICML 2024). , which learns discrete embeddings for individual drugs and predicts via weighted combinations, our model learns patient–drug association vectors. These vectors are randomly initialized and refined during training (Eq. 18), converging to cluster centers of patient–drug interactions (Fig. 6)**. This design captures **interaction-level patterns** rather than drug-level embeddings, enabling more personalized and context-aware recommendations.\n\n|      | Memory (MB) | Para. (M) |\n| ----- | ---- | ------ |\n| GameNet   | 496  | 0.44  |\n| SafeDrug  | 1716   | 0.37 |\n| MoleRec   | 1422 | 0.51|\n| COGNet  | 3266  | 1.36 |\n| SubRec (codebook size = 32) | 1762 | 2.97|\n\nThe latter, represented by methods such as **SafeDrug** and **MoleRec**, uses rule-based decomposition (e.g., BRICS) to split molecules, which disrupts functional group connectivity and fails to capture the synergistic effects of multiple substructures. While clinicians rely on medical knowledge, **molecular structure remains a key determinant** of drug pharmacodynamics and mechanism of action [1,2]. Functional substructures (pharmacophores) drive therapeutic effects—for example, _simvastatin_ and _atorvastatin_ share an HMG-CoA reductase–inhibiting pharmacophore [3]—and also influence **adverse drug interactions** through shared or reactive motifs [4,5]. To address these factors, we incorporate an improved **CIB** to extract patient-specific core substructures, while the **VQ module** enforces a discrete latent space that preserves only task-relevant information. This design enables SubRec to balance **accuracy**, **robustness**, and **interpretability**, overcoming the limitations of prior approaches.\n\nIndeed, existing works in this field, especially **SafeDrug[1] and MoleRec [2], do not provide explicit demonstrations of the importance of drug substructures. Therefore, our original manuscript did not include such visualizations. In the revised version, following your advice, we have added drug substructure visualization results**, which clearly show that our method captures chemically coherent and clinically relevant motifs. **Due to policy restrictions, we are unable to include these figures in the rebuttal, and we kindly ask for your understanding**.\n\n[1] Why drugs fail—a study on side effects in new chemical entities. Nat. Rev. Drug Disc.  2005\n\n[2] Pharmacophore modeling in drug discovery. Nat. Rev. Drug Disc. 2016\n\n[3] Large-scale prediction and testing of drug activity on side-effect targets. Cell. 2012\n\n[4] Learning motif-based graphs for drug–drug interaction prediction via local–global self attention. Nat mach Intell. 2024\n\n[5] Emerging drug interaction prediction enabled by a flow-based graph neural network with biomedical network. Nat Comp Sci. 2023\n\n>**W2:** A more comprehensive explainability analysis to identified relevant substructures.\n\nThanks for your suggestions. However, existing works in this field, especially **SafeDrug[1] and MoleRec [2], do not provide explicit demonstrations of the importance of drug substructures. Therefore, our original manuscript did not include such visualizations. In the revised version, following your advice, we have added drug substructure visualization results**, which clearly show that our method captures chemically coherent and clinically relevant motifs. Due to policy restrictions, we are unable to include these figures in the rebuttal, and we kindly ask for your understanding.\n\n>**W2&L3:** Clarify the techniques contribution for drug structures nor the clinic patients.\n\nThank you for the thoughtful comment. We apologize for the misunderstanding—each module in our framework is carefully designed with domain-specific considerations for both molecular drug structures and clinical patient data.\n   \n- For drug substructure extraction, prior methods (e.g., BRICS) often break molecular connectivity, ignoring the contextual impact of patient conditions. In contrast, we propose a CIB framework that adaptively extracts substructures conditioned on patient-specific health profiles, taking comorbidities and personalized treatment patterns into account.\n    \n- Furthermore, motivated by the observation that similarity in current patient visits is often more informative than full-history similarity, we introduce a VQ module to store representative patient–drug interaction prototypes. This module acts as a compact, reusable memory that enhances recommendation in data-limited settings. The VQ also avoids the complexity and instability of high-dimensional variational modeling, making the framework lighter and more stable during training [1,2]. In addition, the discrete latent structure naturally aligns with the CIB principle by encouraging representations that retain only task-relevant information [3].\n    \nOverall, we present an advanced drug recommendation framework that achieves precise substructure-level reasoning under the guidance of well-designed CIB theory. The VQ module further condenses patient visit information into discrete, informative representations that support accurate and efficient recommendation. We carefully balance the contributions of each component to ensure high predictive performance while maintaining a low DDI rate.\n\nSafe and accurate drug recommendation is an emerging and high-impact research direction with the potential to revolutionize pharmaceutical decision-making. Our work not only focuses on algorithmic optimization but also demonstrates how advanced machine learning techniques can drive real progress in healthcare and inspire future research in this critical domain.\n\n**In addition, in the revised version, we have also added test results in real scenarios and interpretable analysis of special pathological groups. Due to the limited characters, we hope to discuss and communicate with you in the next rebuttal process. Hope you can understand.**\n\n[1] Mole-BERT.ICLR, 2023. [2] Learning Invariant Molecular Representation in Latent Discrete Space. NIPS, 2024. [3] MAPE-PPI. ICLR, 2024.\n\n>**W3&Q3:**  What is the underlying relationship between the CIB-derived subgraphs and the VQ module?\n\nThanks for your insightful question!  specifically: 1) VQ enables end-to-end learning of discrete prototypes, which serve as interpretable and stable anchors for patient subtypes. 2) The quantization process avoids the complexity and instability of modeling variational distributions in high-dimensional latent spaces, making the model lighter and more stable during training[1,2]. 3) The discrete structure of the latent space naturally supports the CIB principle by enforcing a compact representation that preserves only the most task-relevant information for drug prediction[3]. \n\n>**Q1:** How to handle the missing data?\n\nThank you for your kind reminder. In the data preprocessing stage, we follow the same strategy as SafeDrug, MoleRec. For missing data (e.g., NDC codes), we apply forward filling to propagate the last valid entry and remove rows with critical missing values to ensure data completeness. We will clarify this processing step explicitly in the revised version.\n\n>**Q2&L1:** The authors omit a specific loss function in Line 164?\n\nThe omission of the term $I\\left(\\mathbf{Y};\\mathbf{e}^{(i)}\\right)$ is a **common practice** in related work. Empirically, explicitly optimizing this term often leads to instability and performance degradation. So, some advanced work would omit it in the formulation[1,2].\n\n[1] Conditional Graph Information Bottleneck for Molecular Relational Learning. ICML,2023\n\n[2] Iterative substructure extraction for molecular relational learning with interactive graph information bottleneck. ICLR, 2025\n\n>**Q3:** The objectives described in Equations 8 and 9 are somewhat unclear.\n\nWe have prepared relevant proof, but the characters are limited. We hope to communicate with you further and present it to you.\n\n>**Q4:** What is the motivation for using discrete embeddings in this context?\n\nPlease refer to the responses of **W1 and W3**.\n\n>**Q5:**  Have the authors considered incorporating gene expression or mutation data in their framework for drug recommendation?\n\nThank you for this valuable suggestion. We agree that integrating gene expression or mutation data could provide a richer biological context for drug recommendation, as these factors play critical roles in drug response and personalized treatment. However, our current work focuses on modeling EHR data and drug molecular structures, as publicly available datasets combining comprehensive clinical records with matched genomic profiles are still limited and **this is not within the scope of our research**.\n\n>**L2:**  The absence of publicly available code.\n\nThe link is at the end of the abstract.\n\n----\n\nDue to the characters are limited, and we look forward to presenting it to you in the next rebuttal process. If our response has successfully addressed your concerns and clarified any ambiguities, we respectfully hope that you consider raising the score."}]

Author rebuttal:

Meta-review: This paper presents and evaluates a deep learning approach to provide patient treatment recommendations based on all of patient EHR data (history as well as properties of current visit symptoms, diagnoses, prescriptions, labs, vitals, etc.), molecular structures of drug treatments being considered, and potential drug combinations and drug-drug interactions.  The reviewers and authors had a robust discussion, the clarifications and recommendations of which should be incorporated into the paper to make it stronger, including new results that the authors mentioned that were obtained during the discussion phase.  Reviewers became more positive during the discussion, but frankly the paper is still very much on the borderline.  On the negative side, we are still a long way from clinicians using AI recommendations to decide on treatment combinations for patients (especially from deep neural networks given the lack of transparency), it is unclear how successful use of detailed molecular structures will be at this level (in contrast to the drug design or individual adverse event discovery phases), I'm not sure I agree that drug activity is the result of many different substructures (I think of "substructure" as including a 3D arrangement of components such as hydrophobic groups, hydrogen acceptors/donors, etc.; maybe if we include multiple "activities" including ADEs, side effects, unintended positive effects, etc then the claim is true), and the methods here are not especially innovative.  Nevertheless, on the positive side, we should indeed be working toward a foundation model for all of health, so we do indeed need methods now incorporating EHRs, molecular structures (and even protein structures, microbiome, etc.), and this paper is a step in that direction.  Also on the positive side, we do indeed desperately need to consider effects of combinations of multiple drugs rather than single drug effects.  And the "reverse" approach of predicting structure from the EHR data, rather than vice-versa, is a nice innovative approach motivated by the information bottleneck argument.  The deep learning architecture is sound, as is the evaluation methodology.
Decision: Accept (poster)