acceptodds
Under review as a conference paper at ICLR 2027

TRIM: Learning to Streamline Medical Agent Workflows with Diagnostic Process Forests

Abstract

Medical agents must decide when to gather more evidence and when to answer. We present TRIM (Tree-Reinforced Intervention for Medical agents), a controller that learns these decisions while keeping the host agent frozen. It can continue the pending operation, finish with an existing answer, jump to a permitted later stage, or request another operation. Diagnostic Process Forests (DPForests) index past executions by workflow position and record each action’s error rate, cost saving, and support. The controller reads these statistics alongside the current case and scores all legal actions in one forward pass. On DiagGym with 827 held-out MIMIC-IV patients, TRIM reaches 56.71% diagnostic accuracy versus 51.39% for the native agent, with 59.9% fewer examinations and 52.0% fewer model calls. Across 14 host–dataset pairs covering text, image, and multimodal tasks, SFT+GRPO reduces model calls by 32.6% on average. No pair loses accuracy or mean balanced accuracy. Savings depend on the host: repeated discussions leave room for early stopping, while workflows that produce a usable answer only in their final call change little.

Primary area:
applications to physical sciences (physics, chemistry, biology, etc.)
Keywords:
Medical Agent, Diagnostic Workflow Optimization, Interpretable Tree Structures

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 3 reviews, above 27% of the others.
Reviewer_EzYAOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

The paper proposes TRIM, a 7B LoRA controller that intervenes in a frozen medical agent’s workflow by choosing among CONTINUE, FINISH, JUMP and REQUEST at host-defined decision points. It reads statistics from a “Diagnostic Process Forest”, which indexes the host’s labeled past executions by workflow position and stores each action’s error rate, cost saving and support. Training uses SFT on the cheapest correct historical paths, then GRPO with a correctness-first, cost-second reward. On DiagGym, accuracy rises from 51.39% to 56.71% with 52.0% fewer model calls. Across 14 host–dataset pairs on MedQA, SLAKE-En and MIMIC-CXR, calls fall by 32.6% on average with no accuracy loss. The only baselines are the native workflow and an untrained “forest-only” controller.

Critical strengths
  1. A meaningful decision problem with a practical, host-agnostic formulation. Deciding when the evidence is sufficient and when to keep gathering it is a real problem for diagnostic agents, and current multi-agent systems clearly over-deliberate.
  2. Transparent accounting and failure analysis. The appendix separates host and controller decisions and calls, uses group-disjoint retrieval to avoid leakage, reports where the method does not help (MedRAX, MMedAgent) and why, and discloses confounds such as the MedAgents/SLAKE readout bug.
Critical weaknesses

W1. Incremental novelty, obscured by inconsistent terminology

  1. Prior work: Learned controllers over frozen agents with cost-aware RL already exist. 1) Puppeteer (Dang et al., “Multi-Agent Collaboration via Evolving Orchestration,” NeurIPS 2025) trains an orchestrator to select the next agent, rewarding correctness minus λ·cost. 2) ToolOrchestra (Su et al., ICML 2026) trains an 8B orchestrator with outcome and efficiency rewards to choose models and tools at each turn. Neither is cited, and Yi & Song (2026) is cited but not differentiated.
  2. DPForest contribution: The forest statistics alone barely help (forest-only on DiagGym: +0.85 pts, −1.3% calls), and no trained controller without them is reported.
  3. “Tree”: Host workflows are sequences (Sec. 3.1), and nearly all cases share one path (support 10,176/10,178, Table 8). The structure is a prefix-keyed lookup table (App. B.1).
  4. “Forest”: There is one tree per task root, but the root is defined only for DiagGym.
  5. “Host”: The term refers variously to an agent, a model, a runtime and an environment.

W2. The experiments do not test the claimed problem, and the cost claims are incomplete

  1. Task mismatch: MedQA and SLAKE are knowledge-based QA with all information given upfront, so the “decisions” reduce to early stopping of multi-agent discussion. DiagGym, the only sequential-diagnosis setting, offers just two exams (CBC, lipase).
  2. Missing baselines: There is no agreement-based stopping, cascade/router or efficient-MAS baseline.
  3. Confounds: Native multi-agent runs are not matched reruns (App. D.2), and 17.4 of the 22.5-point MedAgents/SLAKE gain comes from bypassing a host bug.
  4. Hidden cost: All cost figures exclude labeled trajectory collection (≈376k MedAgents calls on MedQA; ≈0.5B tokens for MedAgent-Pro) and up to ~16k GRPO rollouts per pair. Latency is estimated, not measured.
