RxDiff: Discrete Diffusion for Medication Recommendation with Inference-Time Safety Control
Jinke Feng, Wenjie Du, Xuchang Zhong, Yang Wang
NeurIPS 2026
TL;DR. RxDiff uses discrete diffusion to generate medication prescriptions, enabling holistic drug combination modeling and tunable DDI safety control at inference time.
Abstract. Medication recommendation requires generating drug combinations that are therapeutically effective while minimizing harmful drug-drug interactions (DDIs). Both objectives are rooted in the combinatorial nature of prescriptions. Existing discriminative methods predict drugs independently, neglecting inter-drug dependencies; autoregressive methods introduce sequential dependencies but impose arbitrary generation orders and accumulate errors. Both paradigms confine DDI mitigation to training-time penalties, offering limited capacity to regulate interactions during inference for individual prescriptions. We reformulate medication recommendation as a discrete diffusion process and propose RxDiff, which leverages iterative denoising for bidirectional and revisable generation and provides a natural interface for dynamic DDI regulation at each step. A clinically grounded dual-guided forward process and an inference-time interaction-aware modulation mechanism are designed to jointly enable RxDiff to achieve consistent accuracy improvements, lower and more individually controlled DDI rates, and robustness to evolving DDI knowledge across MIMIC-III, MIMIC-IV, and a real-world inpatient dataset. Code is available at https://github.com/f1sher0/RxDiff.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:47 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
(a) Summary of scientific claims and findings
RxDiff reformulates medication recommendation as a discrete diffusion problem. The key claim is that discriminative methods miss drug-pair dependencies and autoregressive methods impose arbitrary orderings. Discrete diffusion sidesteps both by treating the prescription as a set refined iteratively. The two domain-specific contributions are: (1) a dual-guided forward process (Section 4.3.1, Eq. 4) that biases corruption toward high-DDI, high-frequency drug combinations using a semi-absorbing transition structure with closed-form marginals, and (2) an inference-time interaction-aware modulation (Section 4.4, Eq. 13) that applies a per-step logit penalty proportional to DDI conflicts against the current predicted prescription, requiring no retraining. Evaluated on MIMIC-III, MIMIC-IV, and a real-world Chinese inpatient dataset against nine baselines (LR, LEAP, GAMENet, SafeDrug, 4SDrug, COGNet, MoleRec, REFINE, SubRec), RxDiff reports the best Jaccard/F1/PRAUC and the lowest DDI rate on all three datasets, on MIMIC-III, DDI drops from 5.98% (SubRec) to 4.19% (RxDiff). Gyfu and ydru rate novelty and experimental scope positively, 8tqt raises substantive concerns about circularity in the safety evaluation and missing stochastic-sampling transparency.
(b) Main strengths
- Applying discrete diffusion to medication recommendation is, to the reviewers' collective knowledge, genuinely novel. The combinatorial prescription structure maps cleanly onto iterative set-level denoising (ydru, 8tqt, Gyfu).
- Decoupling safety regulation from the trained prior via inference-time modulation (Eq. 13) is the most practically significant idea: it gives per-prescription DDI control and adapts to an evolving DDI knowledge base without retraining (8tqt).
- The empirical study covers three clinically distinct datasets, nine baselines, safety component ablations (Figure 3a), Pareto analysis (Figure 3b), individual-level DDI distributions (Figure 3c), and robustness under reduced DDI coverage (Figure 3d) (ydru, Gyfu).
- The semi-absorbing constraint enables closed-form cumulative marginals despite context-dependent transition kernels. Appendix A proofs are clearly structured (8tqt).
(c) Main weaknesses
- Circular safety evaluation: Eq. 13 suppresses drugs using matrix A. The DDI-rate metric is computed from the same A. No baseline is augmented with an equivalent inference-time logit penalty. Without that control, applying the same Eq. 13 penalty to SubRec or REFINE's output logits, the DDI gap cannot be attributed to the diffusion framework rather than to a method-agnostic inference-time filter (8tqt, primary concern).
- Unfair robustness experiment (Section 5.3): baselines are trained and evaluated with 80% of DDI rules, while RxDiff's inference-time modulation queries the full DDI rule set. RxDiff has strictly more information at inference. The "robustness to distribution shift" framing is not supported by this design (ydru).
- Prescription serialization contradicts stated motivation: Section 1 argues diffusion avoids the arbitrary ordering of autoregressive methods, but Section 4.1 sorts drugs by vocabulary index to form a positional sequence. The distinction is not explained (ydru).
- Notation inconsistency: in Section 4.3.1, r is written r(m | x_i^0, {x_j^0}{j≠i}) in Eq. (4) but r(m | {x_j^0}{j≠i}) in Eq. (5), x_i^0 appears and disappears without explanation (ydru).
- Stochastic evaluation not disclosed: the paper does not state whether test predictions use a single reverse trajectory or an ensemble, and does not distinguish seed variance from sampling variance in the reported standard deviations (8tqt).
(d) Weaknesses addressable in the author response
Must address:
-
Circular safety evaluation (8tqt): Report results for SubRec and REFINE augmented with the same inference-time DDI logit penalty as Eq. 13, showing Jaccard, F1, and DDI rate. If RxDiff retains its DDI advantage under this controlled comparison, the safety claim stands. If the gap closes, the headline result needs reframing.
-
Robustness experiment (ydru): Either rerun Section 5.3 with all methods restricted to the same 80% DDI rule set at inference, or explicitly acknowledge the information asymmetry and reframe the result as a demonstration of modularity rather than robustness.
-
Stochastic evaluation protocol (8tqt): State whether each test prediction uses a single reverse trajectory or an ensemble, and report variance attributable to sampling stochasticity separately from seed variance.
Address in revision, not required for rebuttal:
- Serialization motivation: explain precisely why sorting by vocabulary index is not the same inductive bias as autoregressive position ordering.
- Notation fix: reconcile the argument signature of r between Eq. (4) and Eq. (5).
- Design-choice motivation for Eq. (8) (MLP on sinusoidal embedding only), stopgrad in the length loss, and clean vs. noised context conditioning (ydru).
Final justification
The initial meta-review identified three critical weaknesses that required resolution in the author response:
-
Circular safety evaluation (8tqt): The primary concern was that RxDiff’s DDI improvement could be attributed to a method-agnostic inference-time filter rather than the diffusion framework itself. Authors were required to provide controlled comparisons showing baselines (SubRec, REFINE) augmented with the same inference-time DDI logit penalty as Eq. 13.
-
Unfair robustness experiment (ydru): The Section 5.3 robustness experiment gave RxDiff access to the full DDI rule set at inference while baselines were restricted to 80%, creating an information asymmetry that invalidated the "robustness to distribution shift" claim.
-
Stochastic evaluation protocol (8tqt): The paper did not disclose whether test predictions used single or ensemble trajectories, nor did it separate seed variance from sampling variance.
The authors submitted a detailed rebuttal addressing all three critical concerns. Most significantly:
-
Reviewer 8tqt (who raised the circular safety evaluation concern) explicitly stated: "I thank the authors for their detailed rebuttal and additional experiments. Overall, my questions have been fully addressed. I am therefore increasing my rating to accept." This indicates the authors provided the controlled comparison and it demonstrated that RxDiff’s safety advantage persists even when baselines use the same inference-time penalty mechanism.
-
Reviewer Gyfu acknowledged the improvements, noting "it’s nice to see that a modest improvement can be made by incorporating historical medication records" and maintained their borderline accept score.
-
Reviewer ydru did not provide post-rebuttal commentary, though the authors indicate they addressed the robustness experiment concerns in their response.
Given the resolution of the critical concerns and a consensus towards acceptance, I'd like to recommend for acceptance.
Caveats and conditions:
- The camera-ready version must include the controlled safety comparison (baselines + inference-time penalty) that convinced reviewer 8tqt. This should be clearly presented in the main text or appendix.
Read meta-review
Meta-review
(a) Summary of scientific claims and findings
RxDiff reformulates medication recommendation as a discrete diffusion problem. The key claim is that discriminative methods miss drug-pair dependencies and autoregressive methods impose arbitrary orderings. Discrete diffusion sidesteps both by treating the prescription as a set refined iteratively. The two domain-specific contributions are: (1) a dual-guided forward process (Section 4.3.1, Eq. 4) that biases corruption toward high-DDI, high-frequency drug combinations using a semi-absorbing transition structure with closed-form marginals, and (2) an inference-time interaction-aware modulation (Section 4.4, Eq. 13) that applies a per-step logit penalty proportional to DDI conflicts against the current predicted prescription, requiring no retraining. Evaluated on MIMIC-III, MIMIC-IV, and a real-world Chinese inpatient dataset against nine baselines (LR, LEAP, GAMENet, SafeDrug, 4SDrug, COGNet, MoleRec, REFINE, SubRec), RxDiff reports the best Jaccard/F1/PRAUC and the lowest DDI rate on all three datasets, on MIMIC-III, DDI drops from 5.98% (SubRec) to 4.19% (RxDiff). Gyfu and ydru rate novelty and experimental scope positively, 8tqt raises substantive concerns about circularity in the safety evaluation and missing stochastic-sampling transparency.
(b) Main strengths
- Applying discrete diffusion to medication recommendation is, to the reviewers' collective knowledge, genuinely novel. The combinatorial prescription structure maps cleanly onto iterative set-level denoising (ydru, 8tqt, Gyfu).
- Decoupling safety regulation from the trained prior via inference-time modulation (Eq. 13) is the most practically significant idea: it gives per-prescription DDI control and adapts to an evolving DDI knowledge base without retraining (8tqt).
- The empirical study covers three clinically distinct datasets, nine baselines, safety component ablations (Figure 3a), Pareto analysis (Figure 3b), individual-level DDI distributions (Figure 3c), and robustness under reduced DDI coverage (Figure 3d) (ydru, Gyfu).
- The semi-absorbing constraint enables closed-form cumulative marginals despite context-dependent transition kernels. Appendix A proofs are clearly structured (8tqt).
(c) Main weaknesses
- Circular safety evaluation: Eq. 13 suppresses drugs using matrix A. The DDI-rate metric is computed from the same A. No baseline is augmented with an equivalent inference-time logit penalty. Without that control, applying the same Eq. 13 penalty to SubRec or REFINE's output logits, the DDI gap cannot be attributed to the diffusion framework rather than to a method-agnostic inference-time filter (8tqt, primary concern).
- Unfair robustness experiment (Section 5.3): baselines are trained and evaluated with 80% of DDI rules, while RxDiff's inference-time modulation queries the full DDI rule set. RxDiff has strictly more information at inference. The "robustness to distribution shift" framing is not supported by this design (ydru).
- Prescription serialization contradicts stated motivation: Section 1 argues diffusion avoids the arbitrary ordering of autoregressive methods, but Section 4.1 sorts drugs by vocabulary index to form a positional sequence. The distinction is not explained (ydru).
- Notation inconsistency: in Section 4.3.1, r is written r(m | x_i^0, {x_j^0}{j≠i}) in Eq. (4) but r(m | {x_j^0}{j≠i}) in Eq. (5), x_i^0 appears and disappears without explanation (ydru).
- Stochastic evaluation not disclosed: the paper does not state whether test predictions use a single reverse trajectory or an ensemble, and does not distinguish seed variance from sampling variance in the reported standard deviations (8tqt).
(d) Weaknesses addressable in the author response
Must address:
-
Circular safety evaluation (8tqt): Report results for SubRec and REFINE augmented with the same inference-time DDI logit penalty as Eq. 13, showing Jaccard, F1, and DDI rate. If RxDiff retains its DDI advantage under this controlled comparison, the safety claim stands. If the gap closes, the headline result needs reframing.
-
Robustness experiment (ydru): Either rerun Section 5.3 with all methods restricted to the same 80% DDI rule set at inference, or explicitly acknowledge the information asymmetry and reframe the result as a demonstration of modularity rather than robustness.
-
Stochastic evaluation protocol (8tqt): State whether each test prediction uses a single reverse trajectory or an ensemble, and report variance attributable to sampling stochasticity separately from seed variance.
Address in revision, not required for rebuttal:
- Serialization motivation: explain precisely why sorting by vocabulary index is not the same inductive bias as autoregressive position ordering.
- Notation fix: reconcile the argument signature of r between Eq. (4) and Eq. (5).
- Design-choice motivation for Eq. (8) (MLP on sinusoidal embedding only), stopgrad in the length loss, and clean vs. noised context conditioning (ydru).
Final justification
The initial meta-review identified three critical weaknesses that required resolution in the author response:
-
Circular safety evaluation (8tqt): The primary concern was that RxDiff’s DDI improvement could be attributed to a method-agnostic inference-time filter rather than the diffusion framework itself. Authors were required to provide controlled comparisons showing baselines (SubRec, REFINE) augmented with the same inference-time DDI logit penalty as Eq. 13.
-
Unfair robustness experiment (ydru): The Section 5.3 robustness experiment gave RxDiff access to the full DDI rule set at inference while baselines were restricted to 80%, creating an information asymmetry that invalidated the "robustness to distribution shift" claim.
-
Stochastic evaluation protocol (8tqt): The paper did not disclose whether test predictions used single or ensemble trajectories, nor did it separate seed variance from sampling variance.
The authors submitted a detailed rebuttal addressing all three critical concerns. Most significantly:
-
Reviewer 8tqt (who raised the circular safety evaluation concern) explicitly stated: "I thank the authors for their detailed rebuttal and additional experiments. Overall, my questions have been fully addressed. I am therefore increasing my rating to accept." This indicates the authors provided the controlled comparison and it demonstrated that RxDiff’s safety advantage persists even when baselines use the same inference-time penalty mechanism.
-
Reviewer Gyfu acknowledged the improvements, noting "it’s nice to see that a modest improvement can be made by incorporating historical medication records" and maintained their borderline accept score.
-
Reviewer ydru did not provide post-rebuttal commentary, though the authors indicate they addressed the robustness experiment concerns in their response.
Given the resolution of the critical concerns and a consensus towards acceptance, I'd like to recommend for acceptance.
Caveats and conditions:
- The camera-ready version must include the controlled safety comparison (baselines + inference-time penalty) that convinced reviewer 8tqt. This should be clearly presented in the main text or appendix.
1 comment
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors study the problem of medication recommendation, which is challenging because it requires modeling the combinatorial space of drug combinations while accounting for adverse drug–drug interactions (DDIs). To address this challenge, they propose RxDiff, a discrete diffusion-based recommendation framework that captures the full dependencies among all recommended medications. In contrast, existing approaches either ignore these dependencies or model them autoregressively. In addition, the authors introduce both training- and inference-time strategies to explicitly encourage recommendations with fewer DDIs, enabling medication recommendations that are not only accurate but also safer for patients.
Strengths and weaknesses
Strengths
- The idea of modeling medication recommendation is novel and well-motivated for the task.
- High quality experiments are conducted to support the utility of the proposed method, including ablation studies that highlight the benefits of the proposed modules.
- The problem of data-driven medication recommendation is significant and has many potential positive real-world impacts.
Weaknesses
-
Overall, the clarity of the proposed methods can be improved in the paper, especially by intuitively motivating the design choices:
- Why is the prescription serialization needed when the introduction has motivated that diffusion does not introduce any arbitrary order-based inductive bias compared to the AR approach? This seems to defeat the purpose of using diffusion models.
- In section 4.3.1, the use of the function is inconsistent; equation (4) depends on while equation (5) does not.
- What's the motivation for using clean context to condition the substitution distribution instead of noised contex from the previous step like standard diffusion models?
- In equation (8), what's the motivation for only applying MLP for sinusoidal embedding but not the positional embedding?
- For the length loss, what's the motivation for applying stopgrad while the diffusion loss does not?
-
The robustness to distribution shift argument is unconvincing. In section 5.3, the authors showed that when all methods are trained with 80% DDI rules but evaluated against 100% DDI rules, RxDiff shows the smallest performance drop compared to the baselines. I think this is an unfair comparison because only RxDiff has access to the full DDI rules during inference; it's natural that it will produce fewer recommendations with DDIs, since it's given additional information, whereas baseline methods are not.
-
Presentation on some of the results is unclear: in Table 1, what is the statistical significance compared against? And what do the error bars in the parentheses represent?
-
Nitpicks:
- Line 133 inconsistently used {PAD} instead of [PAD].
Questions
What is the prevalence of DDIs in the training dataset? To what extent is the DDI challenge driven by the presence of DDIs in the observed prescriptions used for training? If the majority of observed prescriptions are already free of DDIs, why is explicit DDI reduction necessary? If the observed medication regimens contain few or no DDIs, would one expect most recommendation methods to achieve similarly low DDI rates? Could the authors provide additional analysis to clarify whether the reported DDI improvements arise from better modeling or simply reflect characteristics of the underlying dataset?
Have the authors considered a simpler baseline that removes or down-weights training examples containing high-DDI medication combinations? Such a baseline could help determine whether the proposed method provides benefits beyond what can be achieved through straightforward data curation. Relatedly, how would recommendation accuracy and DDI rates change if high-DDI samples were filtered out or assigned lower training weights? Comparing against such a baseline would help quantify the value of the proposed DDI-aware training and inference procedures.
Limitations
Yes
Formatting concerns
N/A
2 comments
Rebuttal
We thank the reviewer for the valuable comment. We clarify each concern below.
W1.Why serialization is needed
We thank the reviewer for raising this important point. We clarify that the serialization in RxDiff is only a representation strategy required for applying discrete diffusion over medication tokens with fixed positions, rather than an autoregressive generation constraint. RxDiff does not generate medications sequentially; during both corruption and reverse denoising, all medication positions are simultaneously updated through the diffusion process. Therefore, the model does not introduce an order-dependent inductive bias during generation.
W2.Notation inconsistency
We thank the reviewer for pointing out this notation inconsistency. The function in Eq. (5) should also be conditioned on the original medication , consistent with Eq. (4). This is a notation typo, and we will correct it in the revised manuscript.
W3.Why use clean context for forward corruption
We thank the reviewer for raising this important question. We clarify that the use of clean context is not a general requirement of diffusion models, but a design choice arising from our DDI-guided context-dependent substitution and semi-absorbing forward process.
Specifically, the substitution distribution is defined based on the clean prescription context to inject clinically meaningful DDI noise. Since the clean context is fully observed during training, the forward transitions remain conditionally independent across positions given . As discussed in Section 4.3.1 and formally proved in Appendix A, this property enables the semi-absorbing constraint and the derivation of an analytic cumulative marginal for efficient diffusion training.
If the substitution distribution is instead conditioned on the noisy context from the previous step, the transition kernel would become history-dependent, requiring recursive simulation of intermediate noisy states and preventing the efficient closed-form marginal used in our training procedure.
W4.Design Choice of Timestep Embedding Projection
The different treatments of sinusoidal embedding and positional embedding are due to their different roles in RxDiff. The sinusoidal embedding encodes the diffusion timestep, which serves as a continuous condition indicating the current corruption level. Therefore, we apply an MLP to transform it into a task-specific representation compatible with the denoising network. In contrast, the positional embedding only provides token position information for the Transformer encoder and does not represent a semantic conditioning variable. Therefore, it is directly added without additional transformation.
W5.Motivation for Stop-gradient in Length Loss
The motivation for applying stop-gradient only in length prediction is to decouple the auxiliary length prediction task from patient representation learning. Since patient contextual representation should primarily serve the diffusion backbone to preserve clinically meaningful information for medication generation, stop-gradient prevents the coarse-grained prescription length signal from dominating , while allowing the length predictor to learn from the existing clinical representation.
W6.Clarification of DDI Knowledge Coverage and Distribution Shift Evaluation
We thank the reviewer for pointing out this potential ambiguity. We agree that the original presentation may not clearly distinguish two effects: robustness to different DDI distributions during training and adaptability to updated DDI knowledge.
Section 5.3(d) was designed to evaluate the latter. Specifically, by limiting the DDI knowledge coverage during training while using updated DDI knowledge during inference, we evaluate whether a model can adapt to evolving safety knowledge, which reflects the realistic scenario that DDI knowledge is continuously updated. This setting also highlights the motivation of RxDiff’s inference-time safety control: DDI knowledge can be treated as an external and updatable module that is incorporated through interaction-aware modulation during inference without retraining, while existing baselines generally lack such modularity.
To further evaluate robustness to different DDI distributions during training, we additionally compare all methods under the same inference-time DDI knowledge coverage (80% DDI rules). The results are shown below:
| Model | 100% train / 100% infer | 80% train / 80% infer |
|---|---|---|
| LEAP | 6.72 | 6.48 |
| 4SDrug | 6.05 | 5.86 |
| REFINE | 5.88 | 5.71 |
| RxDiff | 4.19 | 4.08 |
The results demonstrate that RxDiff maintains superior safety performance under different DDI knowledge distributions, suggesting that its advantage is not solely due to access to updated inference-time DDI knowledge.
To avoid ambiguity, we will revise Section 5.3(d) by renaming it as adaptability to updated DDI knowledge and add the above experiment as a separate evaluation of robustness to different DDI distributions.
W7.Clarification of Statistical Significance and Reported Variance
We thank the reviewer for pointing out this ambiguity. We clarify that the statistical significance in Table 1 is computed by comparing RxDiff with the best-performing baseline under paired t-test on the test set. The values in parentheses represent the standard deviations over five independently trained models with different random seeds. We will revise the table caption to explicitly state the comparison baseline and the source of the reported standard deviations.
Q1.DDI Prevalence and Source of Safety Improvement
We thank the reviewer for raising this important question. We first clarify the prevalence of DDIs in the observed prescriptions.
| Dataset | Avg. DDI rate (%) | Prescriptions with DDI (%) | Prescriptions with DDI rate > 10% (%) |
|---|---|---|---|
| MIMIC-III | 6.52 | 90.24 | 15.41 |
| MIMIC-IV | 6.22 | 73.07 | 18.04 |
These statistics show that most observed prescriptions are not DDI-free. On the contrary, DDIs occur in the majority of prescriptions, and a non-negligible proportion exhibit relatively high interaction risk, confirming the necessity of explicitly modeling prescription safety.
More importantly, the DDI challenge does not arise only from interactions already present in the training data. Medication recommendation is a combinatorial prediction problem, and practical models inevitably make prediction errors rather than perfectly reproducing the ground-truth prescription. These errors may introduce additional drug combinations—and consequently new DDI conflicts—that are absent from the observed prescriptions. Therefore, DDI-aware modeling is also needed to reduce newly introduced conflicts during prescription generation.
To further investigate whether the DDI improvement mainly comes from better modeling, we perform an additional analysis by removing high-risk prescriptions from MIMIC-III. Specifically, we exclude visits whose ground-truth prescription DDI rate is higher than 10%, then re-split the remaining data into training, validation, and test sets, followed by retraining and reevaluating all models under the same setting. The ground-truth DDI rate for this data subset is 4.97%.
| Method | Jaccard↑ | F1↑ | DDI↓ |
|---|---|---|---|
| LEAP | 46.85 | 62.90 | 5.12 |
| 4SDrug | 47.42 | 63.51 | 4.56 |
| REFINE | 47.96 | 64.02 | 3.92 |
| SubRec | 48.13 | 64.35 | 4.11 |
| RxDiff | 48.94 | 65.10 | 2.75 |
After removing high-DDI prescriptions, the ground-truth distribution itself becomes safer, leading to reduced DDI rates for all methods. RxDiff consistently produces prescriptions with lower DDI rates, demonstrating that its safety improvement comes from better interaction-aware modeling rather than simply inheriting dataset statistics.
Q2.Comparison with High-DDI Data Curation Strategies
To evaluate whether RxDiff’s safety improvement can be attributed to simply removing or reducing the influence of high-DDI prescriptions during training, we construct two data curation baselines on the original MIMIC-III training set. Specifically, we first calculate the DDI risk of each training prescription and identify the top 20% high-DDI visits. For the filtering baseline, these high-DDI visits are removed from the training set, and the model is retrained on the remaining data. For the reweighting baseline, all training visits are retained, but the loss contributions of high-DDI visits are down-weighted by a factor of 0.5. All models are evaluated on the original test set without any modification to preserve the original evaluation distribution.
| Method | Strategy | Jaccard↑ | F1↑ | DDI↓ |
|---|---|---|---|---|
| REFINE | Original | 47.42 | 61.68 | 5.88 |
| REFINE | Filter | 45.96 | 59.92 | 5.34 |
| REFINE | Reweight | 46.71 | 60.87 | 5.63 |
| SubRec | Original | 47.64 | 61.84 | 6.70 |
| SubRec | Filter | 46.18 | 60.31 | 6.08 |
| SubRec | Reweight | 47.02 | 61.17 | 6.42 |
| RxDiff | Original | 48.52 | 62.68 | 4.29 |
| RxDiff | Filter | 47.02 | 60.98 | 3.92 |
| RxDiff | Reweight | 47.86 | 62.05 | 4.11 |
The results show that removing or down-weighting high-DDI prescriptions can slightly reduce the DDI rate by biasing the model toward safer medication patterns. However, this comes at the cost of losing valuable supervision from clinically complex prescriptions, leading to clear degraded recommendation accuracy. Moreover, when facing complex cases in the original test distribution, models trained with reduced exposure to high-DDI regimens have limited ability to balance therapeutic relevance and safety, limiting the effectiveness of such simple data curation strategies. RxDiff maintains a substantially better accuracy–safety trade-off compared, indicating that its advantage comes from explicitly modeling medication interactions rather than simply avoiding high-DDI training examples.
We hope this response clarifies the reviewer’s concern. We are happy to provide additional experiments or analysis if further clarification is needed.
Dear Reviewer ydru,
Thank you again for your time and thoughtful review. We have provided detailed point-by-point responses and additional analyses addressing your comments. As the discussion phase approaches its deadline, we would greatly appreciate any feedback you may have on our rebuttal. If you have any further questions or concerns, we would be happy to provide additional clarification.
Thank you again for your time and consideration.
Best regards,
Authors
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper reformulates medication recommendation as a discrete diffusion problem. The motivation is that prescriptions are combinatorial: a drug's value depends on how it combines with others, and harmful interactions are a property of drug pairs rather than single drugs. The authors argue that prior discriminative methods predict each drug independently and miss these dependencies, autoregressive methods impose an arbitrary ordering and accumulate errors, and both handle interaction safety only through training-time penalties that cannot regulate any individual prescription. The proposed RxDiff method instead generates a prescription by starting from noise and iteratively refining the whole set, which lets every drug be predicted with awareness of all the others and lets earlier choices be revised. Across two public ICU datasets and one private hospital dataset, RxDiff reports the best accuracy and the lowest interaction rates among nine baselines, supported by theoretical analysis and a range of ablations and case studies.
Strengths and weaknesses
Quality. The technical development is good. The semi-absorbing constraint is an interesting trick, the proofs in Appendix A are clearly structured, and the empirical study is extensive. My central concern is the circularity of the safety evaluation combined with a missing fair baseline. The inference-time modulation directly queries the DDI matrix A to suppress pairs in A, and the DDI-rate metric is computed from the same A. The natural control is to take the strongest discriminative methods' output probabilities (SubRec, REFINE) and apply the identical logit penalty / DDI-aware greedy decoding at inference. Without that comparison, it's impossible to tell how much of the large DDI gap comes from the diffusion framework versus from a method-agnostic inference-time filter that any model could include.
Clarity. The writing is strong and the motivation is well-stated.
Significance. Medication recommendation is a specialized but real application area, and the most significant idea, which is decoupling safety regulation from the trained prior and exercising it per-prescription at inference, is well-argued. However, the significance is bounded by the circularity concern above, which leaves the central safety claim under-substantiated under fair comparison. Also, diffusion sampling is stochastic, but the paper never states whether evaluation uses a single reverse trajectory or an average/vote over several, nor whether the reported standard deviations are over seeds or over sampling runs. These omissions matter for interpreting the significance claims.
Originality. The core reformulation is, to my knowledge, genuinely novel: discrete diffusion has been applied to text, molecules, graphs, and proteins, but not to medication recommendation, and the combinatorial framing is a clean fit for an iterative-denoising. The two domain-specific designs (encoding drug frequency and DDI structure into the forward corruption, and a per-step inference-time DDI penalty) are the original ingredients.
Questions
- Consider applying the same logit penalty / DDI-aware greedy decoding to SubRec and REFINE's outputs and report Jaccard/F1/DDI. This isolates the diffusion framework's contribution from the method-agnostic effect of inference-time filtering. If RxDiff retains its DDI advantage at matched accuracy, I will raise my score; if the gap largely closes, the headline safety claim is undermined.
- Is each test prescription generated from a single reverse trajectory or aggregated over several? Are the reported std devs over seeds or over sampling runs, and how sensitive are Jaccard/DDI to sampling stochasticity? Please report variance attributable to sampling specifically.
- Provide a tighter argument (theoretical or via a targeted experiment) for why corrupting the forward process toward high-DDI states teaches the reverse process to avoid them, given that ground-truth prescriptions themselves contain DDIs.
Limitations
Yes
Final justification
The new comparisons with inference-time DDI penalties for REFINE and SubRec, along with DDI-aware decoding for COGNet, directly address my main concern about attribution and circularity. The reported safety–accuracy trade-offs support the claim that RxDiff's advantage is not simply due to applying a generic post-hoc DDI filter.
The clarification that evaluation uses a single reverse trajectory, together with the separate analysis of training-seed and sampling variance, also resolves my concern about stochastic evaluation. Finally, the hard-negative interpretation and the targeted experiment with inference-time modulation disabled provide a satisfactory explanation for the role of DDI-guided corruption.
Overall, the authors have addressed my main questions and weaknesses. I am therefore moving my rating from borderline accept to accept.
Formatting concerns
None
3 comments
Rebuttal
We thank the Reviewer 8tqt for the careful reading and constructive comments. We address each concern below.
W1/Q1. Circularity in safety evaluation and the absence of baselines with comparable inference-time DDI control.
We thank the reviewer for identifying this important attribution issue. We first clarify that using the evaluation DDI matrix as a source of safety knowledge is common in existing medication-recommendation research. For example, SafeDrug, MoleRec, and SubRec explicitly incorporate the same DDI knowledge for training-time regularization.
Nevertheless, we fully agree that, because RxDiff additionally accesses this knowledge during inference, a fair assessment of its inference-time safety advantage requires baselines equipped with comparable inference-time DDI control. Therefore, following the reviewer’s suggestion, we augment the strongest discriminative baselines, SubRec and REFINE, with the DDI-based logit penalty. Specifically, given their original output logit of candidate medication , we first obtain the predicted probability for every other medication and compute its expected interaction risk as
The adjusted logit is then
where controls the strength of this regulation. We additionally equip the autoregressive baseline COGNet with DDI-aware greedy decoding. At generation step , the logit of candidate medication is adjusted according to its interactions with the previously generated medication set :
The results are reported below. Since the logit penalties are defined differently across paradigms, the numerical scales of are method-specific and should not be compared directly across methods.
| Model | Jaccard↑ | F1↑ | DDI↓ | #Meds | |
|---|---|---|---|---|---|
| REFINE | 0.0 | 47.42 | 61.68 | 5.88 | 20.24 |
| REFINE + penalty | 0.4 | 46.53 | 60.62 | 5.09 | 18.22 |
| REFINE + penalty | 0.8 | 44.18 | 57.93 | 4.34 | 16.31 |
| SubRec | 0.0 | 47.64 | 61.84 | 6.70 | 20.34 |
| SubRec + penalty | 0.5 | 46.21 | 60.15 | 5.21 | 18.39 |
| SubRec + penalty | 1.0 | 43.76 | 57.38 | 4.30 | 15.84 |
| COGNet | 0.0 | 46.95 | 60.91 | 6.38 | 20.08 |
| COGNet + DDI-aware decoding | 0.5 | 46.12 | 59.92 | 5.61 | 19.12 |
| COGNet + DDI-aware decoding | 2.0 | 44.91 | 58.51 | 4.43 | 17.76 |
| RxDiff | 0.2 | 48.52 | 62.68 | 4.29 | 19.74 |
| RxDiff | 0.6 | 47.66 | 61.81 | 3.27 | 18.95 |
The results show that adding inference-time DDI control can reduce the DDI rates of the baselines to some extent, but at the cost of a substantially less favorable safety-accuracy tradeoff. At a matched DDI level of approximately 4.3%. , the Jaccard scores of REFINE, SubRec, and COGNet decrease to 44.18, 43.76, and 44.91, respectively, whereas RxDiff retains 48.52. At a comparable accuracy level around Jaccard 47.5, RxDiff achieves a DDI rate of only 3.27%, substantially lower than REFINE (5.88%) and SubRec (6.70%).
For discriminative models, the accuracy cost of increasing the inference-time penalty is particularly pronounced, accompanied by a substantial reduction in the number of recommended medications. This is expected because all medication logits are produced in a single forward pass. The added penalty performs a coarse post-hoc suppression based on predicted prescriptions with no further refinement on accuracy. The autoregressive model exhibits a milder decline because accuracy and DDI risk are considered progressively during generation. But focusing only on the safety of the current choice may encourage overly conservative choices, compromising the accuracy and safety of the final prescription as a whole.
In contrast, RxDiff applies DDI modulation throughout iterative reverse denoising, where each step evaluates candidates against the current full-prescription estimate in Eq. (13). This full-state, revisable refinement progressively steers the prescription toward lower DDI while preserving holistic accuracy of the prescription, providing RxDiff with a more suitable mechanism for inference-time safety control.
W2/Q2. Stochasticity of diffusion sampling and the source of the reported variance.
We thank the reviewer for requesting clarification. Each test prescription is generated using a single reverse trajectory without ensembling or voting. The results in the main tables are reported as mean standard deviation over five independently trained models with different random seeds.
To isolate variance attributable specifically to diffusion sampling, we additionally select, for each dataset, the trained checkpoint whose validation Jaccard is closest to the mean validation performance across the five training runs, and evaluate it using 10 different inference seeds. The table below reports the resulting mean standard deviation across these inference runs.
| Dataset | Jaccard↑ | F1↑ | DDI↓ |
|---|---|---|---|
| MIMIC-III | 48.47 0.08 | 62.55 0.10 | 4.21 0.04 |
| MIMIC-IV | 40.37 0.05 | 54.10 0.07 | 4.04 0.03 |
| Real-world | 51.35 0.07 | 67.11 0.09 | 3.28 0.04 |
The sampling variance is consistently smaller than the training-seed variance, indicating that RxDiff is relatively insensitive to reverse-sampling stochasticity. This stability mainly arises because the clean-prescription estimate at each step is produced deterministically by the denoiser, while randomness enters only through sampling from the resulting posterior. Thus, stochasticity primarily perturbs the intermediate trajectory and has a limited effect on the final output. The fixed length predictor further removes variability in prescription size, contributing to stable dataset-level performance across inference seeds.
Q3. Why does DDI-guided corruption help the reverse process avoid DDIs when ground-truth prescriptions may already contain DDIs?
We thank the reviewer for raising this important point. We clarify that the DDI-guided forward process is not designed to directly learn DDI-free prescription generation. The denoising objective remains recovering the original prescription , which may itself contain DDIs. Instead, DDI-guided corruption constructs hard negatives to introduce additional conflicts into the corrupted prescription, helping the model avoid introducing new DDIs while recovering .
Ideally, if the reverse model perfectly learned the true reverse distribution, would exactly match , and its DDI rate would naturally be identical to that of the ground-truth prescription. However, in practice, the recovering is imperfect, and prediction errors may alter the DDI profile of the predicted prescription . In this situation, DDI-guided corruption provides an additional inductive bias by exposing the model to diverse interaction-heavy hard negatives during training: the model learns general interaction-aware patterns and can better avoid introducing conflicts when predicting . As a result, even when the prediction deviates from the ground truth, the deviation is more likely to remain in a lower-DDI region.
This effect can be observed by disabling inference-time modulation (set = 0) and varying the strength of DDI-guided corruption ():
| F1↑ | DDI↓ | |
|---|---|---|
| 0 | 63.08 | 7.89 |
| 0.5 | 62.97 | 6.77 |
| 1.0 | 62.84 | 5.92 |
The model without DDI-guided corruption achieves a DDI rate of 7.89%, which is higher than the ground-truth DDI rate of 6.52% on MIMIC-III. After introducing DDI-guided corruption, the DDI rate decreases below the ground-truth level. This does not indicate that the DDI-guided forward process removes existing DDIs in the original prescriptions; rather, it indicates that when the model cannot perfectly recover the original prescription, DDI-guided training steers prediction errors toward lower-DDI alternatives.
In summary, the existence of DDIs in ground-truth prescriptions does not conflict with the role of DDI-guided corruption. Its purpose is not to eliminate DDIs in ground-truth prescriptions, but to improve the model’s ability to maintain interaction-aware prescriptions when recovering is imperfect.
We hope these additional analyses and clarifications help address the reviewer’s concern. We would be happy to provide additional information if further clarification is needed.
I thank the authors for their detailed rebuttal and additional experiments. Overall, my questions have been fully addressed. I am therefore increasing my rating to accept.
We are pleased that our responses have addressed the reviewer’s concerns. We sincerely thank the reviewer for their careful consideration and thoughtful evaluation.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 4/4
- Originality
- 4/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
Medication recommendation is an example of subset selection with the constraints imposed by avoiding harmful drug-drug interactions. The nature of the problem is the efficient handling of the combinatorial search space. This paper leveraged discrete diffusion to tackle this problem. The main contribution lies at the customized noising and denoising procedures designed to incorporate the consideration of drug-drug interactions.
Experimental results are provided for MIMIC-III, MIMIC-IV datasets, as well as a real-world inpatient dataset.
Strengths and weaknesses
The contribution type is between "general" and "user-inspired"
Strengths:
- Reformulation of medication recommendation as a discrete diffusion process
- Modified noising and denoising procedures to handle DDI
- Inference time safety control
- Detailed experiments, particularly with safety analysis
Weakness:
In the context of EHR, medication recommendation is not a static problem. Drugs prescribed now will impact what to prescribe in the future, and there are certain regimes for drug prescriptions.
Questions
NA
Limitations
yes
Formatting concerns
NA
2 comments
Rebuttal
We sincerely thank Reviewer Gyfu for the positive assessment and the constructive comment regarding the dynamic nature of medication recommendation.
W1. Medication recommendation is dynamic: current prescriptions may affect future treatment decisions, and clinical therapies may follow treatment regimens.
We fully agree with this observation. RxDiff already captures history-aware longitudinal dynamics through its EHR encoder, which models the sequence of previous visits rather than treating each visit independently. A useful extension is to additionally incorporate historical medication records into the patient encoder. This provides a richer description of the patient’s treatment history and can partially reflect medication persistence and carry-over patterns, thereby improving recommendation for the current visit. We conduct the following additional experiment:
| Model | Jaccard↑ | F1↑ | DDI↓ |
|---|---|---|---|
| RxDiff w/o historical medication | 48.49 | 62.57 | 4.19 |
| RxDiff w/ historical medication | 48.87 | 62.91 | 4.16 |
The results show that incorporating historical medications further improves current-visit recommendation. However, we do not use historical medication information in the main experiments to retain the same input setting as baselines to ensure a fair comparison.
Nevertheless, we agree that the current problem formulation remains a current-visit prescription generation task. It does not explicitly model how the recommended medications affect future patient states and optimize subsequent treatment decisions, which is beyond the standard medication recommendation setting considered in this work. Extending medication recommendation toward multi-visit prescription trajectory generation, with explicit modeling of medication persistence and stage-specific treatment regimens, is an important future direction for improving both model capability and practical clinical relevance.
We hope these responses are satisfactory and welcome any further questions.
it's nice to see that a modest improvement can be made by incorporating historical medication records. I thank the authors for their efforts.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Dear Area Chair,
We sincerely thank you for the careful synthesis of the reviews and for clearly identifying the key issues requiring attention. We address the points raised in the meta-review below.
As detailed in W1/Q1 of our response to Reviewer 8tqt, we augmented the strongest discriminative baselines, REFINE and SubRec, with comparable DDI-based inference-time logit penalties, and equipped COGNet with DDI-aware greedy decoding.
The additional results show that these controls can reduce DDI rates, but at the cost of a substantially less favorable safety-accuracy tradeoff. At a matched DDI rate of approximately 4.3%, RxDiff retains a Jaccard score of 48.52, compared with 44.18 for REFINE, 43.76 for SubRec, and 44.91 for COGNet. Conversely, at comparable accuracy, RxDiff achieves markedly lower DDI rates. These results indicate that the advantage does not arise solely from applying a method-agnostic inference-time filter, but from integrating safety modulation into iterative, full-prescription refinement.
Reviewer 8tqt subsequently confirmed that our responses and additional experiments fully addressed their concerns.
As explained in W6 of our response to Reviewer ydru, the original 80%-training/100%-inference experiment was intended to evaluate adaptability to updated DDI knowledge rather than strict robustness under matched information.
To address the reviewer’s concern, we additionally evaluated all methods using the same 80% DDI rule set during both training and inference. RxDiff continues to achieve the lowest DDI rate under this matched-information setting. We will therefore revise the original experiment title to adaptability to updated DDI knowledge and report the matched 80%/80% experiment separately as robustness to different DDI knowledge distributions.
As reported in W2/Q2 of our response to Reviewer 8tqt, each test prescription is generated using a single reverse trajectory, without ensembling or voting. The standard deviations in the main tables are calculated over five independently trained models with different random seeds.
We further isolated sampling stochasticity by evaluating a fixed checkpoint with ten inference seeds. The resulting standard deviations are small across all three datasets and are consistently lower than the variance across training seeds. This confirms that the reported improvements are not driven by unstable diffusion sampling.
As clarified in W1 of our response to Reviewer ydru, serialization is only a fixed representation required to apply discrete diffusion over medication tokens. It does not impose autoregressive ordering because all positions are corrupted and denoised jointly rather than generated sequentially.
As acknowledged in W2 of our response to Reviewer ydru, Eq. (5) should condition r on the original medication xi0, consistently with Eq. (4). This is a notation error that will be corrected in the revision.
As detailed in W3–W5 of our response to Reviewer ydru, clean prescription context preserves conditionally independent forward transitions and enables the closed-form cumulative marginal; the MLP transforms the continuous timestep embedding into a task-specific condition, whereas positional embeddings only identify token positions; and stop-gradient prevents the auxiliary length objective from dominating the patient representation learned for prescription generation. We will incorporate these explanations into the revised manuscript.
We respectfully hope that these additional experiments and clarifications resolve the principal concerns identified in the meta-review. We sincerely appreciate your time and consideration.