Manuscript Offprint

arXiv:2609.40361

Ranking-Aware Prompt Optimization for Multimodal Clinical Diagnosis

Tian Xia, Minghao Liu, Yiqing Liang, Laixi Shi, Jiayun Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Multimodal large language models (MLLMs) are rapidly advancing clinical diagnosis, yet their adaptation pipelines remain anchored to accuracy-based objectives. Clinical data are heavily class-imbalanced: a constant-majority predictor can score above 90% accuracy while being clinically useless. We therefore evaluate and optimize for AUROC, a threshold-free score that ranks positives above negatives and is invariant to class balance. We focus on prompt optimization in MLLMs. Reflective methods such as GEPA use a binary scores matrix with one row per evaluation instance and one column per candidate prompt; cells record per-instance correctness, so the column average is accuracy and drives candidate selection.

We introduce pair-level Pareto prompt evolution (Ranking-PE), which replaces each correctness row with a pairwise-ordering row over (positive, negative) instance pairs: the cell is 1 if the candidate scores the positive higher than the paired negative. The column average then equals empirical AUROC (by the Wilcoxon–Mann–Whitney identity). We apply this swap at all three layers the prompt evolution search reads from—the scores matrix that decides Pareto dominance, the per-example feedback to the reflection LM, and final candidate selection—at no extra model calls and with no surrogate loss. Across three diseases on MIMIC, accuracy-based prompt evolution can degrade ranking; Ranking-PE reverses this, beating the accuracy-based recipe by +5.8 AUROC pp on fine-tuned Qwen3-VL-8B and +16.2 pp on MedGemma-4B. Ablations examine each design component and show that a medical-grade visual backbone—via vision-encoder-tuned SFT or medical pretraining—is a prerequisite that prompt search cannot replace—our recipe extends reflective prompt evolution from text-only data to multimodal clinical decision-making.

1 INTRODUCTION

Multimodal large language models (MLLMs) are increasingly deployed for multimodal clinical diagnosis, jointly reading a medical image (e.g., chest X-ray) and the accompanying structured EHR context (demographics, imaging view, laboratory test results) to produce a diagnostic answer (Tu et al., 2024; Li et al., 2023; Sellergren et al., 2025). The promise is that a single generalist model can approach specialist-level decisions without specific architectures per disease, as shown by the success of recent medically-pretrained backbones (LLaVA-Med (Li et al., 2023), Med-PaLM (Tu et al., 2024), MedGemma (Sellergren et al., 2025)).

Accuracy alone is not enough for clinical diagnosis model training and evaluation. Screening, triage, and follow-up operate at a chosen operating point on the ROC curve, which plots the true positive rate against the false positive rate at various thresholds, so the metrics that matter are ranking metrics (AUROC) rather than thresholded top-1 agreement with the label. Under severe class imbalance, a constant-majority predictor can achieve over 90% accuracy without distinguishing positive from negative cases, missing every positive case when negatives dominate or flooding clinicians with false alarms when positives dominate (Figure 1b). Errors are also asymmetric: a missed consolidation is clinically far more costly than a false alarm, a distinction accuracy is structurally incapable of representing. Under these conditions, optimizing and reporting accuracy actively misdirects MLLM development in medicine; we therefore evaluate and optimize against AUROC, which is threshold-free and agnostic to class imbalance, so training and evaluation share the same correctly-aligned a) Task

Figure

b) Metric: from accuracy to AUROC

Example: 10 patients (9 positive, 1 negative)

c) Our recipe

The "always-yes" hack — AUROC reveals it

Model A always-yes HACKModel B Perfect
Accuracy90%!!100% ✓
AUROC50% ✓100% ✓

AUROC reveals discriminative failures hidden by accuracy. AUROC is agnostic to class imbalance.