Questions for authors
  1. How does TRIM differ, conceptually and empirically, from Puppeteer, ToolOrchestra and Yi & Song (2026)? Please report the same SFT+GRPO controller trained without forest statistics, to isolate the DPForest’s contribution.
  2. The single-pass scorer “follows” the System One model of Almeida (2026), a blog post released on September 15, 2026, three days before the ICLR abstract deadline. Was this design adopted after that date, and were all reported runs trained with it? If it was developed independently, what does the citation add beyond a standard candidate-scoring head (as in reward models or multiple-choice heads)?
  3. What is the total offline cost per pair (calls, tokens, GPU-hours) of trajectory collection, labeling, synonym merging and GRPO rollouts, and after how many test queries does TRIM break even against the native host? Most agent frameworks do not require labeled historical trajectories; how would TRIM work when ground-truth labels are delayed or unavailable?
  4. If an off-the-shelf decision model motivates the controller, why is SFT+GRPO needed? GRPO adds only +0.94 points and 13.6% fewer calls over SFT on average, and JUMP/REQUEST are rare (18 and 62 across 827 patients). Would a zero-shot decision model, or a lightweight classifier on forest statistics, match these results?
  5. What is the task root for the 14 non-DiagGym pairs, how many trees does each forest contain, and how many nodes have more than one child? Please define “host” once and use it consistently.
  6. Can you rerun Native under the same generation settings as the controlled conditions and report confidence intervals?
7 comments
AuthorsOpenReview ↗

Rebuttal for EzYA on Critical Weaknesses

We thank the reviewer for the detailed feedback and for recognizing TRIM’s practical, host-agnostic formulation and failure analysis. The suggested references and comments on terminology and cost have helped us clarify TRIM’s positioning and evaluation. We address each weakness (W) and question (Q) below.

W1.1. Relation to prior work. TRIM addresses a different problem: improving an existing functioning agent’s workflow instead of building a new one. Puppeteer learns which agent to activate next, while ToolOrchestra learns to select and invoke models and tools. Yi & Song (2026) learn a general harness control layer from offline rollouts, without historical evidence tied to specific workflow positions. In contrast, our TRIM operates within an existing host’s workflow and legal transitions, learning when to continue, stop, skip a stage, or request an additional operation while keeping the host’s models frozen. Its distinguishing feature is the combination of workflow-indexed historical evidence and a learned intervention policy for existing medical agents. To our knowledge, TRIM is the first framework to combine workflow-indexed historical evidence with learned runtime interventions for existing medical-agent workflows. We have expanded Related Work to clarify these distinctions.

W1.2. DPForest contribution.

  • We have added the requested ablation in Table 2: the same SFT+GRPO controller trained without forest statistics, while retaining the training data and legal candidates (Table 2). On DiagGym, it achieves Q = 56.47% at M = 2.785, compared with 56.71% at M = 2.597 with statistics. Thus, the statistics provide a small difference in accuracy (56.71% vs. 56.47%) and lower cost (M 2.597 vs. 2.785).
  • DPForest also organizes evaluated historical trajectories to derive SFT targets, a role retained in this ablation. Without SFT initialization, direct GRPO converges to the same examination sequence for every patient with or without statistics (lipase, CBC, then FINISH; M = 5). These results distinguish the benefit of historical supervision from the additional benefit of statistical inputs.

W1.3-W1.5. “Tree”, “Forest”, and “Host”.

  • A DPTree is indeed a prefix tree over completed operation types, with nodes indexing workflow positions. We agree that shared execution paths can make this structure largely linear; its role is to organize historical evidence rather than introduce a new tree structure. Each node stores action support, empirical error rates, and cost savings. Roots are task-specific: DiagGym uses verified primary clinical manifestations, while the other benchmarks use implicit task roots, with separate roots for target findings where applicable (Appendix B.1). We have provided a detailed check list in Table 5.
  • We define “host” as the existing agent system being optimized, including its workflow, frozen models, and runtime. We have clarified these definitions at the start of the Method section and revised the terminology consistently throughout.

W2.1. Task mismatch. We agree that on MedQA and SLAKE, where all information is given upfront, control reduces mainly to stopping multi-agent deliberation. Such QA stopping is also a core target of TRIM: repeated discussion accounts for most of these hosts’ cost (e.g., 26.9 of 36.91 calls per question on MedAgents/MedQA go to voting, revision, and readout; Appendix F.3). Sequential evidence gathering is evaluated in two settings. DiagGym provides verified outcomes for every examination path; its two examinations are a limitation, but they allow every path to be enumerated and analyzed (Figure 3, Table 2). MedAgent-Pro on CXR provides a longer tool-based workflow, checking guideline-derived indicators one at a time across 12 findings with 40 calls per native study, where TRIM reduces M to 28.14 while raising balanced accuracy from 85.38% to 88.50%. We acknowledge that richer sequential-diagnosis benchmarks would further strengthen the evaluation.

W2.2. Missing baselines. Since TRIM optimizes an existing agent, we compare it with that host’s native workflow, including its built-in stopping and routing mechanisms. These include unanimous approval in MedAgents, weighted voting in ReConcile, and consensus checks in DyLAN; TRIM reduces calls across all three (Table 3). DiagGym and MedAgent-Pro additionally evaluate control of sequential evidence gathering. These comparisons assess TRIM’s added value over existing host mechanisms. TRIM is complementary to routing and cascading rather than a replacement for them. We have not compared against general-purpose model cascades or routers such as FrugalGPT or RouteLLM, which choose among models rather than control steps within a single agent’s workflow.

AuthorsOpenReview ↗

Rebuttal for EzYA on Critical Weaknesses

