High-stakes vertical medical tasks, such as postoperative pathological staging and long-term survival prediction, demand multi-step clinical reasoning over heterogeneous evidence under weak supervision and high outcome uncertainty. While we first orchestrate CliAgent, a domain-tailored clinical agent workflow that systematically grounds predictions in multi-modal patient evidence, manually designed medical agents remain constrained by static, brittle rules. Moreover, existing recursive self-improvement (RSI) methods suffer from feedback ambiguity and severe development-set overfitting when evolving agents in high-noise medical domains. Focusing on improving the improver, we propose Semantic PID-RSI, an evidence-guided control-theoretic framework for medical agent self-improvement. Inspired by PID control, our improver evaluates candidate modification batches via three diagnostic roles: P isolates current clinical failure modes, I synthesizes longitudinal evidence from past trials, and D estimates response dynamics and regression risks (D-pre/D-post). Selected plans are compiled into behavior contracts for staged probing and independent adoption judging. Instantiated and validated on challenging oncology tasks (pT/pN staging and survival prognosis), evolving CliAgent with Semantic PID-RSI on a 3B-activated open-weight model achieves substantial gains (up to +6.27 C-index points), outperforming overfitting-prone RSI baselines and approaching the performance of frontier proprietary models (e.g., GPT-6 series) equipped with CliAgent.
Figures & tables
Figure 1: Overview of Semantic PID-RSI. Initialized with the multi-modal CliAgent workflow ( h0 ), each optimization round proposes candidate modification plans {ci} and evaluates them in parallel via Proportional (P, current errors), Integral (I, trial history), and Derivative (D-pre, response and regression risk) analyses. The selected plan c∗ undergoes contract-constrained editing and staged evaluation, followed by a post-evaluation audit (D-post) and an independent adoption judgment to update the incumbent program h^ and enrich the longitudinal research history.
Method
Development
Held-out test
pT AUC ↑
pN AUC ↑
C-index ↑
Avg. ↑
pT AUC ↑
pN AUC ↑
C-index ↑
Avg. ↑
Small LLM + pure LLM mode
Qwen3.6-35B-A3B
-
-
-
-
78.76
65.79
63.07
69.21
Qwen3.8-27B
-
-
-
-
78.92
68.09
68.13
71.71
Qwen3.8-Flash
-
-
-
-
77.85
68.72
67.72
71.43
DeepSeek-V4.1-Flash
-
-
-
-
79.42
67.94
66.40
71.25
Table 1: Main comparison on the development and held-out test sets ( ×100 ). Metrics include pT AUC (T3/T4 vs. T1/T2), pN AUC (N+ vs. N0), full-follow-up C-index, and their mean (Avg.). Pure LLM and fixed CliAgent baselines are evaluated on the test set only, whereas RSI methods are optimized on the development set first. Bold Δ entries denote gains of PID-RSI over our initial model H0 (+2.92 Avg., +6.27 C-index).
Figure 2: An adopted revision in Semantic PID-RSI. Adding two bone-window views while preserving existing images improves the development-set C-index by 0.97 points. The judge adopts the revision while retaining the attribution limits identified by D-post.
Method
pT ↑
pN ↑
H0
69.18
57.39
PID-RSI
75.19
66.17
Δ
+6.01
+8.78
Table 2: External evaluation on the OOD cohort ( n=50 ).
Role
H0
w/o P
w/o I
w/o D
Full PID-RSI
P
×
×
✓
✓
✓
I
×
✓
×
✓
✓
D
×
✓
✓
×
✓
C-index ↑
59.11
60.59
60.15
63.24
65.38
Table 3: Ablation of Semantic PID roles on prognosis prediction. Checkmarks indicate enabled roles, and H0 denotes the initial model before optimization. C-index is evaluated over the full follow-up.
Figure 3: Kaplan–Meier curves for the prognosis ablation study. Results are shown for (a) w/o P, (b) w/o I, (c) w/o D, and (d) the full model. Blue and orange curves represent the lowest and highest predicted-risk quartiles, respectively, with cutoffs computed separately for each setting on the common held-out cohort ( n=108 ). Intermediate-risk patients are omitted from these plots, and tied scores are kept together. Shaded regions indicate 95% pointwise confidence intervals, and crosses mark censored observations. Risk grouping is post hoc and exploratory.
Figure 4: Survival optimization trajectory across search rounds. Orange and blue curves denote development and held-out test full-follow-up C-index, respectively, from initialization ( H0 , Round 0) to Round 18. Dashed lines with hollow markers show raw candidate scores at each round (‘raw’), while bold solid curves depict smoothed progression trends (‘fitted’). Despite exploratory fluctuations (e.g., Round 8), both development and test trends rise consistently without divergence, reaching the final adopted program at Round 16 (Dev: 0.6726, Test: 0.6538 vs. 0.5911 at Round 0).
Medical agents built on large language models (LLMs) have advanced rapidly, yet most stay fixed once deployed and do not keep using their experience to improve later attempts. As a result, the same kind of error can recur across patients. To address this, existing self-improvement methods update an agent's weights or its medical harness from its own experience, but their improving strategy stays fixed and never learns which changes actually help, which caps how much the agent can improve. Recursive self-improvement (RSI) instead improves both the agent and its improving strategy. However, achieving RSI for medical agents is challenging, because clinical workflows rarely come with a reference harness, and a change that fixes early errors may not fix the problems the agent meets later. We propose MedicalRSI, an RSI framework built on Clinical Model-Harness Co-Evolution, in which one model plays two roles. The Solver is the medical agent itself, and the Improver is its learnable improving strategy, which writes a medical harness from the agent's failures. Each harness is rewarded by its gain over acting without it, and both roles are trained together, so the Improver keeps adapting to the problems the Solver has not yet solved. On multiple benchmarks and LLM backbones, MedicalRSI outperforms existing context-level and weight-level self-improvement methods and transfers well to unseen workflows, new LLMs and new databases, a step toward medical agents that keep improving.
Ziqing Wang, Hamid Palangi, Lili Zhao +1
Northwestern University · University of Washington
Medical agents increasingly combine general reasoning models with specialized clinical tools, yet their capabilities remain largely fixed by what clinicians and engineers design before deployment. Recursive self-improvement (RSI) offers a different paradigm in which agents learn from their own failures and autonomously expand their capabilities, but directly applying RSI to medicine introduces fundamental safety challenges. We introduce MedRSI, the first recursive self-improvement framework for medicine, which continuously transforms diagnostic failures into new clinical capabilities through tool composition and task-specific model training. Inspired by clinical practice, MedRSI introduces two mechanisms for clinically aligned self-evolution. Clinical-cost-aware failure prioritization directs improvement toward errors according to their potential clinical consequences rather than frequency alone. Fast discovery with slow registration separates rapid capability invention from conservative adoption, allowing new tools to enter the persistent agent only after demonstrating sustained benefit across subsequent patient cohorts. Across public glaucoma and heart disease benchmarks and two private clinical tasks, MedRSI progressively develops segmentation, measurement, prediction, multimodal reasoning, and generative capabilities, surpasses manually engineered medical agents, and autonomously discovers solutions to clinical problems not anticipated by its original designers. Our results show that medical agents need not remain constrained by capabilities specified before deployment: with clinically grounded mechanisms governing what to improve and what to retain, they can continuously construct, validate, and accumulate new capabilities from diagnostic experience. Code is available at https://github.com/ImprintLab/MedRSI.
Long-horizon agents are beginning to automate complete workflows that produce code, reports, and research artifacts. Medical imaging workflows are multi-stage and data-sensitive, while expert trajectories remain scarce and difficult to share. Structured benchmarks can localize failures through stage-level rubrics, but standard post-training discards these diagnostics before the next training round. We present Benchmark-as-Teacher (BaT), a recursive self-improvement system for agent post-training. BaT contains two linked components: the asynchronous Stage Bank data pipeline and BiCuRL (Bilevel Curriculum Reinforcement Learning), its self-improving post-training method. Stage Bank synthesizes content-isolated training states outside the policy-update loop. BiCuRL uses a fixed held-out evaluation to select the next stage curriculum, verifies rollouts with task rubrics, updates the policy with GRPO, and returns the candidate checkpoint to evaluation. On AutoMedBench-Lite, BaT-4B and BaT-9B more than double the Overall scores of their Qwen Instruct baselines. BaT-9B Agent reaches 79.6 Overall, exceeding Claude Opus 4.6 with Claude Code at 77.5.