Single-Pass Decision Scores Enable Rapid Classification with Adjustable Thresholds in Medical Multimodal Large Language Models
Authors: Patrick Wienholt, Frederik Hauke, Christiane Kuhl, Jakob Nikolas Kather, Sven Nebelung, Daniel Truhn
Organizations: Lab for Artificial Intelligence in Medicine, Department of Diagnostic and Interventional Radiology, University Hospital RWTH Aachen, Aachen, Germany. · Department of Diagnostic and Interventional Radiology, University Hospital RWTH Aachen, Aachen, Germany. · Department of Medical Oncology, National Center for Tumor Diseases (NCT), Heidelberg University Hospital, Heidelberg, Germany. · Else Kroener Fresenius Center for Digital Health, Technical University Dresden, Dresden, Germany. · Department of Medicine I, Faculty of Medicine and University Hospital Carl Gustav Carus, TUD Dresden University of Technology, Dresden, Germany.
Multimodal large language models (MLLMs) answer binary clinical questions with a yes or no token, leaving the decision threshold implicit and fixed. We derive a continuous score from a single forward pass by renormalizing the probabilities of the yes and no tokens, allowing the threshold to be adapted to clinical needs without retraining. We evaluated this approach with MedGemma and Gemma-3 (4B and 27B) on six medical imaging datasets. The default threshold was frequently misaligned with the task: for identifying normal chest radiographs, MedGemma-27B labeled every image as abnormal, whereas a validation-selected threshold yielded a sensitivity of 0.945 and a specificity of 0.696. Normalization achieved the highest AUROC on four of six datasets (CheXpert: 0.819 vs. 0.777 for raw and 0.743 for text-elicited probabilities), and a single decision required 53-79 ms on one GPU. This simple post-hoc method turns medical MLLMs into fast classifiers with adjustable operating points. Code: https://github.com/TruhnLab/llm-threshold-calibration
Figures & tables
Figure 1: Workflow for threshold shifting in LLM-based binary classification. (a) An image-conditioned prompt is provided to the LLM. (b) From the first decoding step, the model assigns probabilities to all vocabulary tokens, including the verbalizers yes and no . (c) We normalize the probabilities over { yes , no } and vary the decision threshold, which has an implicit default of 0.5. (d) Sweeping the threshold yields different operating points on the ROC curve, trading true positive rate (TPR) against false positive rate (FPR). The optimal threshold was determined on a validation set disjoint from the test set.
Figure 2: Overview of the experimental setup. We evaluated the threshold-shifting method on six medical imaging datasets spanning chest radiography, dermatology, ophthalmology, and histopathology. Notably, CheXpert was explicitly excluded from the training data of the MedGemma models [ 18 ] , making it well suited for external validation. Each dataset was split into a validation set, used exclusively to select the decision threshold, and a test set, used only for the final performance evaluation. We compared four models, namely Gemma-3 and MedGemma each in a 4B and a 27B variant, using three scoring methods: the normalized yes / no token probability, the raw yes token probability, and a text-elicited probability generated directly as output. The threshold optimized on the validation set was compared against the model’s implicit default threshold of 0.5 on the test set.
Figure 3: Class-specific AUROC values for the CheXpert dataset using MedGemma-27B. The three bars for each class represent normalized token probabilities, raw token probabilities (“Unnormalized” in the legend), and text-elicited probability estimates (“Text”). Error bars indicate 95% confidence intervals. The “average” bars show the mean across classes.
Dataset
Normalized (95% CI)
Raw (95% CI)
Text-elicited (95% CI)
CheXpert
0.819 [0.794, 0.845]
0.777 [0.746, 0.807]
0.743 [0.714, 0.772]
DERM12345
0.701 [0.682, 0.719]
0.637 [0.613, 0.662]
0.547 [0.530, 0.566]
G1020
0.494 [0.437, 0.551]
0.489 [0.423, 0.555]
0.487 [0.455, 0.519]
HAM10000
0.654 [0.642, 0.666]
0.607 [0.592, 0.621]
0.542 [0.531, 0.554]
MIMIC
0.658 [0.647, 0.669]
0.666 [0.655, 0.676]
0.625 [0.616, 0.635]
NCT-CRC-HE
0.783 [0.777, 0.788]
0.796 [0.790, 0.801]
0.642 [0.638, 0.647]
Table 1: Average AUROC values computed over the test data with corresponding 95% confidence intervals for MedGemma-27B.
Raw
Text-elicited
Dataset
Normalized
Δ (95% CI)
p
Δ (95% CI)
p
CheXpert
0.819
-0.043
<.001
-0.077
<.001
[-0.057, -0.029]
[-0.095, -0.059]
DERM12345
0.701
-0.064
<.001
-0.154
<.001
[-0.086, -0.041]
[-0.175, -0.133]
G1020
0.494
-0.005
.873
-0.007
.783
Table 2: Pairwise comparison of average AUROC values computed over the test data using MedGemma-27B from Table 1 . The table shows the difference to the normalized approach. Statistically significant ( p<.0042 ) values are in bold .
Figure 4: ROC curves for selected datasets and classes using MedGemma-27B. The default threshold of 0.5, corresponding to greedy sampling, is compared to the “Optimal Threshold,” which maximizes the sum of sensitivity and specificity, computed over the validation set.
Dataset
MedGemma-27B
MedGemma-4B
Gemma-3-27B
Gemma-3-4B
CheXpert
0.819
0.790
0.535
0.519
[0.794, 0.845]
[0.750, 0.827]
[0.496, 0.573]
[0.483, 0.557]
DERM12345
0.701
0.636
0.749
0.680
[0.682, 0.719]
[0.610, 0.671]
[0.730, 0.777]
[0.660, 0.704]
G1020
0.494
0.541
0.507
0.480
[0.437, 0.551]
[0.480, 0.603]
[0.446, 0.567]
[0.422, 0.538]
Table 3: Average AUROC values with corresponding 95% confidence intervals for different models using the normalized probabilities
Figure 5: Distribution of optimal classification thresholds across CheXpert classes for MedGemma-27B. Optimal thresholds, defined as those maximizing sensitivity plus specificity, fall below 0.5 for 11 of 13 findings. Bars show the distance from the default 0.5 threshold, terminating at the optimal threshold value. The bar labeled “average” shows the mean across classes.
The potential of Multimodal Large Language Models (MLLMs) in domain of medical imaging raise the demands of systematic and rigorous evaluation frameworks that are aligned with the real-world medical imaging practice. Existing practices that report single or coarse-grained metrics are lack the granularity required for specialized clinical support and fail to assess the reliability of reasoning mechanisms. To address this, we propose a paradigm shift toward multidimensional, fine-grained and in-depth evaluation. Based on a two-stage systematic construction pipeline designed for this paradigm, we instantiate it with MedRCube. We benchmark 33 MLLMs, Lingshu-32B achieve top-tier performance. Crucially, MedRCube exposes a series of pronounced insights inaccessible under prior evaluation settings. Furthermore, we introduce a credibility evaluation subset to quantify reasoning credibility, uncover a highly significant positive association between shortcut behavior and diagnostic task performance, raising concerns for clinically trustworthy deployment. The resources of this work can be found at https://github.com/F1mc/MedRCube.
Zhijie Bao, Fangke Chen, Licheng Bao +4
School of Data Science, Fudan University, China · Shanghai Innovation Institute, China · School of Integrated Circuits, Zhejiang University, China +2
We introduce MediX-R1, an open-ended Reinforcement Learning (RL) framework for medical multimodal large language models (MLLMs) that enables clinically grounded, free-form answers beyond multiple-choice formats. MediX-R1 fine-tunes a baseline vision-language backbone with Group Based RL and a composite reward tailored for medical reasoning: an LLM-based accuracy reward that judges semantic correctness with a strict YES/NO decision, a medical embedding-based semantic reward to capture paraphrases and terminology variants, and lightweight format and modality rewards that enforce interpretable reasoning and modality recognition. This multi-signal design provides stable, informative feedback for open-ended outputs where traditional verifiable or MCQ-only rewards fall short. To measure progress, we propose a unified evaluation framework for both text-only and image+text tasks that uses a Reference-based LLM-as-judge in place of brittle string-overlap metrics, capturing semantic correctness, reasoning, and contextual alignment. Despite using only ∼51K instruction examples, MediX-R1 achieves excellent results across standard medical LLM (text-only) and VLM (image + text) benchmarks, outperforming strong open-source baselines and delivering particularly large gains on open-ended clinical tasks. Our results demonstrate that open-ended RL with comprehensive reward signals and LLM-based evaluation is a practical path toward reliable medical reasoning in multimodal models. Our trained models, curated datasets and source code are available at https://medix.cvmbzuai.com
Sahal Shaji Mullappilly, Mohammed Irfan Kurpath, Omair Mohamed +5
Mohamed Bin Zayed University of Artificial Intelligence (MBZUAI) · Jubilee Mission Medical College and Research Institute · JJM Medical College
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.
Tian Xia, Minghao Liu, Yiqing Liang +2
Harvard University · University of California, Santa Cruz · Brown University +2