NeurIPS 2025

Fine-grained List-wise Alignment for Generative
Medication Recommendation
Chenxiao Fan1 Chongming Gao1∗Wentao Shi1
Yaxin Gong1 Zihao Zhao1 Fuli Feng1∗
1University of Science and Technology of China
{simonfan, shiwentao123, gyx2022, zzh1998}@mail.ustc.edu.cn
chongminggao@ustc.edu.cn, fulifeng93@gmail.com
Abstract
Accurate and safe medication recommendations are critical for effective clinical
decision-making, especially in multimorbidity cases. However, existing systems
rely on point-wise prediction paradigms that overlook synergistic drug effects
and potential adverse drug-drug interactions (DDIs). We propose FLAME, a fine-
grained list-wise alignment framework for large language models (LLMs), enabling
drug-by-drug generation of drug lists. FLAME formulates recommendation as
a sequential decision process, where each step adds or removes a single drug.
To provide fine-grained learning signals, we devise step-wise Group Relative
Policy Optimization (GRPO) with potential-based reward shaping, which explicitly
models DDIs and optimizes the contribution of each drug to the overall prescription.
Furthermore, FLAME enhances patient modeling by integrating structured clinical
knowledge and collaborative information into the representation space of LLMs.
Experiments on benchmark datasets demonstrate that FLAME achieves state-of-
the-art performance, delivering superior accuracy, controllable safety–accuracy
trade-offs, and strong generalization across diverse clinical scenarios. Our code is
available at https://github.com/cxfann/Flame.
1
Introduction
Accurate and safe medication recommendation is essential for clinical decision-making, especially in
complex cases involving multimorbidity [1, 2]. In these scenarios, clinicians must consider not only
the therapeutic effects of individual drugs, but also their potential interactions and cumulative safety
risks. Recent advances in AI have led to the development of automated medication recommendation
systems [3, 4, 5], yet their...