Self-evolving dual-role deliberation for medication recommendation based on clinical records
Self-Evolving Dual-Role Deliberation for Medication Recommendation from Clinical Records
The authors propose a training-free agent framework, SEMPA, which uses Proposer-Critic multi-round debate plus policy evolution for drug recommendation, achieving a DDI rate of 0.0172 on 100 MIMIC-IV cases, which the authors say outperforms the strongest supervised baseline.
- Recommending medications from electronic health records is a safety-critical task that requires balancing treatment coverage, DDI and contraindication constraints, and traceable rationales. The authors argue that supervised models are frozen after deployment and lack reasoning traces, and that existing LLM pipelines are single-round and single-role, with no cross-case improvement loop.
- Proposes a training-free framework, SEMPA: the same LLM plays Proposer and Critic in multi-round adversarial debate, combined with molecule-aware retrieval, contrastive rewriting of natural-language strategies by success/failure pools (with semantic anchor constraints), and finally assembling prescriptions through rule-based DDI and contraindication checks.
- On 100 MIMIC-IV cases, SEMPA achieves Jaccard 0.3116, F1 0.7295, and DDI rate 0.0172; the authors report F1 57.7% higher than the strongest supervised baseline and DDI 77.5% lower; two LLM reviewers both rank it first, and the trend is consistent across six backbones.
- The authors note: only 100 single-center MIMIC-IV cases, generalization unverified; LLM calls bring higher latency and cost; semantic anchors cannot formally verify evolved strategies; DDI thresholds are patient-independent; episodic memory may accumulate bias. Prospective clinician-in-the-loop evaluation is needed before clinical application.
- Evaluated models
- GLM-5Claude-Sonnet-4.6Gemini-2.5-ProDeepSeek-V4-FlashQwen-3.5-PlusQwen-3.5-FlashGPT-4.1
- Benchmarks
- MIMIC-IV
- Metrics
- JaccardF1PRAUCDDI rate#MedsR2
SEMPA is a training-free agent framework in which a Proposer and a Critic engage in multi-round adversarial deliberation, supplemented by molecule-aware retrieval and rule-based DDI and contraindication checks, to recommend medications from clinical records. On 100 MIMIC-IV visits, it achieved an F1 of 0.7295 and a DDI rate of 0.0172, improving F1 by 57.7% and reducing DDI by 77.5% over the strongest supervised baseline. Experiments with six backbone models show that the gains come from the framework rather than from a specific model.
Paper analysis
What problem does this paper attempt to solve?
The authors reframe drug recommendation as a self-evolving dual-role debate problem and propose a training-free agent framework, SEMPA.
Core problem: how to automatically recommend medication regimens from electronic health records (EHR) while satisfying four conflicting requirements: treatment coverage, safety constraints, traceable rationales, and continuous adaptability.
- Task setting and importance: ICU patients often have multiple concurrent diagnoses and need multi-drug regimens covering all active diagnoses while avoiding drug-drug interactions (DDI), absolute contraindications, and renal-function violations; prescribing practice evolves with new evidence, and static decision systems become outdated after deployment (§1).
- Shortcomings of existing methods (per the authors): supervised models (LEAP, RETAIN, GAMENet, SafeDrug, etc.) are frozen after deployment, treat prescribing as uninterpretable multi-label classification, lack molecular-level grounding, and often trade off safety against coverage; existing LLM pipelines are single-round and single-role, with no second opinion, no mechanism to learn from successes and failures, and no explicit DDI constraints (§1).
- Core observation: the authors argue that drug recommendation should be modeled as an agentic, self-evolving debate process rather than one-shot classification.
- What the paper proposes: SEMPA—a training-free framework in which two roles, Proposer and Critic, engage in multi-round adversarial debate, combined with molecule-aware retrieval, contrastive policy evolution, and a rule-based safety check layer; adaptation is entirely through natural-language policy evolution, with no parameter updates (§1, §3).
What related research exists?
Related work falls into three lines: supervised drug recommendation, LLM clinical reasoning, and multi-agent and self-evolving systems; the authors say SEMPA combines the three.
Supervised drug recommendation
- LEAP (Zhang et al., 2017), RETAIN (Choi et al., 2016), GAMENet (Shang et al., 2019): attention- and memory-augmented multi-label classification on longitudinal EHR.
- SafeDrug (Yang et al., 2021), MoleRec (Yang et al., 2023), CausalMed (Li et al., 2024b), StratMed (Li et al., 2024a): progressively inject molecular structure, causal priors, and safety signals. The paper notes that such models are frozen after deployment, treat prescribing as black-box classification, and entangle safety with accuracy in a single loss.
LLMs and single-agent clinical reasoning
- Zero-shot prompting, CoT (Wei et al., 2022), Self-Consistency (Wang et al., 2022), RAG (Lewis et al., 2020; Xu et al., 2024; Cao et al., 2026): use the medical knowledge of pretrained LLMs for decision support.
- Self-Refine (Madaan et al., 2023), ReAct (Yao et al., 2022), Reflexion (Shinn et al., 2023): single-agent self-improvement loops in which the same model both proposes and self-evaluates. The paper cites the survey by Wang et al. (2026a) as saying such single-role pipelines, when used alone, are prone to confirmation bias.
Multi-agent and self-evolving systems
- MedAgents (Tang et al., 2024), MDAgents (Kim et al., 2024), MAC (Chen et al., 2025), ArgMed (Hong et al., 2024): simulate expert panels, which the paper says can reduce errors of omission (Misaghi et al., 2026); Appendix A.1 notes that these systems are usually single-round debates and that experience does not transfer across cases.
- Agent evolution directions: verbal reinforcement (Shinn et al., 2023), dynamic memory (Park et al., 2023), tool-driven adaptation (Zhou et al., 2026), principle-driven policy adaptation (Jiang et al., 2026a), etc.
Baselines and benchmarks: comparison baselines are four supervised models LEAP, RETAIN, GAMENet, SafeDrug (official code default hyperparameters), plus six LLM pipelines on the same GLM-5 backbone: Zero-shot, CoT, Self-Consistency, RAG, ReAct, Reflexion; data are 100 cases from the MIMIC-IV test set (§4.1).
Author positioning: SEMPA combines adversarial Proposer-Critic debate with a cross-case contrastive evolution loop, with both roles grounded in molecular evidence and backed by an auditable rule-based safety layer (§2, Appendix A.1).
How does the paper address this problem?
SEMPA is implemented with five modules: state construction, molecule retrieval, dual-role debate, strategy evolution, and constraint assembly, with no parameter updates throughout.
Overall approach: drug recommendation is formalized as set optimization with DDI constraints, implemented by five modules driven by the same LLM endpoint, with adaptation entirely through natural-language policy evolution. All modules call the same LLM endpoint F, requiring no task-specific trained models (§3.1).
Problem formalization
- The input is a single visit Rt=(Dt,Pt,Lt,Nt) (diagnoses, procedures, labs, narrative text), and the output is a drug set annotated with SMILES; the decision objective is to maximize utility subject to a DDI severity upper bound ΨDDI(M′)≤ϵ (Eqs. 1–2).
- The ATC-3 drug vocabulary has size 131; retrieval is performed over an ingredient-level knowledge base (thousands of DrugBank entries), mapped to the ATC-3 label space before scoring (§4.1).
Clinical state construction (M1, §3.2)
- ICD codes are mapped to UMLS concepts to merge synonyms; lab values are z-score standardized; drug names are normalized to generic names; narrative entities are extracted with structured templates.
- The patient state aggregates the above signals with a longitudinal summary of the most recent W=3 visits (Appendix A.2).
Molecule-aware retrieval (M2, §3.3)
- For each diagnosis, a BFS of depth η=3 is run on the pharmacological knowledge graph to obtain a subgraph, and candidates are ranked by a hybrid score: ϕ(m)=λϕtopo(m)+(1−λ)ϕmol(m), i.e., the weighted sum of a topological term (inverse shortest path to the diagnosis node) and a molecular term (Morgan fingerprint Tanimoto similarity).
- Drugs without SMILES use a population-frequency prior; the Top-N=300 candidates are taken with evidence cards. Morgan fingerprints use radius r=2 and 2048 bits (§4.1).
Dual-role debate and policy evolution (M3, M4, §3.4–3.5)
- The Proposer drafts prescriptions and rationales; the Critic scores and challenges them along a four-dimensional rubric (coverage, safety, molecular mechanism, logic, weights 0.30/0.30/0.20/0.20); the process terminates when the score improvement is less than γ=0.15 or the budget T=5 is reached.
- After each case, a retrospective utility ξ is computed (weighted sum of Jaccard, DDI, molecular grounding, and rubric score); every ∆k=40 cases, success/failure pools are split at the p=80th percentile of ξ, and the two roles' policies are rewritten by contrast.
- Semantic anchor constraint: the embedding cosine similarity between each policy increment and the human seed policy must be ≥ α=0.12, otherwise it is discarded and resampled; the Proposer appends entries by ten disease categories, and the Critic evolves along the four rubric dimensions (Appendix A.6).
Constraint assembly and evaluation protocol (M5, §3.6, §4.1)
- Greedy repair is applied to the debate output: candidates are sorted by φ, and in each violating DDI pair the lower-scoring drug is removed, along with drugs triggering contraindications, until constraints are satisfied; DDI severity weights are minor/mod/sev = 0.1/0.4/1.0, with upper bound ϵ=0.5.
- An evolve–freeze–test protocol is used: policies evolve on a disjoint evolution stream and are then frozen, passing once through a 100-case test set with no further updates; reference prescriptions for test cases are used only to compute metrics (§4.1).
What experiments did the paper conduct?
Comparison with supervised and LLM baselines on 100 MIMIC-IV cases, plus LLM judging, evolution dynamics, ablation, cross-backbone, and case analysis.
Experimental Setup
- Subject under test: SEMPA uses GLM-5 as the default backbone (generation temperature 0.7, evaluation temperature 0); cross-backbone experiments additionally test Claude-Sonnet-4.6, Gemini-2.5-Pro, DeepSeek-V4-Flash, Qwen-3.5-Plus, and Qwen-3.5-Flash (Table 6).
- Baselines: supervised models LEAP, RETAIN, GAMENet, SafeDrug (official code default hyperparameters); same-backbone LLM pipelines Zero-shot, CoT, Self-Consistency, RAG (M2 only), ReAct, Reflexion (§4.1).
- Data: 100 visits from the MIMIC-IV test set, processed per the standard SafeDrug pipeline; ATC-3 label space of 131 classes (§4.1).
- Metrics: Jaccard, F1, PRAUC, DDI rate, #Meds, R2; Jaccard is always exact drug-name matching, while F1 in Table 1 is ATC-3 class matching (§4.1).
- Review method: two LLM reviewers, GLM-5 and GPT-4o, score six dimensions (DMA, Safety, MolJust, Parsimony, GuideCon, OCA) on a 1–5 Likert scale, temperature 0, method order randomized (§4.1, Appendix A.15).
- Repeats: Table 1 and Table 4 are mean ± standard deviation over six independent runs.
Main Results
According to Table 1 (n=100, mean of six runs):
Swipe horizontally to read the table
Method Jaccard↑ F1↑ PRAUC↑ DDI↓ #Meds LEAP 0.2839 0.4368 0.4803 0.0658 18.33 RETAIN 0.2944 0.4468 0.4935 0.0873 24.42 GAMENet 0.3013 0.4553 0.4927 0.0867 25.00 SafeDrug 0.3069 0.4626 0.5133 0.0764 24.35 SEMPA 0.3116 0.7295 0.5282 0.0172 19.50 - The authors report that SEMPA is simultaneously best on four metrics, with F1 57.7% higher than SafeDrug and DDI rate 77.5% lower; however, the authors also state that F1 is ATC-3 class matching while Jaccard is exact matching, the two are not directly comparable, and the class-matching gain should not be read as a 57.7% improvement under a unified strict protocol (§4.2).
- The authors note that SEMPA averages 19.5 drugs, lower than GAMENet's 25.0, and argue the safety benefit is not due to prescribing fewer drugs; in an independent audit against the Beers criteria and STOPP/START 3.0, relative to RETAIN, Beers-flagged prescriptions decreased by 61%, STOPP triggers decreased by 58%, and START coverage increased by 34% (§4.2, Appendix A.14).
Against LLM Prompting and Agent Baselines
- What was tested: comparison of six LLM pipelines on the same GLM-5 backbone (Table 2, n=100).
- Results: Zero-shot/CoT/Self-Consistency have Jaccard ≤ 0.15; RAG (M2 only) 0.2452; ReAct has the lowest DDI (0.0005) but Jaccard only 0.0940; Reflexion is worst (Jaccard 0.0115); SEMPA Jaccard 0.3184, DDI 0.0155.
- Authors' interpretation: retrieval context is necessary but not sufficient; single-agent self-evaluation loops cannot translate into better prescriptions; the gains come from dual-role adversarial debate and closed-loop evolution rather than the backbone (§4.3).
Evolution Dynamics and Ablation
- Evolution dynamics (Table 4): at k=8, Jaccard 0.3146 plateaus (k=16 gives 0.3116); overall strategy drift rises monotonically to 0.997, which the authors say is an inevitable result of appending entries, with anchor constraints enforced incrementally; the average number of debate rounds drops from 5.0 to about 2.4.
- Ablation (Table 5): removing M3 (self-debate) lowers Jaccard by 40.1% and reduces the DDI rate to 0 — the authors explain this as the unquestioned Proposer retreating to small prescriptions that cannot cover the diagnosis, which is harm by omission rather than greater safety; removing M2 (retrieval) lowers PRAUC by 61.1%; removing M4 or M5 each causes about a 5% Jaccard drop.
Cross-Backbone, Case and Error Analysis
- Cross-backbone (Table 6): GLM-5 has the highest Jaccard at 0.318, Qwen-3.5-Flash the lowest at 0.249, and the other four range from 0.285 to 0.293; the authors report that across all six backbones F1 and DDI are better than pure prompting baselines, and the framework's contribution goes beyond any single model. A closed-book contamination probe (Appendix A.11, GLM-5, GPT-4.1, DeepSeek-V4-Flash, 3 runs each, n=100 per run) shows prescriptions cannot be reproduced from patient ID alone (Jaccard < 10⁻², refusal rate 100%).
- Case study (§4.7, Appendix A.12–A.16): in one 71-year-old multimorbid patient, the Critic pointed out the renal contraindication of metformin with ketorolac in round 2 and proposed switching warfarin to apixaban in round 4; the final 9-drug regimen matched 7 of the 8 reference drugs; in a summary of six other cases (Table 7), SEMPA averages 10.5 exact matches with no inappropriate drugs (0/6), versus 5.7 and 6/6 for SafeDrug.
- Error analysis (§4.8): manual review of the 23 cases with Jaccard < 0.20 found three main patterns — rare-disease coverage gaps in 9 cases, over-caution under organ impairment in 8 cases, and unresolved guideline conflicts in 6 cases.
Other Ablations and Analyses
- Computational cost (§4.9): at the default T=5, average latency is 38.7s per case (SafeDrug 0.4s), with a token cost of about $0.06; after evolution converges this drops to 24.1s.
- Hyperparameter sensitivity (Appendix A.9, Table 9, 200-case held-out pool): ∆k too frequent or too sparse both hurt performance; α too small is also harmful; at λ=0.75, Jaccard 0.318 is the highest in the sweep.
- LLM reviewer agreement (Appendix A.10): the two reviewers' rankings are fully consistent, with per-case Spearman ρ ∈ [0.71, 0.84].
What are some points that can be further explored?
The authors list five limitations and say prospective clinician-in-the-loop evaluation is needed before clinical use; experiments cover only 100 cases from a single center.
Limitations and future directions noted by the authors
- Evaluation uses only 100 cases from MIMIC-IV at a single tertiary hospital; generalization to other hospitals, coding practices, and populations is unverified (Limitations).
- SEMPA relies on repeated LLM calls, with higher latency and cost than supervised baselines, although the number of debate rounds decreases after evolution (Limitations).
- The semantic anchor improves policy stability, but it cannot formally verify the evolved natural-language policies, nor can it remove biases inherited from the backbone (Limitations).
- The DDI upper bound is independent of the patient, whereas clinically appropriate safety thresholds should vary with age, renal and hepatic function, frailty, and goals of care (Limitations).
- Episodic memory may accumulate biased or stale prescribing patterns under distribution shift; any real clinical use requires prospective clinician-in-the-loop evaluation (Limitations).
- After error analysis, the authors propose two next steps: warm-start the experience library with a curated case library to reduce coverage gaps; and add dose-adjustment actions to the Critic's repair toolbox rather than only drug deletion (§4.8).
Scope of experiments
- The test set is 100 visits from single-center MIMIC-IV; hyperparameter sweeps use a separate 200-case held-out pool (§4.1, Appendix A.9).
- There are 4 supervised baselines: LEAP, RETAIN, GAMENet, SafeDrug; all 6 LLM baselines are on the GLM-5 backbone (§4.1).
- Cross-backbone experiments cover 6 backbones (3 closed-source, 3 open-source, Table 6); main results are repeated over 6 runs.
- Quality review is done by two LLM judges, GLM-5 and GPT-4o; the paper does not report agreement with human review; the GLM-5 judge is in the same family as the SEMPA inference engine, and the authors say the GPT-4o replication of rankings reduces self-preference concerns (§4.4).
- The safety audit covers AGS 2023 Beers criteria and STOPP/START 3.0 in addition to DrugBank DDI (§4.2, Appendix A.14).
Summarize the main content of the paper
SEMPA performs drug recommendation via training-free dual-role debate plus policy evolution, and on 100 MIMIC-IV cases it outperforms supervised baselines on four metrics.
A paper on an agent framework for clinical drug recommendation. Addressing the problems that supervised models are frozen after deployment and lack reasoning traces, and that existing LLM pipelines are single-round and single-role with no cross-case learning, the authors propose a training-free framework, SEMPA.
- Method: the same LLM plays Proposer and Critic in multi-round adversarial debate; molecule-aware retrieval fuses knowledge-graph topology with SMILES-level Tanimoto similarity; natural-language policies are rewritten by contrast between success/failure pools and kept from drifting with a semantic anchor; finally prescriptions are assembled through rule-based DDI and contraindication checks, with no parameter updates throughout.
- Main results: on 100 MIMIC-IV cases, Jaccard 0.3116, F1 0.7295 (ATC-3 class matching), DDI rate 0.0172; the authors say F1 is 57.7% higher than the strongest supervised baseline SafeDrug and DDI is 77.5% lower, while acknowledging that the numbers from the two matching protocols are not directly comparable (Table 1, §4.2).
- Other evidence: two LLM judges, GLM-5 and GPT-4o, both rank SEMPA first on six dimensions (Table 3); the trend is consistent across six backbones (Table 6); ablation shows the self-debate module contributes most, with Jaccard dropping 40.1% when removed (Table 5).
- Cost and failure modes: latency is 38.7s per case (SafeDrug 0.4s); among the 23 cases with Jaccard < 0.20, the main issues are coverage gaps for rare diseases, over-cautious drug deletion, and unresolved guideline conflicts (§4.8–4.9).
- Authors' conclusion: the gains come from the framework rather than a specific model; the authors also emphasize that generalization is unverified and policies cannot be formally verified, that prospective clinician-in-the-loop evaluation is needed before clinical use, and that the system is positioned as decision support rather than autonomous prescribing.