acceptodds
Under review as a conference paper at ICLR 2027

Semantic ID Learning for Safe Medication Recommendation

Abstract

Medication recommendation from electronic health records requires jointly modeling longitudinal patient histories, unordered intra-visit clinical concepts, and drug-drug interaction (DDI) safety constraints. Existing methods either represent clinical concepts as flat vocabulary indices without fully leveraging pre-trained biomedical semantics, or enforce DDI constraints through post-hoc filtering, thereby decoupling safety from model optimization. We propose SID-MedRec, a two-stage framework that addresses these limitations through three designs. First, a residual quantized variational autoencoder (RQ-VAE) learns hierarchical discrete semantic IDs from BioBERT embeddings, providing a unified representation for diagnoses, procedures, and medications. Second, a set-aware temporal architecture combines Set Transformers for intra-visit set aggregation with GRU encoders for inter-visit sequence modeling, capturing the structural characteristics of EHR data. Third, an adaptive DDI-aware loss dynamically balances recommendation accuracy and DDI avoidance based on a predefined target DDI rate. Experiments on MIMIC-III and MIMIC-IV demonstrate that SID-MedRec achieves consistent improvements over strong baselines in recommendation performance while maintaining competitive DDI rates.

Primary area:
unsupervised, self-supervised, semi-supervised, and supervised representation learning
Keywords:
medication recommendation, semantic ID, residual vector quantization, drug-drug interaction, electronic health records

Reviews

Among:
Shape:
1234this paper, Bottom 2%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.33 over 3 reviews, above 2% of the others.
Reviewer_8aa3OpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

SID-MedRec tackles medication recommendation from longitudinal EHRs. It uses an RQ-VAE to turn BioBERT embeddings of diagnoses, procedures, and medications into hierarchical semantic IDs. Within each visit, a Set Transformer aggregates concepts; separate GRUs handle the temporal dimension across visits; and an adaptive DDI-aware loss trades off prescription accuracy against drug–drug interaction risk. Experiments compare against nine baselines on MIMIC-III and MIMIC-IV.

Critical strengths
  1. The separation of within-visit set modeling from across-visit temporal modeling fits EHRs' nested structure naturally. The ablation confirms the set encoder helps, and dropping the DDI loss pushes the DDI rate up on both datasets. Together, these support the visit-encoder design and the safety-aware training objective.
Critical weaknesses
  1. The case for SID as the core contribution is thin. Table 3 shows small and mixed effects from quantization, and no other measured outcome explains why the discrete representation is actually needed. Code utilization, complete-tuple collisions, and the relationship to SCQMed are largely left unaddressed. The Method section spends most of its space on standard components while giving too little room to these SID-specific design choices. In the end, I came away without a clear picture of what quantization is buying for medication recommendation.
  2. The safety claim is hard to evaluate at the reported operating point. The DDI-loss ablation shows a benefit, but the full model actually has both higher accuracy and higher DDI than SafeDrug. Ground-truth DDI rates and DDI_target values are missing, the difference from SafeDrug's control mechanism is not clearly explained, and the accuracy advantage at comparable DDI levels is not established. Some medication-recommendation methods discussed in the paper (MoleRec, COGNet, DrugDoctor) are also absent from the experiments. These gaps make it hard to assess the claimed accuracy–safety advantage.

AI-use disclosure. I could not find the required disclosure section in the manuscript or appendix.

Questions for authors
  1. What are the complete-tuple utilization and collision rates per modality? How does sharing an SID affect the model's ability to distinguish concepts?
  2. Given the small and mixed changes in Table 3, what concrete, measurable benefit does the discrete SID representation provide? Can you substantiate at least one — compactness, rare-concept performance, or something else?
  3. Does the w/o SID variant keep the same pretrained semantic embeddings and downstream architecture? What exactly does Table 3 isolate about quantization itself?
  4. What are the ground-truth prescription DDI rates and DDI_target values on both datasets, and how were the targets chosen?
  5. How should the sigmoid control be compared with SafeDrug's controllable loss — especially the design of keeping a nonzero DDI coefficient even at zero observed DDI? Does the accuracy advantage hold at comparable DDI levels?
  6. What distinguishes the SID representation from SCQMed's approach? For MoleRec, COGNet, and DrugDoctor — which are discussed in the paper — which comparisons apply here, and why were they left out?
