# Improving Rare Medication Recommendation with Counterfactual Data Augmentation and Large Language Models

arXiv: https://arxiv.org/abs/2607.24829 · HTML: https://mlsanity.com/paper/2607.24829/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 19 of its 31 references that are in the map.
- First posted on arXiv 23 Jul 2026.

## Builds on (most cited first, 19 of 19)

- [Recommendation as Language Processing (RLP): A Unified Pretrain, Personalized Prompt & Predict Paradigm (P5)](https://mlsanity.com/paper/2203.13366/) (2022)
- [A Survey on Large Language Models for Recommendation](https://mlsanity.com/paper/2305.19860/) (2023)
- [TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation](https://mlsanity.com/paper/2305.00447/) (2023)
- [GatorTron: A Large Clinical Language Model to Unlock Patient Information from Unstructured Electronic Health Records](https://mlsanity.com/paper/2203.03540/) (2022)
- [A Study of Generative Large Language Model for Medical Research and Healthcare](https://mlsanity.com/paper/2305.13523/) (2023)
- [GAMENet: Graph Augmented MEmory Networks for Recommending Medication Combination](https://mlsanity.com/paper/1809.01852/) (2018)
- [LLaRA: Large Language-Recommendation Assistant](https://mlsanity.com/paper/2312.02445/) (2023)
- [SafeDrug: Dual Molecular Graph Encoders for Recommending Effective and Safe Drug Combinations](https://mlsanity.com/paper/2105.02711/) (2021)
- [Change Matters: Medication Change Prediction with Recurrent Residual Networks](https://mlsanity.com/paper/2105.01876/) (2021)
- [Prompting Large Language Models for Counterfactual Generation: An Empirical Study](https://mlsanity.com/paper/2305.14791/) (2023)
- [DISCO: Distilling Counterfactuals with Large Language Models](https://mlsanity.com/paper/2212.10534/) (2022)
- [People Make Better Edits: Measuring the Efficacy of LLM-Generated Counterfactually Augmented Data for Harmful Language Detection](https://mlsanity.com/paper/2311.01270/) (2023)
- [Relational Data Synthesis using Generative Adversarial Networks: A Design Space Exploration](https://mlsanity.com/paper/2008.12763/) (2020)
- [The RAG Paradox: A Black-Box Attack Exploiting Unintentional Vulnerabilities in Retrieval-Augmented Generation Systems](https://mlsanity.com/paper/2502.20995/) (2025)
- [Leave No Patient Behind: Enhancing Medication Recommendation for Rare Disease Patients](https://mlsanity.com/paper/2403.17745/) (2024)
- [Data Augmentation as Free Lunch: Exploring the Test-Time Augmentation for Sequential Recommendation](https://mlsanity.com/paper/2504.04843/) (2025)
- [BioAug: Conditional Generation based Data Augmentation for Low-Resource Biomedical NER](https://mlsanity.com/paper/2305.10647/) (2023)
- [Natural Language-Assisted Multi-modal Medication Recommendation](https://mlsanity.com/paper/2501.07166/) (2025)
- [Improving the Generation and Evaluation of Synthetic Data for Downstream Medical Causal Inference](https://mlsanity.com/paper/2510.18768/) (2025)

## Abstract (arXiv)

AI-based medication recommendation systems have attracted substantial attention due to their potential to enhance patient safety and therapeutic outcomes. Despite the clinical importance of accurately recommending rarely prescribed medications (rare-meds), we observe that most existing methods show significantly lower predictive performance for rare-meds. We attribute this issue to two intrinsic limitations: (a) the inherent scarcity of data for rare-meds and (b) limited consideration of co-recommended medications. To address these limitations, we propose GenRxR, a novel framework based on large language models (LLMs). GenRxR leverages the medical knowledge and clinical reasoning capability of LLMs to generate counterfactual medical data, mitigating the data scarcity issue for rare-meds. It also integrates an LLM into the medication recommendation process to model relationships among co-recommended medications. To further enhance the clinical reasoning, we introduce an instruction tuning step that aligns the LLM's capability with the recommendation task, enabling better handling of clinical context, including rare-meds cases. In our experiments, we show that GenRxR outperforms 14 (including 5 LLM-based) baselines in most cases. Specifically, it achieves up to 30.9% higher predictive performance for rare-meds than the strongest baseline.