W2.3. Confounds.

  • Within each host–dataset pair, Native and all controlled conditions use the same official host configuration and evaluator. We have clarified this in Appendix D.2.
  • We acknowledge that much of the MedAgents/SLAKE gain comes from bypassing a native readout defect: it incorrectly applies a yes/no instruction to 290 of 645 open-ended questions, achieving only 2.4% accuracy on this subset. Returning the existing synthesized report with forest-only stopping achieves 66.2%, accounting for 17.4 percentage points of the overall gain. This illustrates a practical benefit of workflow control, although the gain is specific to this host defect. We retain the native prompts unchanged and report that, excluding this pair, the average accuracy gain across the remaining 13 pairs is still 3.06 percentage points.

W2.4. Offline cost and latency. We now report the full offline cost per host–dataset pair, including native trajectory collection, answer labeling, synonym merging, and GRPO rollouts (Table 11; see Q3). Trajectory collection executes the native host on the fitting split; suitable existing logs can be reused when available. These one-time preparation and training costs are reported separately from online inference costs. We have also verified inference times against recorded execution logs and revised the corresponding tables and text (Tables 1 and 9, Appendix F.1).

AuthorsOpenReview ↗

Rebuttal for EzYA on Questions

Q1. Prior work and the DPForest ablation. See W1.1 and W1.2.

Q2. Relation to Almeida (2026). TRIM’s single-pass scorer was developed independently before Almeida (2026) appeared, and all results in Tables 1–3 use this design. At each decision point, the host exposes a finite set of legal actions that the controller scores in one forward pass. The citation denotes conceptual similarity, not design provenance; we have revised the corresponding sentences in the Introduction and Related Work. The scoring head is standard, as in reward models and multiple-choice classifiers. Our contribution is the history-grounded framework for optimizing existing agent workflows, rather than the scoring head itself.

Q3. Offline cost, break-even, and labels.

  • TRIM optimizes an existing agent rather than solving tasks on its own, so its offline setup depends on the host. Historical trajectories are collected by running the original host on the fitting cases with its configuration unchanged. Together with reference-based evaluation of the final answers, these executions provide TRIM’s evidence and supervision; no step-level intervention labels are required, only the correctness of final answers. The collection cost per case therefore equals the host’s native cost, whose mean tokens and time are reported in Table 9. We measured the remaining offline cost for each pair in Table 11 (calls, tokens, and GPU-s for labeling, synonym merging, and GRPO). All of these costs are paid once per host–dataset pair, whereas the savings recur on every query. The break-even point therefore depends on how often the optimized host is used: the more queries it serves, the more the one-time cost is amortized.
  • When labels are delayed, TRIM can be refitted as they arrive, since it uses them only offline; in clinical settings, labels such as discharge diagnoses arrive naturally after each admission. Labels are also a prerequisite for the host itself: medical agents are developed and validated on labeled data, and TRIM uses the same reference labels.
  • Break-Even: We computed the break-even point in host and tool calls according to the Table 11 offline cost. Dividing each pair’s total offline calls by the per-query reduction in M gives the following. Full TRIM (SFT+GRPO) breaks even after about 1.1×10⁵ queries on MedAgent-Pro/CXR and 2.4×10⁵ on MedAgents/SLAKE, up to 1.8×10⁶ on MDAgents/MedQA. The median over the 13 pairs with savings is 7.2×10⁵, or 42–264 times the size of the fitting set. These figures exclude trajectory collection when existing logs can be reused; including it adds at most 4%. Most of this cost comes from GRPO, which accounts for 92–97% of offline compute but mainly buys accuracy, not further savings. On DiagGym, GRPO reduces M by only 0.086 relative to SFT, yet raises accuracy by 3.14 points. SFT alone breaks even far sooner, at 1.9–27 times the fitting-set size including trajectory collection. That is about 1.9×10⁴ queries on MedAgents/MedQA and 1.2×10⁴ on MedAgents/SLAKE. It keeps most of the call reduction: on DiagGym it reaches 50.4% of the 52.0% achieved by SFT+GRPO. Practitioners can therefore choose SFT for fast amortization, or SFT+GRPO when the additional accuracy justifies a longer deployment. Two caveats apply. Controller forwards are excluded on both sides: each is one scoring pass without generation. On pairs where online tokens increase, most notably DiagGym (4,028 to 8,382), there is no token-based break-even, and the savings show up in host calls and measured latency instead. MedRAX and MMedAgent never break even because TRIM barely changes their workflows. We have added the per-pair values to Appendix F.6.