1 comment

I haven’t seen a response to my review. My two main concerns remain.

  1. The SID ablation in Table 3 shows small, mixed effects. It’s still unclear what quantization adds to medication recommendation.
  2. SID-MedRec achieves higher accuracy than SafeDrug at a higher DDI rate. The paper doesn’t show whether that accuracy advantage holds at comparable DDI rates.

In my view, the paper falls well below the bar for acceptance at ICLR, and I remain skeptical of the method’s claimed benefits. I will not change my rating.

Reviewer_rWyzOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

The paper addresses medication recommendation from EHR data (MIMIC-III/IV). The input is a sequence of visits, each with sets of diagnoses, procedures, and prior medications. The output is the medication set for the current visit. The claimed contributions are RQ-VAE semantic IDs for medical concepts, the set-aware temporal architecture, and the adaptive DDI-aware objective that replaces post-hoc filtering.

Critical strengths

A well-motivated, modular idea, honestly reported. Grounding concept tokens in pretrained biomedical text semantics through a compact hierarchical discrete interface is a reasonable direction. It is potentially useful for rare or unseen codes, and it is cheap to adopt.

Critical weaknesses
  • The abstract and introduction say existing methods treat DDI via post-hoc filtering and that the proposed loss eliminates it. The paper’s own Related Work says SafeDrug already includes a DDI loss term. The proposed loss is a standard soft penalty. No comparison with post-hoc filtering is run, and the hard DDI constraint in the introduction does not match a soft penalty.
  • The contribution, semantic ID learning, is not supported by the evidence. No measurable gain, confounded ablation, circular codebook analysis, possible test-set selection.
  • The safety claims and state-of-the-art claims are not adequately supported. DDI rates are not better than several baselines.
Questions for authors

See weaknesses

Reviewer_erPkOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes SID-MEDREC, a two-stage medication recommendation framework for electronic health records. In the first stage, strings describing diagnoses, medical procedures, and medications are encoded with BioBERT and then converted by an RQ-VAE into multi-level discrete semantic IDs. In the second stage, intra-visit data are modeled with an order-agnostic set encoder, IVSE, while inter-visit temporal data are modeled with a GRU; medication sets are then generated by combining a prediction loss with an adaptive DDI penalty.

The authors conduct comparisons on the MIMIC-III and MIMIC-IV datasets. In Table 2, the full model outperforms all listed baselines on the three recommendation accuracy metrics, with absolute Jaccard improvements over DAI-Net of 0.0135 and 0.0173. The ablation study clarifies the contribution of some modules; however, certain components, such as the independent benefit of the semantic IDs and the individual loss terms, still require stronger supporting evidence.

Critical strengths

The modeling rationale is sound. The clinical concepts within a single visit constitute an unordered set, whereas a patient’s successive visits are temporally ordered. Using a set encoder for the former and a GRU for the latter is consistent with this structure. In addition, several methodological designs show a degree of novelty, such as learning different medical concepts jointly and decomposing the conventional loss into codebook and commitment losses trained with different weights.

Critical weaknesses

1.In the ablation study, the contribution of some components does not appear sufficiently substantial, particularly that of the SID component. Moreover, even the weakest ablated model still outperforms all baselines. It remains unclear whether this performance gain originates from the components of the architecture that were not ablated and, if so, which specific component is responsible. Without additional evidence on this point, I would question whether the authors fully understand how each design choice ultimately affects the model.

2.The paper evaluates the model only on MIMIC-III and MIMIC-IV. Since both datasets are drawn from MIMIC, is the data source too homogeneous? In addition, the data volume is relatively small. Is this the inherent size of the datasets, or the result of deliberate filtering by the authors? If filtering was applied, please clearly describe the preprocessing procedure and filtering criteria in the paper. This issue may substantially affect the true performance and practical value of the proposed model.

Questions for authors

1.Equation (14) applies sigmoid probabilities, so that one minus the mean positive-class probability plus the mean negative-class probability is strictly greater than zero; consequently, the zero branch is never activated. Is this consistent with the implementation and the intended design? If the implementation uses a different margin or operates on logits, please make the equation and the experimental description consistent.

2.Figure 2 suggests that, after the medical concepts are learned jointly, concepts from different categories are relatively well separated. However, the figure still shows a small number of categories that remain intermixed. Does this affect the model’s discriminative performance?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.