Diagnosing Verbalized Confidence in a Medical Vision-Language Model for Selective Prediction on Colorectal Histopathology Patches
Organizations: Department of Computer and Information Science and Engineering, University of Florida, Gainesville, FL, U.S.A. · Department of Medicine, University of Florida, Gainesville, FL, U.S.A. · Department of Computer Science and Engineering, JK Lakshmipat University, Jaipur, India. · Department of Data Science and Engineering, Manipal University Jaipur, Jaipur, India. ·
Abstract
Flagging uncertain histopathology patches for specialist review needs a confidence that is higher when the model is right. We test whether an open medical vision-language model emits one. MedGemma-27b-it and its base Gemma-3-27b-it were run zero-shot under one prompt on 10,004 PathMNIST validation patches and 7,180 patches of a patient-disjoint external cohort. Both are too inaccurate to deploy (40.6% and 35.5%); the object of study is the confidence. MedGemma's verbalized confidence puts 96% of patches at one value; its confidence-correctness AUROC is 0.499 and 0.528, and routing by it moves selective-accuracy AUC by -0.004 and +0.037. Gemma-3 spreads its confidence over nine values, reaches AUROC 0.70, and gains +0.114 and +0.115. MedGemma's label-token probabilities do not rescue it: their validation advantage reverses where the top-20 alternatives include every class. On 1,800-patch subsets of each cohort, stratified on correctness and reweighted to the full splits, agreement across five prompt variants beats random by +0.123 and +0.106, and wording-only paraphrases give +0.100 and, externally and in direction only, +0.054; agreement's external margins over confidence do not survive slide-level clustering. Under one restructured prompt variant, MedGemma's stated confidence routes (+0.112, +0.141), so the failure is tied to a prompt chosen for macro F1.
Figures & tables
| Validation (NCT-CRC-HE-100K) | External test (CRC-VAL-HE-7K) | |||
| Class | % | % | ||
| ADI | 1,041 | 10.4 | 1,338 | 18.6 |
| BACK | 1,057 | 10.6 | 847 | 11.8 |
| DEB | 1,152 | 11.5 | 339 | 4.7 |
| LYM | 1,156 | 11.6 | 634 | 8.8 |
| MUC | 890 | 8.9 | 1,035 | 14.4 |
| Version | Description | Pilot macro F1 |
|---|---|---|
| V1 | Minimal class list, no histological cues | not evaluated |
| V2 | Class list with brief cues | 0.213 |
| V3 | V2 plus per-class diagnostic cues (selected) | 0.301 |
| V4 | V3 plus disambiguation rules for MUC, NORM, STR | 0.283 |
| V4B | V4 with stricter tie-breaking instructions | 0.227 |
| V5 | Restructured instruction set with step-by-step rules | 0.294 |
| Model | Accuracy | 95% Wilson CI | Macro F1 | Weighted F1 |
|---|---|---|---|---|
| MedGemma-27b-it V3 (zero-shot) | 0.4063 | 0.397–0.416 | 0.3272 | 0.3455 |
| Gemma-3-27b-it V3 (zero-shot) | 0.3548 | 0.345–0.364 | 0.2702 | 0.2972 |
| ResNet-18 64 px (supervised) | 0.9971 | 0.996–0.998 | 0.9971 | 0.9971 |
| MedGemma-27b-it | Gemma-3-27b-it | |||
| Class | val | test | val | test |
| Adipose (ADI) | 0.425 | 0.472 | 0.188 | 0.200 |
| Background (BACK) | 0.750 | 0.833 | 0.091 | 0.108 |
| Debris (DEB) | 0.344 | 0.077 | 0.242 | 0.060 |
| Lymphocytes (LYM) | 0.669 | 0.719 | 0.379 | 0.348 |
| Mucus (MUC) | 0.002 | 0.000 | 0.009 | 0.002 |
| Model | ECE (raw) | ECE (adapt.) | Brier | T | ECE (calibrated) |
|---|---|---|---|---|---|
| MedGemma-27b-it | 0.553 | 0.553 | 0.546 | 200 | 0.106 |
| Gemma-3-27b-it | 0.535 | 0.535 | 0.497 | 200 | 0.146 |
| ResNet-18 64 px | 0.003 | 0.001 | 0.003 | 1.12 | 0.003 |
| Model | Set | (cal) | sd | (rnd) | Gap [95% CI] | Prior | Ties | Cal @15% |
|---|---|---|---|---|---|---|---|---|
| MedGemma-27b-it | val | 0.402 | 0.004 | 0.406 | [ , ] | 0.554 | 0.92 | 0.407 |
| MedGemma-27b-it | test | 0.389 | 0.004 | 0.352 | [ , ] ∗ | 0.577 | 0.92 | 0.357 |
| Gemma-3-27b-it | val | 0.469 | 0.003 | 0.355 | [ , ] ∗ | 0.416 | 0.33 | 0.404 |
| Gemma-3-27b-it | test | 0.425 | 0.004 | 0.309 | [ , ] ∗ | 0.392 | 0.30 | 0.356 |
| ResNet-18 64 px | val | 0.9998 | 0.000 | 0.9971 | [ , ] ∗ | 0.999 | 0.00 | 0.9996 |
| ResNet-18 64 px | test | 0.978 | 0.000 | 0.911 | [ , ] ∗ | 0.895 | 0.00 | 0.963 |
| Model | Val Acc | Test Acc | Acc | Rel. | Err. ratio | Retained | Val F1 | Test F1 | F1 |
|---|---|---|---|---|---|---|---|---|---|
| MedGemma-27b-it | 0.4063 | 0.3524 | 0.133 | 1.09 | 0.63 | 0.3272 | 0.2950 | ||
| Gemma-3-27b-it | 0.3548 | 0.3093 | 0.128 | 1.07 | 0.58 | 0.2702 | 0.2461 |
| Validation | External | ||||||
| Routing signal | Outcome routed | Cohort | Subset | Cohort | Subset | Ties | Distinct |
| Single-query confidence | Single query | 0.391 | 0.320 | 0.368 | 0.354 | 0.91 / 0.92 | 4 / 4 |
| Random | Single query | 0.400 | 0.338 | 0.342 | 0.349 | – | – |
| Mean confidence, K=5 | Modal vote | 0.426 | 0.348 | 0.402 | 0.372 | 0.74 / 0.75 | 10 / 7 |
| Consistency score | Modal vote | 0.524 | 0.431 | 0.455 | 0.451 | 0.37 / 0.37 | 5 / 5 |
| Predictive entropy, K=5 | Modal vote | 0.524 | 0.431 | 0.456 | 0.451 | 0.34 / 0.35 | 7 / 7 |
| Contrast | Validation cohort | External cohort | Subset |
|---|---|---|---|
| Consistency random † | [0.105, 0.140] | [0.091, 0.121] | / |
| Mean-of-5 conf. random | [0.010, 0.042] | [0.036, 0.069] | / |
| Single-query conf. random | [ , 0.004] | [0.012, 0.041] | / |
| Consistency mean-of-5 conf. † | [0.074, 0.120] | [0.031, 0.075] | / |
| Consistency single query (modal) † | [0.107, 0.153] | [0.060, 0.103] | / |
| Consistency single query (own) | [0.107, 0.154] | [0.064, 0.106] | / |
| Variants used | Validation | External |
|---|---|---|
| All five | [0.105, 0.140] | [0.091, 0.121] |
| Without variant 0 | [0.086, 0.122] | [0.084, 0.112] |
| Without variant 1 | [0.098, 0.134] | [0.089, 0.118] |
| Without variant 2 | [0.020, 0.045] | [ , 0.007] |
| Without variant 3 | [0.094, 0.130] | [0.101, 0.132] |
| Without variant 4 | [0.128, 0.161] | [0.112, 0.140] |