Figure 1: Why clinical diagnosis needs ranking metrics. a): multimodal diagnosis combines medical images (e.g. chest X-rays), clinical profile, lab tests, and prompts to produce calibrated disease scores. b): under heavy class imbalance common in real-world clinical datasets, threshold accuracy can look strong even when the score ranking is clinically useless, while AUROC distinguishes models across all operating points. c): our recipe improves ranking by combining a base MLLM, SFT with vision-encoder tuning, and ranking-aware prompt evolution, moving from threshold-centric prediction to AUROC-driven optimization for reliable multimodal clinical diagnosis.

metric. AUROC itself weighs both error types symmetrically; we surface the asymmetric cost separately, through the reflector's feedback ( §4.2.2\S4.2.2 ).

This paper focuses on prompt optimization (Agrawal et al., 2025; Khattab et al., 2023; Pryzant et al., 2023) (cheap, gradient-free, and composable with finetuning techniques) layered on top of a finetuned medical backbone. Existing prompt-evolution systems (GEPA (Agrawal et al., 2025), DSPy (Khattab et al., 2023), APO (Pryzant et al., 2023)) are built around an accuracy-based scores matrix, inheriting exactly the metric misalignment described above. Under heavy class imbalance, accuracy-based prompt evolution can degrade the underlying ranking signal, a failure mode our recipe reverses. Pareto prompt evolution does not intrinsically optimize accuracy; it optimizes whatever binary event is chosen as a row of its scores matrix. Existing systems silently choose per-instance correctness events 1[correct] (cell in the score matrix is 1 when correct), making the column average accuracy. For clinical ranking, we instead score positive-negative pairs according to their relative order. We obtain the per-instance scores s(⋅)s(\cdot) from the model's Yes/No token log-probabilities at no additional cost. By the Wilcoxon–Mann–Whitney identity, the average of these pair scores is empirical AUROC. Swapping the scores-matrix rows from instances to (x+,x−)(x^{+}, x^{-}) pairs therefore lifts the objective of every matrix-driven decision—Pareto filtering, parent selection, and final selection—from accuracy to AUROC. We call this pair-level Pareto prompt evolution (Ranking-PE).

We consider MLLM-based clinical diagnosis as a ranking task and validate the recipe systematically across two open-source MLLM families end-to-end—Qwen3-VL-8B and MedGemma-4B—over three disease tasks on MIMIC, reporting AUROC and Balanced Accuracy in the main paper and AUPRC in the appendix; a same-scale non-medical checkpoint (Gemma3-4B) and frontier closed-source GPT reflectors appear as probes that contextualize the recipe. Combining vision-encoder-tuned SFT with Ranking-PE for Qwen3-VL-8B, our recipe outperforms accuracy-based prompt evolution by +5.8 AUROC pp on Qwen3-VL-8B + SFT(VE-tuned) and +16.2 AUROC pp on MedGemma-4B, while exceeding Balanced Accuracy of both Accuracy-PE and the corresponding base model. On Qwen3-VL-8B + SFT, the pattern is most pronounced on Atelectasis, where Accuracy-PE stays close to the base level; Ranking-PE recovers +7.1 AUROC pp and +25.5 Balanced Accuracy pp over Accuracy-PE under the same pipeline.

Our contribution: 1) Pair-level Pareto prompt evolution. We identify the row schema of the Pareto scores matrix as the hidden optimization unit of reflective prompt search, and specialize all three layers the search reads from (the scores matrix, reflector feedback, and final selection) onto positive-negative ordering events (x+,x−)(x^{+}, x^{-}) , lifting the column average to empirical AUROC ( §4\S4 ). 2) A systematic clinical recipe and benchmark. We provide an end-to-end study of MLLM-based clinical diagnosis on MIMIC-IV (three diseases, two open-source MLLM families, four optimization paradigms; closed-source models enter only as probes, namely zero-shot baselines and reflectors), show that visual domain adaptation provides an important foundation for prompt evolution (consistent with prior visual-alignment findings (Li et al., 2023; He et al., 2024)), and extend reflective prompt evolution from text-only NLP benchmarks to multimodal clinical decision-making (§5).

References (32)