Med-Agentic: Distilling Agentic Medical Reasoning with Internalized Meta-Capabilities
Organizations: SKL-IOTSC, Department of AIX, University of Macau
Abstract
Large language models (LLMs) in expert domains face a trade-off between agentic tool use, which externalizes expertise behind brittle multi-turn runtimes, and end-to-end specialization, which internalizes expertise only implicitly at task-level granularity. We propose internalized meta-capabilities: atomic, parametrically internalized, and composable reasoning units that an LLM can select and combine within a single chain-of-thought (CoT). We instantiate this idea as Med-Agentic for medical visual diagnosis, where the model emits a capability-tagged structured CoT in one forward pass, turning capability invocation into tagged token generation rather than external tool calls. For training, Med-OPD performs multi-teacher on-policy distillation with token-level dual-factor teacher routing conditioned on both the image and the active capability tag, strictly generalizing per-prompt teacher routing. We show that this routing gives an unbiased estimator of the same expected teacher-KL gradient. Across public medical imaging datasets spanning nine anatomies and eight modalities, Med-Agentic consistently improves in-distribution and out-of-distribution diagnostic accuracy over the strong competitors.
Figures & tables
| Method | Top- | CoT WF | IoU | |
|---|---|---|---|---|
| Gemini-2.5-Flash [ 21 ] | 17.4 | 14.9 | 41.2 | 0.105 |
| Gemini-3.0-Flash [ 21 ] | 22.9 | 19.6 | 53.7 | 0.142 |
| GPT-5.5 [ 13 ] | 28.3 | 24.7 | 64.8 | 0.187 |
| Claude Sonnet 4.6 [ 3 ] | 26.5 | 23.0 | 61.4 | 0.176 |
| Qwen3.5-9B [ 2 ] | 13.8 | 11.2 | 28.5 | 0.082 |
| Qwen3.5-27B [ 2 ] | 19.2 | 16.4 | 38.7 | 0.118 |
| Method | COVID-19 CT | HyperKvasir-OOD | Head-CT hem. | Avg. |
|---|---|---|---|---|
| Gemini-2.5-Flash [ 21 ] | 12.9 | 16.5 | 9.0 | 12.8 |
| Gemini-3.0-Flash [ 21 ] | 18.1 | 22.0 | 14.5 | 18.2 |
| GPT-5.5 [ 13 ] | 23.3 | 27.5 | 18.6 | 23.1 |
| Claude Sonnet 4.6 [ 3 ] | 21.5 | 25.4 | 17.0 | 21.3 |
| Qwen3.5-9B [ 2 ] | 8.6 | 11.0 | 5.4 | 8.3 |
| Qwen3.5-27B [ 2 ] | 14.6 | 17.5 | 9.7 | 13.9 |
| Variant | Atom. | Intern. | Comp. | ID | OOD | OOD | |
|---|---|---|---|---|---|---|---|
| P0 | Med-Agentic (full) | ✓ | ✓ | ✓ | 69.7 | 56.5 | — |
| P1 | atomicity (disease-level SFT) | ✗ | ✓ | ✓ | 60.1 | 35.8 | |
| P2 | internalization (external tools) | ✓ | ✗ | ✓ | 63.4 | 43.3 | |
| P3 | compositionality (fixed pipeline) | ✓ | ✓ | ✗ | 62.5 | 38.8 |
| Routing | ID | OOD | |||
|---|---|---|---|---|---|
| R0 | Uniform | — | — | 65.6 | 50.4 |
| R1 | Image-only | ✓ | — | 67.1 | 52.7 |
| R2 | Capability-only | — | ✓ | 67.8 | 53.9 |
| R3 | Dual-factor | ✓ | ✓ | 69.7 | 56.5 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Family | Role / component ablated |
| Gemini-2.5-Flash [ 21 ] | Closed general MLLM | Zero-shot |
| Gemini-3.0-Flash [ 21 ] | Closed general MLLM | Zero-shot |
| GPT-5.5 [ 13 ] | Closed general MLLM | Zero-shot |
| Claude Sonnet 4.6 [ 3 ] | Closed general MLLM | Zero-shot |
| Qwen3.5-9B [ 2 ] | Open general MLLM | Zero-shot |
| Qwen3.5-27B [ 2 ] | Open general MLLM | Zero-shot |
| # | Capability | One-sentence description |
|---|---|---|
| 1 | Color | color, pigmentation, hemorrhagic hue, and other chromatic cues |
| 2 | Density | CT Hounsfield units, MRI signal intensity, ultrasound echogenicity |
| 3 | Morphology | geometric contour, lobulation, spiculation, overall shape |
| 4 | Geometry | lengths, ratios (e.g., VCDR), angles, areas, metric measurements |
| 5 | Margin | sharpness, infiltration, halo, boundary irregularity |
| 6 | Spatial relation | distance to landmarks, layered relations, anatomical localization |
| Dataset | Modality / anatomy | Train | ID | OOD |
|---|---|---|---|---|
| Chest X-ray Pneumonia | X-ray / chest | 409 | 200 | 0 |
| COVID-19 CT | CT / chest | 0 | 0 | 116 |
| Chest CT (lung-cancer subtypes) | CT / chest | 372 | 93 | 0 |
| IDRiD | Fundus / retina | 366 | 91 | 0 |
| Retinal-Lesions | Fundus / retina | 529 | 100 | 0 |
| PALM (pathologic myopia) | Fundus / retina | 338 | 84 | 0 |
| Variant | Tag WF | ID top- | IoU | |
|---|---|---|---|---|
| I0 | Free-text CoT (no tags) | n/a | 64.2 | 0.358 |
| I1 | Tagged CoT, no segment-level loss | 91.4 | 67.3 | 0.395 |
| I2 | Tagged CoT segment-level loss (Ours) | 96.8 | 69.7 | 0.431 |
| Metric | External tool | Med-Agentic (Ours) |
|---|---|---|
| Avg. # capability calls per sample | 4.5 | 4.0 |
| Out-of- call rate | 18.4% | 4.0% |
| End-to-end differentiable | ✗ | ✓ |
| Stage 1 | Stage 2 | Specialist-forge | Stage 3 (Med-OPD) | |
| Capability SFT | Structured-CoT SFT | SFT GRPO | On-policy distill. | |
| Optimizer | AdamW | AdamW | AdamW | AdamW |
| (peak) | ||||
| Weight decay | ||||
| Grad clip |
| Pipeline step | Calls dispatched | Calls retained | Yield | Output unit |
|---|---|---|---|---|
| P1–P3 Spatial grounding | one analysis box per image | |||
| P4–P5 Per-capability attributes | – pairs per image | |||
| P6–P7 Two-node CoT trajectories | one trajectory per image | |||
| Total Gemini-3-Flash calls | — |
| Supervision | ID top- (%) | OOD top- (%) |
|---|---|---|
| Disease-level SFT reference | 60.1 | 35.8 |
| Original diagnosis-conditioned | 69.7 | 56.5 |
| Planning/diagnostic nodes blind | 68.4 | 54.6 |
| Fully diagnosis-withheld | 67.2 | 52.9 |
| Intervention | Acc. (%) | Flip (%) | GT log-odds | Direction (%) |
|---|---|---|---|---|
| Intact | 69.7 | 0.0 | 0.00 | n/a |
| Tag-only perturbation | 68.9 | 3.2 | n/a | |
| Irrelevant-segment deletion | 68.4 | 4.6 | n/a | |
| Relevant-segment deletion | 61.8 | 13.4 | n/a | |
| Contradictory replacement | 55.6 | 22.8 | 72.4 | |
| Restore exact original | 69.7 | 0.0 | 0.00 | n/a |
| Taxonomy | ID top- (%) | OOD macro-average (%) |
|---|---|---|
| Semantic-14 | 69.7 | 56.5 |
| Merged-11 | 67.6 | 52.4 |
| Random pseudo-split-28 | 69.3 | 55.9 |
| Method | Seen pair | Novel pair | Seen triple | Novel triple |
|---|---|---|---|---|
| Disease-level SFT | ||||
| Fixed pipeline | ||||
| Matched tools | ||||
| Plain GRPO | ||||
| Med-Agentic |
| Method | Top- (%) |
|---|---|
| Disease-level SFT | 32.7 |
| Fixed pipeline | 36.2 |
| Matched tools | 40.7 |
| Plain GRPO | 46.1 |
| Med-Agentic | 52.1 |
| Method | OOD (%) | KD (%) | Median (s) | IQR (s) |
|---|---|---|---|---|
| Med-Agentic | 56.5 | 47.3 | 1.2 | 1.0–1.5 |
| Guideline-RAG | 54.1 | 58.7 | 6.7 | 5.8–7.9 |
| RAG + shuffled evidence | 49.8 | 49.3 | 6.6 | 5.7–7.8 |
| Med-Agentic + RAG | 60.5 | 63.3 | 7.1 | 6.2–8.4 |
| Model | Endpoint/checkpoint | ID (%) | OOD (%) |
|---|---|---|---|
| Gemini 2.5 Flash | gemini-2.5-flash | 39.2 | 26.0 |
| Gemini 3 Flash | gemini-3-flash-preview | 43.8 | 28.5 |
| GPT-5.5 | gpt-5.5-2026-04-23 | 46.0 | 30.0 |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | 44.5 | 29.2 |
| Qwen3.5-9B | Qwen/Qwen3.5-9B | 31.4 | 18.6 |
| Qwen3.5-27B | Qwen/Qwen3.5-27B | 38.6 | 24.5 |
| Stage | Image scope | Retained across candidates | Used for optimization |
|---|---|---|---|
| Candidate generation | 112,821 unique images | Training + reserve candidates | 29,992 image IDs |
| Stage 1 | Same candidate pool | 716,747 image–capability instances | 180,752 instances on training IDs |
| Stage 2 | Same candidate pool | 179,480 node responses; 89,740 paired trajectories | 29,992 trajectories on training IDs |
| Stage 3 | 29,992 training images | On-policy student trajectories | Training IDs only |
Agentic Reasoning
Agentic reasoning studies how AI systems plan, act, use tools, and revise decisions across multi-step tasks and changing environments.
See all 109 papers