Q4. Why SFT+GRPO.

  • Neither a zero-shot decision model nor a rule on forest statistics matches the trained controller on DiagGym (Table 1). A threshold rule on forest statistics (Forest-T) barely changes the native run (52.24%, M = 5.336). Prompting the untrained backbone with the same evidence (Forest-P) reaches 52.84% at M = 3.944, and general-purpose backbones do worse: Qwen2.5-7B falls below native accuracy (51.15%), and Qwen2.5-1.5B executes both examinations for every patient (M = 5). After SFT+GRPO, all three backbones reach 56.59–56.95% at about half the native calls (Table 10).
  • GRPO’s gain is largest where intervention actions matter: on DiagGym it raises accuracy from 53.57% to 56.71%. The 18 jumps and 62 requests counted earlier understate this. The controller issues 398 requests in total: 62 add an examination absent from the native run, and the other 336 change the order of examinations the native run also performs. Order matters because the frozen host reads results sequentially: ordering lipase before CBC alone raises accuracy from 54.05% to 56.59% (Appendix F.5). Accordingly, masking REQUEST lowers accuracy by 2.54 points, and masking JUMP by 0.60 points (Table 2).
Reviewer_8hqZOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

TRIM freezes an existing medical agent/workflow and trains a separate controller to decide whether to continue, return an existing answer, jump to a later workflow stage, or request an additional operation. A Diagnostic Process Forest (DPForest) aggregates historical action outcomes at workflow positions, including support, error rate, and cost savings. The controller is first trained with SFT on low-cost correct historical continuation/stopping paths, then with GRPO over the expanded action space. On 827 DiagGym test patients, accuracy increases from 51.39% to 56.71% while the paper’s model-call metric M decreases from 5.406 to 2.597. Across 14 additional host–dataset pairs, the reported average reduction in M is 32.6%.

Critical strengths
  1. The paper develops a concrete framework for controlling existing medical-agent workflows without modifying the host model. TRIM introduces a common action interface—CONTINUE, FINISH, JUMP, and REQUEST—and applies it to several substantially different agent architectures. This provides a relatively unified formulation of workflow-level intervention across sequential diagnosis, multi-agent discussion, tool use, and multimodal settings.
  2. The paper makes a substantial effort to construct supervision from historical executions rather than assuming outcomes for unobserved branches. The SFT stage uses evaluated continuation and stopping paths, while JUMP and REQUEST are explored through actual rollouts during RL. The paper also describes group-level exclusion during fitting-time forest retrieval and separates answer eligibility from answer correctness.
  3. The experimental scope is broad. In addition to the DiagGym study, the method is evaluated on 14 host–dataset pairs spanning text, chest radiographs, and multimodal VQA, including several different multi-agent and tool-using systems. The results also illustrate an important practical limitation: workflows such as MedRAX and MMedAgent provide little opportunity for early intervention because a returnable answer only becomes available near the end.
Critical weaknesses
  1. The experiments establish the performance of the complete pipeline more clearly than the contribution of its individual components. In MedAgents/MedQA, the SFT controller stops every test question before the consensus vote, so this result does not establish a benefit from case-specific stopping. Moreover, SFT+GRPO changes both the training procedure and the available action space, and the contribution of DPForest statistics is not isolated. These limitations restrict component-level attribution; my primary concern is whether the overall accuracy–cost gains persist under matched evaluation.

  2. Some multi-host accuracy improvements are difficult to attribute cleanly to TRIM. Appendix D.2 states that the Native results are separate reference runs with different generation settings and concurrency rather than matched reruns. Appendix F.2 further reports cases in which the host context changed even when no shortcut was taken. The MedAgents/SLAKE result is also strongly affected by a native readout that omits the question; the paper attributes 17.4 percentage points of the approximately 22.5-point forest-only gain to bypassing this issue. These factors limit causal attribution of the reported gains to the proposed control mechanism. Matched Native reruns and a corrected MedAgents/SLAKE baseline would substantially strengthen this comparison.

  3. The reduction in the model-call metric M does not directly establish end-to-end computational savings. Controller forwards are excluded from M, and DiagGym diagnosis-group matching is recorded separately. On DiagGym, online token usage increases from 4,028 to 8,382 despite the reduction in M. In addition, the main timing analysis is based on interpolation or scaling from historical references rather than matched measurements. The evidence therefore supports a reduction in the paper’s call-count metric, but does not yet establish a comparable reduction in end-to-end latency or compute.

Questions for authors
  1. On MedAgents/MedQA, can the authors compare the full TRIM system with a simple fixed stopping rule selected using only the fitting split, such as returning the synthesized answer before the consensus vote? Please use matched host and evaluation settings and compare accuracy and directly measured end-to-end latency, including controller overhead. This single comparison would help establish whether the additional training and inference complexity provides a meaningful benefit over straightforward workflow simplification.

  2. For MedAgents/SLAKE, can the authors provide a matched Native-versus-TRIM comparison after correcting the missing-question readout, using the same host model, base prompts, decoding settings, and evaluation procedure? What accuracy and call-count gains remain? This comparison would help distinguish the benefit of workflow control from the effect of bypassing a defective readout.

3 comments
AuthorsOpenReview ↗

Rebuttal for 8hqZ on Critical Weaknesses

We thank the reviewer for the constructive review and for recognizing the unified action interface and the breadth of the evaluation. We address each weakness (W) and question (Q) below.

