Accuracy on medical examinations is common evidence offered for the clinical use of language models, yet a health system that intends to run an open model on its own hardware needs to know considerably more: whether the model recognizes when it is likely to be wrong, whether medical fine-tuning improves this ability, whether its correct answers rest on sound clinical reasoning, or whether it actually uses the images it is given. We examine these questions for four open models of 8 to 27 billion parameters on the Spanish MIR residency examination, scoring 1,552 questions from eight editions under the exam's own rules. Answering every question, the three larger models would rank among roughly the first 600 to 3,000 candidates, with 41 to 43 specialties still open to them. Abstention, however, never pays, because even their least confident answers are right more often than the 25% break-even. Medical fine-tuning reduced overconfidence at the cost of accuracy, without improving how well confidence separates right from wrong answers. Moreover, 13-38% of correct answers rejected a distractor for a clinically unsound reason that confidence did not reflect, and removing or swapping the provided contextual images left accuracy unchanged.
Figures & tables
Set
Questions
Use
Official papers, 2014–2025
2,595
Corpus
Scored, 2018–2025
1,552
RQ1, RQ2
With commentary on
123
RQ3
two or more options
With a scorable image plate
171
RQ4
Rank-curve points, 2023 / 2024
88 / 45
RQ1
Table 1: Question sets used by each research question.
Figure 1: Study Design. Pass A answers every scored question of the 2018–2025 exams and serves RQ1 and RQ2. Pass B asks for a reason per option on the questions with physician commentary (RQ3). Pass C repeats the image questions with the plate shown, withheld or swapped (RQ4).
Model
Params
Precision
Images
Qwen3-8B
8.2B
16-bit
No
Qwen3-14B
14.8B
16-bit
No
Gemma-3-27B
27.4B
8-bit
Yes
MedGemma-27B
27.4B
8-bit
Yes
Llama-3.3-70B (Judge)
70.6B
4-bit
No
Table 2: Evaluated models and the judge.
Model
Acc.
Net
Gain
Headroom
Tenth
Gemma-3-27B
.758
67.7
0.0
8.1
.387
MedGemma-27B
.735
64.7
0.0
8.8
.368
Qwen3-14B
.756
67.5
0.0
8.1
.445
Qwen3-8B
.621
49.4
0.0
12.7
.303
Table 3: RQ1, pooled over the 2018–2025 exams (1,552 questions). Net score, gain and headroom per 100 questions. Gain is calibrated minus always, headroom oracle minus calibrated. Tenth: accuracy of the tenth of answers each model was least sure of.
Figure 2: RQ1: Each Model on the Score-to-Rank Curves of the 2023 and 2024 Exams, Answering Every Question. Grey points are the published per-specialty entrants; dotted lines mark a selection of specialty cut-offs, named in grey. Bars show the 95% interval of the net score and the rank range it maps to. A solid line leads from each model to the right, where the most competitive specialty still open at its rank is named in the model’s colour.
Model
Score
Rank
Open
Best Open Specialty
Its Last Place
2023 Exam (196 questions)
Gemma-3-27B
142.7
1,628 (561–3,687)
43/45
Oral and Maxillofacial Surgery
CHU de A Coruña
Qwen3-14B
137.3
2,284 (643–4,189)
43/45
Oral and Maxillofacial Surgery
CHU de A Coruña
MedGemma-27B
130.7
3,029 (1,198–5,226)
41/45
Cardiology
Hospital de Mérida
Qwen3-8B
105.3
6,212 (4,058–7,962)
22/45
Haematology
H. U. Arnau de Vilanova, Lleida
2024 Exam (200 questions)
Table 4: RQ1: Placement answering every question. Net score; estimated rank with the range that the 95% interval of the net score maps to (233 is the best rank the 2024 curve can give); open specialties; and the most competitive specialty still open at that rank, with the hospital that took its last place (CHU: Complejo Hospitalario Universitario; CH: Complejo Hospitalario; CAU: Complejo Asistencial Universitario; H. U.: Hospital Universitari).
Figure 3: RQ1: Net Score per 100 Questions Against the Share Answered, Most Confident First, Pooled Over 2018–2025.
Figure 4: RQ2: Reliability Diagram, Pooled Over the 2018–2025 Exams. Only bins with at least ten answers are drawn; most answers fall in the top bin.
Model
Exams
Accuracy
Confidence
ECE
Brier
AUROC
p
Gemma-3-27B
Pre
.756
.988
.234 [.212, .257]
.472
.792 [.766, .818]
2025
.768
.990
.222 [.166, .283]
.448
.854 [.790, .910]
MedGemma-27B
Pre
.729
.941
.214 [.194, .237]
.469
.799 [.776, .823]
2025
.778
.941
.163 [.117, .219]
.359
.812 [.731, .883]
Qwen3-14B
Pre
.752
.972
.221 [.200, .244]
.464
.790 [.765, .815]
2025
.789
.975
.186 [.135, .240]
.369
.866 [.803, .921]
Table 5: RQ2: Calibration before release (Pre: the 2018–2024 exams, 1,358 questions), after release (2025, 194 questions) and over both (All), with the paired difference MedGemma-27B minus Gemma-3-27B. p is McNemar’s exact test on accuracy.
Figure 5: RQ2: Accuracy and Expected Calibration Error by Exam Year. The 2025 exam was sat after all models released.
Figure 6: RQ3: Share of Correct Answers With at Least One Distractor Rejected for a Wrong Reason, With 95% Wilson Intervals (Left), and Mean Label Mode Confidence on Those Answers Against Correct Answers Whose Distractor Reasons Were All Sound (Right).
Model
Acc.
Right
Wrong Reason
Gap
Qwen3-8B
.56 (.60)
60
.38
+.020
Qwen3-14B
.73 (.77)
79
.19
+.014
MedGemma-27B
.67 (.71)
72
.15
+.005
Gemma-3-27B
.62 (.77)
67
.13
− .004
Table 6: RQ3 on 108 questions. Acc.: generate mode accuracy, with label mode accuracy on the same questions in brackets. Right: correct answers with graded distractors. Gap: label mode confidence on wrong reason minus sound reason correct answers.
Question and Key
Option Rejected
Physician
Model Reason
Judge
Ex-smoker with COPD and new digital clubbing; most plausible cause? Key: Lung carcinoma (MIR 2015, No. 125).
Pulmonary fibrosis.
The other conditions can also cause it, but not so suddenly.
MedGemma-27B: “Pulmonary fibrosis is not usually associated with digital clubbing.”
Wrong, correctly.
70 y.o., a week of progressive low back pain and low-grade fever, normal radiograph; what to rule out first, and how? Key: Pyogenic spondylodiscitis, MRI (2019, No. 122).
Ankylosing vertebral hyperostosis, with a dorsolumbar radiograph.
Vertebral collapse, ankylosing hyperostosis and many metastases would be seen on the plain radiograph.
Qwen3-8B: “Radiography is insufficient to diagnose ankylosing hyperostosis, which requires more specific studies.”
Wrong, correctly.
Diabetic nephropathy, eGFR 14 ml/min; which statement is true? Key: Stage 5, consider renal replacement (2021, No. 149).
Proteinuria above 500 mg/24 h is unlikely.
These patients usually have A3 albuminuria, possibly nephrotic-range (option false).
Gemma-3-27B: “Proteinuria is common in diabetic nephropathy and likely above 500 mg/24 h at such an advanced stage.”
Wrong, judge error.
Table 7: Graded distractor reasons on questions the model answered correctly, translated from Spanish and abridged.
Figure 7: RQ4: Accuracy of the Vision Models on the 171 Image Questions With the Question’s Own Plate, No Plate and Another Question’s Plate, With 95% Wilson Intervals.
Figure 8: Accuracy by Specialty Over the 2018–2025 Exams, for the 18 Specialties With at Least Ten Labelled Questions (Question Count in Brackets). The grey line spans the four models and markers are offset so that equal accuracies stay visible.