Test-Time Recommendation for Safe Medication Combination
摘要
Recommending appropriate medication combinations is crucial to intelligent healthcare. Recent studies leverage Large Language Models (LLMs) to streamline traditional recommendation architectures. However, LLMs are prone to hallucinations during training, often generating non-existent medications or suggesting incompatible combinations. Moreover, patient queries(i.e., personal information, medical history, and current symptoms) often arrive as an online stream from distributions that differ from the training data. Therefore, we propose a test-time recommendation method for medication combination, enabling on-the-fly and robust recommendations. During training, we introduce a learnable output layer and a drug–drug interaction (DDI)-aware objective to guide the LLM in generating clinically valid and safe medication combination recommendations. To handle distribution shifts at test time, we further design a self-distillation task that enables off-the-shelf pretrained models to dynamically adapt to unseen patient queries based on their feature representations. Based on extensive validation on MIMIC-III and MIMIC-IV, our approach achieves superior recommendation accuracy and safety, thus offering a reliable prospect for deployment in real clinical scenarios.