W1. Component-level attribution.

  • (1) Case-specific stopping on MedAgents/MedQA. We agree that SFT there behaves like a fixed rule: it stops every question before the first vote (Q = 56.48%, M = 10.00). This rule already improves on Native (54.44%, M = 36.91). SFT+GRPO departs from it and stops earlier on some questions (D = 2.71 vs. 3.00), raising Q to 57.50% at M = 7.42. Case-specific stopping is shown more directly on DiagGym, where SFT answers 55% of patients without any examination and orders both for 37% (Figure 3).

  • (2) Training procedure vs. action space. Masking JUMP and REQUEST at test time separates the two. The SFT+GRPO controller then reaches 53.69% at M = 2.470, versus 53.57% at M = 2.683 for SFT (Table 2). With the same actions, GRPO mainly reduces cost; the added actions account for most of the accuracy gain (56.71% with them).

  • (3) DPForest statistics. The forest has two roles: it provides the decision points and targets for training, and it supplies node statistics as controller input. Removing the statistics while keeping the SFT targets yields Q = 56.47% at M = 2.785, versus 56.71% at M = 2.597 with them, a modest gain mainly in cost. Removing the first role leaves only direct RL. Without SFT, GRPO follows the same path for every patient (Lipase, CBC, then FINISH; M = 5), whereas the SFT-initialized controller stops case-specifically with 48% fewer calls at similar accuracy (Table 2). The forest thus contributes mainly through the supervision derived from it.

  • (4) Matched evaluation. All DiagGym conditions use the same host, decoding settings, seeds, and patients; under these settings TRIM raises Q from 51.39% to 56.71% and reduces M from 5.406 to 2.597. For the multi-host pairs, each host follows its official setting, and Native and all controlled conditions within a pair share that setting, the test items, and the evaluator.

W2. Attribution of multi-host gains. We have corrected three points in the original explanation.

  • (1) Native settings. “Different settings” in Appendix D.2 refers to differences across hosts, each of which follows its own official setting. Within each host–dataset pair, Native and all controlled conditions share the same host models, prompts, decoding settings, and evaluator, and differ only in controller intervention.

  • (2) Host context and shortcuts. Forest statistics and action candidates are provided only to the controller and are never inserted into host requests. The original statement that no shortcut was taken was incorrect: on MDAgents/MedQA, forest-only also takes shortcuts at positions other than the one listed in Table 8, reducing M from 11.67 to 11.28. We have corrected Appendix F.2.

  • (3) MedAgents/SLAKE readout defect. The native readout incorrectly applies a yes/no instruction to 290 of 645 open-ended questions, answering only 2.4% of them correctly. Bypassing this stage accounts for 17.4 of the 22.5-point forest-only gain. The remaining 5.1 points are consistent with historical evidence favoring stopping before the vote (26.62% error versus 50.79% for continuing). Excluding this pair entirely, the average accuracy gain across the other 13 pairs remains 3.06 points.

W3. End-to-end compute and latency. We have re-verified the reported inference times against the recorded measurements and clarified the timing protocol in Appendix F.1. End-to-end time is dominated by the host’s own calls, while controller forwards and forest lookups add little. On MedAgents/MedQA, for example, mean time per question falls from 149.96 s to 34.95 s (Appendix F.1). On DiagGym, the extra tokens are almost all prompt prefill, while each avoided host call removes its reasoning cost, so despite the token increase, median latency falls from 16.2 s to 6.2 s and mean latency from 16.36 s to 9.92 s (Tables 1 and 9). Since token counts are unavailable for some API and tool calls, we report latency as the end-to-end cost measure.

AuthorsOpenReview ↗

Rebuttal for 8hqZ on Questions

Q1. Fixed stopping on MedAgents/MedQA. SFT learns behavior closely matching the proposed simple fixed stopping rule: it stops nearly every question before the first vote and returns the synthesized report, achieving 56.48% accuracy at M = 10.00 under the same host configuration and evaluator. This is consistent with the fitting-split evidence, where stopping has lower historical error than continuing (44.71% vs. 46.64%; Table 8). Full TRIM further improves accuracy to 57.50% while reducing M to 7.42. Its measured mean latency, including controller forwards, is 34.95 s per question versus 149.96 s for Native (Appendix F.1).

Q2. Matched comparison on MedAgents/SLAKE. Native and controlled conditions use the same host models, prompts, decoding settings, and evaluator. As detailed in the response of W2, much of the gain comes from bypassing the unchanged native readout defect by returning the existing report.

AuthorsOpenReview ↗

Follow-up on Our Response to Your Review

Dear Reviewer,

Thank you for your detailed comments. We have posted a response addressing your specific concerns in the author response thread. We would greatly appreciate it if you could take a look at our response when you have a moment. If any part of our response is unclear, we would be happy to provide further clarification.

Thank you for your time and consideration.

Best regards, The Authors

