Source-linked AI summary
RES-MR: Risk-Aware Reasoning for Explainable and Safe Medication Recommendation
Cong Wang, Jin Li, Shoujin Wang, Yishuo Li, Huilin Gu, Wenpeng Lu
TL;DR
Existing medication recommenders can be opaque and use fixed safety constraints that ignore individual risk tolerance. RES-MR combines evidence-grounded reasoning distillation with risk-aware policy optimization, and reports stronger performance than state-of-the-art baselines across three datasets.
Problem
Existing methods remain limited by opaque decision processes and fixed, patient-agnostic safety constraints that do not account for individual risk tolerance.
Source: §1 · pp. 2–3Method
RES-MR distills explicit reasoning from patient-specific graph evidence, then uses risk-aware policy optimization with patient prototypes to calibrate personalized safety boundaries.
Source: §1 · p. 3, §4.2.3 · p. 6Results
Across three datasets, RES-MR significantly outperforms state-of-the-art baselines and achieves a superior accuracy-safety trade-off.
Source: §1 · p. 3, §6 · p. 10Takeaways & Limitations
RES-MR is presented as a framework for explainable medication recommendations with personalized safety for clinical decision support.
Source: §6 · p. 10
Abstract
from arXiv · showhide
Medication recommendations seek to deliver personalized drug combinations based on patients' clinical information, where ensuring transparent decision-making and personalized safety are of paramount importance. However, existing approaches predominantly operate as ``black boxes'', offering limited interpretability and hindering clinician trust. Furthermore, they typically rely on fixed, patient-agnostic safety constraints, neglecting the heterogeneity of risk tolerance across individuals, which poses significant risks to vulnerable populations. To address these gaps, we propose \textbf{RES-MR}, a novel Risk-aware Reasoning framework for Explainable and Safe Medication Recommendation using LLMs. RES-MR follows a two-stage training paradigm: (1) an explainable clinical reasoning distillation stage to elicit diagnostic capabilities by fine-tuning on synthesized reasoning trajectories, grounded in patient-specific knowledge from graph retrieval; and (2) a risk-aware policy optimization stage to dynamically balance therapeutic efficacy with personalized safety. This stage employs disentangled drug factors to construct patient-specific reference prototypes that capture desired therapeutic drug features and risk features to avoid. These prototypes enable risk boundary calibration and guide the model toward safe recommendations via reward shaping and clipping. Extensive experiments on benchmark datasets demonstrate that RES-MR significantly outperforms state-of-the-art baselines in terms of accuracy, safety, and explainability. Our code and data are available at: https://github.com/wangcong2001/RES-MR.
1 Introduction
Medication recommendation must balance therapeutic benefit, safety, and patient context, yet existing systems often provide opaque decisions and use safety constraints that ignore individual risk tolerance. RES-MR combines evidence-grounded clinical reasoning with patient-specific risk-aware policy optimization; the paper reports gains over state-of-the-art baselines across accuracy, safety, and explainability.
1 Introduction
- Safe medication decisions require jointly considering therapeutic benefit, drug-drug interactions, contraindications, and patient-specific context.Data-driven approaches based on longitudinal EHRs aim to model these dependencies.Source: §1 · p. 2
- Existing methods can leave clinicians without an explicit, verifiable path linking symptoms, pathology, and treatment rationale.Feature attribution may indicate which features contributed without explaining how the conclusion was logically deduced.Source: §1 · p. 2
- Common safety approaches use static global constraints rather than adapting to patient-specific risk tolerance.The resulting recommendations may be overly conservative for robust patients or potentially risky for vulnerable ones.Source: §1 · pp. 2–3
- RES-MR uses retrieved patient-specific evidence and distilled reasoning trajectories, then applies RL with adaptive reward shaping and clipping to balance efficacy and safety.Disentangled efficacy and risk factors form patient prototypes used to calibrate a personalized risk boundary.Source: §1 · p. 3
- RES-MR consistently outperforms state-of-the-art baselines across recommendation accuracy, safety, and explainability metrics.The framework combines explainable clinical reasoning distillation with risk-aware policy optimization.Source: §1 · p. 3
2 Related Works
Prior work spans instance-based and longitudinal medication recommendation, graph- and LLM-based safety approaches, and reasoning-enhanced LLMs. The paper identifies missing verifiable reasoning and patient-specific risk tolerance as gaps and presents RES-MR's two-stage response.
Medication Recommendation
Safe Medication Recommendation
Reasoning-enhanced LLM-Based Recommendation
- Reasoning-enhanced recommendation research includes fine-tuning to internalize reasoning patterns, with EXP3RT [29] generating rationales and ratings and Reason4Rec [17] using multi-stage feedback.The section notes that general-purpose LLMs often lack domain-specific optimization without fine-tuning.Source: §2 · p. 3
Contributions
- RES-MR integrates reasoning generation and safety alignment in two stages: evidence-grounded reasoning distillation followed by policy optimization for personalized risk-benefit trade-offs.The second stage uses disentangled drug factors and patient prototypes to quantify personalized risk boundaries.Source: §2 · p. 3
3 Problem Formulation
The section defines the patient-record and knowledge-graph inputs and frames recommendation as generating a reasoning trajectory and a safe medication set from patient history and current context.
3 Problem Formulation
- An EHR is represented as a temporal sequence of visits containing structured context, clinical notes, and prescribed medications.Structured context includes diagnoses, procedures, and demographic attributes.Source: §3 · p. 4
- The recommendation task uses historical visits, the current visit context and note, and an external medical knowledge graph as inputs.The stated outputs include a reasoning trajectory and a safe medication set for the current visit.Source: §3 · p. 4, §4.1.2 · p. 4
- The medical knowledge graph represents medical entities and clinical relations in triples, including relations such as indication and contraindication.Source: §3 · p. 4
- The formulation includes a reasoning trajectory that articulates diagnostic logic as an explanation and a safe medication set for the current visit.Source: §3 · p. 4, §4.1.2 · p. 4
4.1.1 Knowledge Graph Retrieval.
- Knowledge retrieval combines one-hop neighboring triples queried from the structured context with semantically similar graph contexts retrieved from the current note.The merged context provides patient-specific evidence for reasoning and supports patient-prototype construction.Source: §4.1.1 · p. 4
4.1.2 Supervised Fine-tuning.
- GPT-5 is used to synthesize high-quality reasoning trajectories that explain the clinical decision process.Source: §4.1.2 · p. 4
4 Methodology
RES-MR combines evidence-grounded reasoning distillation with risk-aware RL, using patient-specific prototypes and calibrated boundaries to shape medication recommendations.
4.1 Explainable Clinical Reasoning Distillation
- ECRD retrieves graph evidence and fine-tunes on GPT-5-synthesized, diagnosis-aware trajectories connecting patient evidence to medication actions.The generated sequence combines the reasoning path with the final medication result.Source: §4.1 · p. 4
4.2 Risk-Aware Policy Optimization
- RAPO addresses SFT's omission of efficacy-safety trade-offs through reinforcement-learning rewards that optimize medication combinations within personalized risk boundaries.The stage uses prototypes and patient medication history to calibrate the boundary, then applies reward shaping and clipping.Source: §4.2 · pp. 4–5
4.2.1 Dual-Factor Disentanglement.
- Dual-factor disentanglement decomposes drug embeddings into efficacy and risk factors, aligning them with clinical semantics and encouraging independence through orthogonality and KL regularization.The frozen factor means serve as deterministic drug factors in subsequent optimization.Source: §4.2.1 · p. 5
4.2.2 Prototype Construction.
- Prototype construction aggregates efficacy factors from indicated drugs into a positive prototype and risk factors from contraindicated drugs into a negative prototype.Both indication and contraindication sets must be non-empty for each patient.Source: §4.2.2 · pp. 5–6
4.2.4 Reward Clipping and Policy Update.
- Reward clipping uses boundary violations to suppress unsafe high-reward trajectories while allowing higher reward bounds for safe trajectories.The clipping bounds depend on group-wise reward statistics; unsafe trajectories receive a tighter upper bound.Source: §4.2.4 · p. 6, §4.2.3 · p. 6
4.2.3 Reward Shaping.
- Historical medication risk similarities to the negative prototype calibrate a patient-specific boundary, while the composite reward combines efficacy with weighted safety costs.The boundary is a δ-quantile; a larger boundary permits higher risk tolerance, and efficacy reward combines Jaccard similarity with a positive-prototype bonus.Source: §4.2.3 · p. 6
- Group Sequence Policy Optimization samples multiple complete reasoning-and-medication sequences per context and updates the policy using standardized advantages and length-normalized likelihood ratios.Length normalization keeps importance ratios comparable across response lengths to help stabilize training.Source: §4.2.3 · p. 6
4.3 Inference
- At inference, the model retrieves knowledge for the current visit and generates an explicit reasoning trajectory followed by a medication set.The input context includes patient history, current structured and note information, and retrieved knowledge.Source: §4.3 · pp. 6–7
5 Experiments
Experiments evaluate RES-MR across three datasets and report strong performance across accuracy, safety, and explainability. Ablations, hyperparameter analyses, efficiency measurements, and a case study examine its components and behavior.
5.1 Experimental Setup
- The experiments use MIMIC-III, MIMIC-IV, and eICU, with patient-level 4:1:1 splits; MIMIC admissions require available clinical notes.Evaluation covers recommendation accuracy, medication safety, and reasoning interpretability; the full medication set is retained, making results not directly comparable to studies using different preprocessing.Source: §5.1 · pp. 7–8
5.2 Overall Performance Comparison
- RES-MR consistently achieves the best overall performance across MIMIC-III, MIMIC-IV, and eICU; specifically, RES-MR-8B improves Jaccard by 7.7% over state-of-the-art FLAME on MIMIC-III.Table 2 compares accuracy, safety, and explainability; in the transfer setting, RES-MR initialized from MIMIC-III SFT weights and lightly adapted on MIMIC-IV and eICU maintains superior performance.Source: §5.2 · pp. 8–9, Table 2 · p. 8
5.3 Ablation Study
- Removing retrieval or reasoning reduces accuracy, removing RAPO increases DDI rates, and removing disentanglement or reward-design components hinders efficacy–safety balance.The ablation study reports that removing clipping may induce reward hacking by ignoring safety risks for high scores.Source: §5.3 · p. 9, Table 3 · p. 9
5.4 Hyperparameter Analysis
- Increasing DDI and risk penalties reduces DDI rates, while extremely high penalties sharply collapse Jaccard; excessive efficacy bonus weight slightly lowers Jaccard.The authors select settings that strictly control risks despite a marginal accuracy loss.Source: §5.4 · p. 9, Figure 3 · p. 9
5.5 Efficiency Analysis
- RES-MR requires approximately 125 GPU-hours for training and is reported as more efficient than generative LLM-based methods.The efficiency analysis uses 8 NVIDIA A100 GPUs for training and one NVIDIA A100 GPU for inference.Source: §5.5 · p. 9, Figure 4 · p. 9
5.7 Case Study
- In the case study, RES-MR recommends potassium chloride alongside furosemide and conditions warfarin on hemostasis after weighing hypokalemia and bleeding risks.The example also includes neostigmine and glycopyrronium for neuromuscular blockade reversal.Source: §5.7 · p. 10, Table 4 · p. 10
6 Conclusion
RES-MR combines ECRD for transparent reasoning with RAPO for dynamic safety balancing, and outperforms state-of-the-art baselines across three datasets with a superior accuracy-safety trade-off. In a blind assessment, it also outperformed baselines across explanation and medication-set dimensions, with substantial agreement among human evaluators.
6 Conclusion
- Across three datasets, RES-MR significantly outperforms state-of-the-art baselines and achieves a superior accuracy-safety trade-off.The framework integrates ECRD for transparent reasoning and RAPO for dynamic safety balancing.Source: §6 · p. 10
- At inference, RES-MR takes 13.3 s, comparable to the nonreasoning baseline LAMO.The paper attributes this efficiency to concise, clinically grounded reasoning paths distilled during ECRD, avoiding costly multi-pass generation.Source: §6 · p. 10
5.6 Explanation Quality Assessment
- On 50 randomly sampled MIMIC-III test instances, RES-MR consistently outperforms baselines across explanation and medication-set assessments; human evaluators show Fleiss’ κ>0.7.The assessments cover Reasonableness and Verifiability of explanations and Effectiveness and Safety of medication sets.Source: §5.6 · p. 10