Reviewer_eWkgOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper presents TRIM, a separately trained controller that decides at host-defined decision points of a frozen medical agent whether to CONTINUE the pending operation, FINISH with an answer the agent has already produced, JUMP to a registered later stage, or REQUEST one extra expert, tool, or examination call. Past native executions are indexed into Diagnostic Process Forests: one tree per task root, with each node keyed by (root, ordered prefix of completed operation types, pending operation type). For each executed action, a node stores support, empirical final-answer error, and mean cost saving. The controller is a LoRA-tuned 7B LLM with a bilinear candidate-scoring head. It reads the case, the node statistics, and the legal candidates, and scores all candidates in one forward pass. Training has two stages: 1. SFT on CONTINUE/FINISH targets taken from the cheapest correct historical path. 2. GRPO over the full action space, with an advantage that ranks every correct episode above every incorrect one and orders correct episodes by cost (Proposition 1). The result shows on MIMIC-IV(4 abdominal diseases, 827 test patients): accuracy rises from 51.39% to 56.71%, examinations fall 59.9%, and model calls fall 52.0%.

Critical strengths

TRIM leaves the medical model untouched, keeps the legal action set under the host's control, and always returns a valid action. That makes it a realistic add-on for existing agent systems.

The paper clearly shows when the method helps and when it doesn’t: it saves the most when agents keep discussing after they already have an answer

Honest reporting of where it fails: MedRAX and MMedAgent barely change because they produce an answer only at the end.

Critical weaknesses

Inconsistent Reward Quality Across Datasets in GRPO: Benchmark-Specific Evaluation Protocols.

Baselines are separate runs with different settings, so every accuracy comparison is inconsistent.

Stage 1 hides JUMP and REQUEST, leaving the controller with zero training or historical data for them. Stage 2 fixes this using an arbitrary 10% guess, then penalizes the model for straying from that guess. This flaw makes the controller hesitant to explore these actions, so it almost never uses them at test time. In Section 3.2 Statement, the authors explicitly note that "Both REQUEST and JUMP are rare" during test-time execution. Also, the Unvalidated Heuristic 10% target is a state-independent guess. No justification is provided for the 10% choice.

No Clinician Verification

"MedAgents saves the most work by stopping before the consensus vote and returning the synthesized report." What does this mean? It looks like a significant portion of TRIM's reported accuracy improvement is an artifact of skipping broken prompts in the baseline models. Explain it.

Although TRIM reduces model calls (MM) by 52% on DiagGym, total online tokens roughly DOUBLE from 4,028 to 8,382 tokens per case. Explain No of Calls Vs Number of tokens with a proper graph.

Questions for authors

“No pair loses accuracy” is overclaimed: MedRAX’s F1 drops from 64.57 to 64.36 (L021–022, L429, L474–475). Explain.

REQUEST is defined as leaving the pending step in place (L153–154), but Table 7 uses it to replace and skip the pending CBC (L1074–1079, L1093).

Total decisions D increase on DiagGym and 6 of the 14 pairs, contradicting the “fewer steps” framing (Table 1 L283–285, Fig. 4 L1222).

There is no ablation that removes the forest statistics, so the main contribution is never isolated; forest-only alone barely helps (L375–376).

DiagGym is narrow, with only 2 tests and 4 diseases, and the judge comes from the same model family as the host and the controller (L340–344, L1020–1024).

Table 8 says forest-only stops every MedAgents question at the vote, but Table 3 shows 19.05 calls vs. SFT’s 10.00 for the same stopping point (L1313 vs. L388, L446–447).

MedRAX’s “gain” occurs with no intervention at all and is noise between runs (L395–396, L465–467).

Figure 2(a) shows JUMP and REQUEST statistics that cannot exist, because native runs never record those actions (L175–177 vs. L213–214, L253–254).

The Appendix G diagrams contradict their own captions, and none of them shows the trained TRIM controller (L1413–1417, L1447–1452, Fig. 5 L1480–1482, Fig. 8 L1642–1643).

The abstract’s “827 held-out” clashes with an unused held-out partition in Appendix C (L018 vs. L1010–1016).

Without the sample dataset, it is not clear how the SFT dataset was created. Without the code given, it is also not clear how the dataset was prepared.

No out of distribution test results.

6 comments
AuthorsOpenReview ↗

Rebuttal for eWkg on Critical Weaknesses

We thank the reviewer for the detailed feedback and for recognizing TRIM’s value as an add-on to existing agents with frozen host models. The comments helped us identify and correct several inconsistencies and clarify the evaluation. We address each weakness (W) and question (Q) below.

W1. Benchmark-specific evaluation protocols in GRPO. We would like to clarify that TRIM uses the same correctness-first, cost-second objective across all tasks (Eq. 9). Each benchmark is scored by its own official evaluator, and each host–dataset pair is trained separately under that fixed evaluator, following the host’s official setting. GRPO compares episodes of the same case under this evaluator, so rewards from different benchmarks are never pooled or directly compared.

W2. Baselines are separate runs. We apologize for the unclear description. Native is the original host running without TRIM, using its released configuration and workflow. Within each host–dataset pair, all conditions use the same frozen host, test cases, and evaluator. TRIM changes only the workflow decisions. The conditions therefore require separate executions, but they are evaluated under the same experimental protocol.

W3. Infrequent use of JUMP&REQUEST and the 10% initialization.

  • (1) We would like to correct our earlier statement that both actions are rare. JUMP is rare, but REQUEST was used 398 times on DiagGym: 62 introduced examinations absent from the paired native run, while the remaining 336 changed the order of examinations that the native run also performs. These interventions are learned through RL because native trajectories contain no evaluated outcomes for them. SFT first establishes a stopping policy; our ablation shows that direct RL without SFT instead converges to a fixed examination sequence (Table 2).
  • (2) We use ρ = 0.1 as a starting probability for exploring JUMP and REQUEST, not a fixed usage target. Their biases remain trainable, with no probability floor. The KL reference already includes this initial probability, so it regularizes departures from the starting policy rather than pushing these actions toward zero (Appendix A.4–A.5).

W4. Clinician verification. Clinician verification is beyond the scope of this study, which focuses on optimizing the workflows of existing medical agents. TRIM keeps the host’s medical models frozen and does not alter their clinical reasoning; it only changes which host operations run. We evaluate how these workflow changes affect benchmark accuracy and cost, while the original host’s clinical capability remains unchanged.

W5 & Q6. Stopping before the consensus vote.

  • (1) MedAgents synthesizes expert analyses into a report, runs up to three voting-and-revision rounds, and converts the report into a short final answer. FINISH returns the current report, skipping subsequent voting and final-answer generation. In Table 8, “consensus vote” identifies the pending operation, not the round: SFT stops nearly every MedQA question before the first vote (M = 10.00), whereas forest-only often stops after one or two rounds (M = 19.05).
  • (2) We acknowledge that much of the SLAKE improvement comes from bypassing a failure in native final-answer generation. The native final-answer stage of SLAKE incorrectly applied a YES/NO instruction to open-ended questions, reducing a potentially informative report to an inappropriate binary answer. TRIM can bypass this stage by returning the existing report through FINISH. Among 290 affected questions, native accuracy is 2.4%, versus 66.2% with forest-only stopping, accounting for 17.4 of the overall 22.5-point gain. We have clarified this in Appendix F.3.

W6. Model calls vs. tokens. Token count alone does not reflect execution cost, because controller scoring and host generation involve different computation. On DiagGym, online tokens increase from 4,028 to 8,382 per case because the controller reads the case state, forest statistics, and legal candidates at each decision. These added tokens are almost entirely prompt tokens: the controller scores all candidates in a single forward pass and generates no text. In contrast, each host call that TRIM avoids would have required autoregressive generation of diagnostic reasoning, which dominates latency. Fewer model calls therefore mean less generation, even when total tokens rise. Controller forwards are counted in D rather than M, and their overhead is included in the reported tokens and latency. Despite the token increase, median latency falls from 16.2 s to 6.2 s and mean latency from 16.36 s to 9.92 s (Tables 1 and 9).

AuthorsOpenReview ↗

Rebuttal for eWkg on Questions

Q1 & Q7. “No pair loses accuracy” and the MedRAX result. We agree that our original statement was too broad. MedRAX’s F1 decreases slightly (64.57% to 64.36%), while mean balanced accuracy increases slightly (66.00% to 66.22%). Because MedRAX produces a returnable answer only at its final stage, TRIM intervenes in very few cases. Disabling these interventions yields Q, D, and M identical to Native, indicating that the small differences arise from those interventions rather than variation between runs. We have revised the claim and avoided presenting MedRAX as a meaningful improvement.

Q2. REQUEST case in Table 7. We have revised Table 7 to clarify two cases. In case 1, JUMP skips the pending lipase test. In Case 2, REQUEST (lipase) adds the test and returns control to the host, which proposes CBC again. The controller then selects FINISH, leaving CBC unexecuted. Thus, REQUEST does not replace or skip CBC, consistent with Sec. 3.1.

Q3. Total decisions D. D counts both host workflow choices and controller decisions, so adding TRIM can increase D even when host calls (M) decrease. Our call-reduction claims concern M, which decreases on DiagGym and 13 of the 14 host-dataset pairs. We have replaced the “Steps ↓” with “Calls ↓” in Fig. 1 to make this distinction explicit.

Q4. Isolating the forest statistics. We have added this ablation (Table 2). The forest has two roles: it provides the decision points and targets for training, and it supplies node statistics prompts as controller input. Removing the statistics prompt while keeping the SFT targets yields Q = 56.47% at M = 2.785, versus 56.71% at M = 2.597 with them, a modest gain mainly in cost. Removing the first role leaves only direct RL. Without SFT, GRPO follows the same path for every patient (Lipase, CBC, then FINISH; M = 5), whereas the SFT-initialized controller stops case-specifically with 48% fewer calls at similar accuracy. The forest thus contributes mainly through the supervision derived from it.

Q5. Scope of DiagGym and the judge.

  • (1) DiagGym provides a controlled setting in which four diseases and two examinations allow detailed analysis of workflow decisions (Figure 3, Table 2). We assess broader applicability on 14 additional host–dataset pairs spanning different architectures and modalities (Table 3).
  • (2) The host and judge follow the original benchmark configurations, and the same judge scores all conditions. To test the role of initialization, we replace the judge-initialized controller with general-purpose Qwen2.5-7B or Qwen2.5-1.5B (Table 10). A suitable initialization gives the controller case-specific inference ability before training. Untrained, the default controller already improves on native (52.84% at M = 3.944), whereas Qwen2.5-7B falls below native accuracy and Qwen2.5-1.5B performs both examinations for every patient (M = 5). After SFT, the default remains about one point more accurate, and SFT+GRPO closes this gap (56.95% and 56.59% vs. 56.71%). A better initialization thus provides stronger task understanding and more case-specific decisions, while training enables general-purpose backbones to reach comparable performance.

Q6. Stopping before the consensus vote. See W5.

Q7. “No pair loses accuracy” and the MedRAX result. See Q1.

Q8. JUMP and REQUEST statistics in Fig. 2 (a). Thank you for identifying this inconsistency. We have corrected Fig. 2 (a) to mark historical statistics for JUMP and REQUEST as unavailable, since neither action occurs in native executions.

Q9. Appendix G. We have revised the captions to clarify that each figure shows native workflow paths recorded in the forest, while the right panel shows the trained SFT+GRPO controller’s trajectory for the illustrated case. Table 17 compares its execution cost with Native.

Q10. “827 held-out” in the abstract. We now use “827 test patients” consistently. As detailed in Appendix C.2, eligible patients are divided into training, development, and test partitions. The development partition is unused; the 827 patients constitute the test partition after eligibility filtering. We have clarified this distinction in Section 4.1.

Q11. SFT dataset & Code release. SFT records are derived from native-host executions (Sections 3.2–3.3, Appendix A.2). A host call becomes a decision point when its legal set contains an action besides CONTINUE: FINISH if an answer already exists, JUMP if a later operation’s inputs are available, or REQUEST if a catalog operation can be added. Since native runs never jump or request, SFT uses only CONTINUE and FINISH. Each record stores the state (Eq. 1), node statistics (Eqs. 2–4), and legal candidates, and its target is the first action on the lowest-cost correct path (Eq. 7). Meanwhile, we have updated Appendix G, and added Appendix F.8 cases, to better illustrate theTRIM process and forest information. We will release the data-preparation code and sample SFT records upon acceptance.

AuthorsOpenReview ↗

Rebuttal for eWkg on Questions

Q12. Out-of-distribution evaluation. Our model focuses on improving existing agents, therefore, its out-of-distribution (OOD) capability depends on the original agent itself. Our experiments assess TRIM’s applicability across hosts and tasks through DiagGym and 14 additional host–dataset pairs spanning different architectures and modalities. Each controller is trained separately and evaluated on disjoint test cases, showing that the same framework can optimize different host workflows.

Comments on the paper

1 comment

Dear Reviewers and ACs,

Thank you for your time and constructive feedback throughout the review and discussion. We especially thank Reviewer 8hqZ for confirming that our additional analyses addressed several of their concerns. In the revised manuscript, we have corrected inaccurate or unclear statements and added substantial new experiments and analyses, including:

  • DPForest ablations: removing the forest statistics and the forest-derived SFT supervision, to examine what the forest contributes (Table 2).
  • Additional cost columns: online tokens and inference time for every condition on DiagGym (Table 1).
  • Controller initialization: a comparison with different controller backbones (Table 10).
  • Offline cost: offline cost for each host–dataset pair and the resulting break-even points (Table 11, Appendix F.6)
  • Forest structure and terminology: definitions of forest terms and node contents (Table 5, Appendix B), and the number of trees and nodes in each forest (Table 12).
  • Controller inputs: the detailed components of the controller input, with DiagGym examples of the inputs and chosen actions at each decision point (Tables 13–15).
  • Confidence intervals and corrected baseline: 95% confidence intervals for all pairs, and a Native baseline on MedAgents/SLAKE with the readout defect fixed (Table 16, Appendix F.9).
  • Case studies: all case figures in Appendix G redrawn to show the trained controller’s trajectory, plus two new DiagGym cases illustrating JUMP and REQUEST (Appendix G.4–G.5, Table 17).

We briefly summarize the main concerns shared across reviewers:

  • Contribution of DPForest. The forest contributes mainly through the supervision it provides for training. Without it, cost-aware RL follows the same examination path for all 827 patients (M = 5.000 vs. 2.597). Feeding the forest statistics to the controller reduces cost further.
  • Fair comparison. Within each host–dataset pair, all conditions use the same host, test cases and evaluator. TRIM also outperforms a fixed early-stopping rule on MedAgents/MedQA (57.50% at M = 7.42 vs. 55.77% at M = 10.00). On MedAgents/SLAKE, it stays 5.09 and 7.54 points above the two corrected Native baselines.
  • Cost and the role of RL. Although online tokens increase on DiagGym, median latency drops from 16.2 s to 6.2 s. SFT alone gives most of the savings at low offline cost. GRPO expands the action space to JUMP and REQUEST, which skip, add or reorder operations that never occur in native runs. This makes it better suited to hosts whose workflows benefit from restructuring rather than early stopping alone: it raises DiagGym accuracy by 3.14 points and reduces calls by another 12.6% on average across 12 pairs.

We have responded to each concern point by point in our replies. We would appreciate it if Reviewers could revisit their assessments in light of our responses and the additional evidence.

Thank you again for your time and consideration.

Best regards,

The Authors

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.