Study design · Research feature

MedProb: Probing Internal Representations of Vision-Language Models for Medical Question Answering

The study evaluates how well frozen vision-language models can predict answers to medical questions using a lightweight probing framework, comparing it to standard prompting methods.

Adapted from research by Erfan Nourbakhsh, Ke Yang, Anthony Rios.

arXiv preprint revision · 2026-09-03 · Attribution & reuse
In this article
Editorial illustration of aperture mechanism.

Editor’s introduction

The study evaluates how well frozen vision-language models can predict answers to medical questions using a lightweight probing framework, comparing it to standard prompting methods. It reveals that smaller models contain more recoverable answer signal than previously thought, reducing the apparent performance gap between small and large models. The results show consistent gains with model size, with larger models achieving higher probe accuracy, though performance varies by dataset. The probing method also identifies positional biases in both prompting and probing, though they manifest differently. The analysis focuses on binary and multiclass questions, with multiclass performance validated on OmniMedVQA, where probing again surpasses prompting.

Introduction

Medical visual question answering (Med-VQA) asks models to answer clinical questions about medical images. Med-VQA is widely used to evaluate vision-language models (VLMs) in medical settings because clinical AI systems must connect visual evidence with medical language. Recent work often improves Med-VQA by adding more resources to the model or inference pipeline. This includes domain-adaptive pretraining on biomedical image-text data, multi-agent systems, tool-augmented pipelines, retrieval-augmented generation and large closed-source models that are costly and difficult to inspect in privacy-sensitive clinical settings. These approaches differ in architecture and training, but they often share a common assumption that better Med-VQA requires larger models, more medical adaptation, or more complex inference.

We ask the question, when a VLM gives the wrong answer, is the answer-relevant “signal” absent from its internal representations, or is it present but not reflected in the generated answer? Current Med-VQA benchmarks usually evaluate models through free-text generation, which mixes several factors, including what the model represents in their internal features, how the prompt is written, how answer options are ordered, and how the model expresses its answer in language. A model may represent useful information about a medical image but still choose the wrong answer because the prompt is brittle, the answer options appear in a different order, or the generated explanation introduces unsupported reasoning.

This distinction matters for how we interpret model scale and medical adaptation. Under prompting, large VLMs often appear much stronger than small VLMs, and medically adapted models may appear stronger than their general-purpose bases. However, part of these gaps may reflect differences in generation behavior rather than differences in the answer-relevant information available in the hidden states. Prior work supports this concern. Medically adapted models do not always outperform general-domain models under controlled prompting, clinical fine-tuning does not always make knowledge more accessible, and generalist VLMs can match or outperform specialist medical models on clinical tasks. Prompting itself is also unstable, with semantically equivalent prompts changing accuracy by up to 76 points.

Medical Vision-Language Models. Medical VLMs have developed along two trajectories: adapting general-purpose VLMs to the biomedical domain and building purpose-built systems. Early efforts include Med-Flamingo, which extended OpenFlamingo with few-shot medical reasoning, and LLaVA-Med, which applied visual instruction tuning to PubMed image-text pairs. Subsequent domain-adaptive pretraining (DAPT) approaches include HuatuoGPT-Vision and MedTrinity-25M, while BioMed variants of InternVL3, Qwen2-VL, and Llama 3.2 follow the domain post-training recipe of. On the closed-source frontier, Med-Gemini and GPT-4 leverage proprietary scale, while reasoning-augmented variants such as MedVLThinker and MediX-R1 demand extensive training resources. Unlike these works, MedProb does not build a new medical VLM; instead, it probes frozen models and shows that medical adaptation does not consistently improve the linear decodability of answer-relevant signal in internal representations.

Prompt Sensitivity in Medical VLM Evaluation. A growing body of work questions the reliability of prompting-based evaluation. A cited study showed that LLMs are highly sensitive to prompt formatting, with accuracy swings up to 76 points across semantically equivalent formats that persist even under scaling or instruction tuning. In the medical domain, found that domain-adaptive pretraining fails to consistently outperform general-domain baselines under controlled prompting. A cited study further demonstrated that LLM performance varies substantially with the ordering of answer options in multiple-choice settings, a positional bias orthogonal to model knowledge. Rather than documenting these instabilities, MedProb sidesteps them entirely by reading directly from frozen internal activations, yielding an evaluation paradigm that is inherently robust to both prompt formatting and option ordering.

Representation Probing in Language Models. Probing has emerged as a principled alternative to generation-based evaluation for diagnosing model knowledge. A cited study showed that linear probes on frozen activations consistently outperform generation-based judgment across model families and datasets, generalizing under domain shifts. In the medical setting, demonstrated that linear classifiers on drug-name embeddings achieve AUC-ROC above 0.95 for adverse drug reaction classification without fine-tuning. Most directly relevant, the PING framework recovers up to 87% of performance lost to safety alignment by probing frozen transformers on clinical QA, indicating that the primary bottleneck is generative rather than representational. MedProb extends this paradigm to the multimodal Med-VQA setting, providing the systematic comparison of probing across 14 matched general-purpose and medically adapted VLM pairs on three clinical benchmarks.

Datasets

We evaluate on VQA-RAD, PathVQA, and SLAKE. Following, we restrict to closed-ended questions, convert binary yes/no questions to multiple-choice format, and construct plausible distractors for non-binary questions; samples with missing images or training-set leakage are removed. PathVQA is subsampled to 500 examples via stratified sampling; VQA-RAD and SLAKE use full test sets. Full dataset statistics and preprocessing details are in Appendix A. For broader cross-modal generalization, we additionally evaluate on OmniMedVQA across eight imaging modalities (Section F).

Main Results

The probing results also reveal a clear scaling trend: larger models often yield higher linear-probe accuracy on these benchmarks, with dataset-dependent gains. Within the Qwen3-VL family, average accuracy grows from 80.30% at 2B to 82.24% at 4B and 84.64% at 30B. The best overall results are achieved by Qwen2.5-VL-32B, which sets the top scores across SLAKE (F1: 91.60, Acc: 87.46), VQA-RAD (F1: 92.33, Acc: 88.59), and the overall average (F1: 89.94, Acc: 87.35). Similarly, within the Gemma family, scaling from 4B to 27B improves PATH-VQA F1 from 86.33% to 86.86%.

Binary vs. Multiclass Evaluation

We separate binary yes/no items from true multiclass items (three or more options). Most non-yes/no items on SLAKE and VQA-RAD are still effectively 2-way, so we do not treat them as multiclass. We report a dedicated true-multiclass evaluation on OmniMedVQA (4-way; chance 25%), where probing outperforms prompting overall; binary gains remain large on PATH-VQA, SLAKE, and VQA-RAD. Full per-model binary and multiclass breakdowns are in Appendix G.

Error Analysis

To understand where MedProb succeeds and where it falls short relative to prompting, we conducted a targeted qualitative analysis over a stratified sample of model outputs. We selected 10 instances from each of the three evaluation benchmarks, yielding 30 samples per model, across all 10 evaluated models, for a total of 300 manually examined responses. For each sample, we inspected the model’s full generated output alongside the probe’s prediction and the ground-truth label, classifying each case into one of three behavioral patterns. A detailed presentation of representative examples, including verbatim model outputs, is provided in Appendix J.

Conclusion

We introduced MedProb, a lightweight linear probing framework that decodes clinical answers directly from the frozen internal representations of general-purpose VLMs, outperforming medical VLMs and multi-agent pipelines across PATH-VQA, SLAKE, and VQA-RAD with only a logistic regression classifier trained on a small labeled set. Across 14 matched architecture pairs, domain-adaptive pretraining does not reliably enrich internal clinical representations, with general models outperforming their medical counterparts in 6 of 14 cases and RL-based adaptation (MediX-R1) the notable exception. MedProb is also substantially more robust to answer option ordering than prompting, which exhibits inconsistent positional biases across models. Together, these findings reframe the Med-VQA challenge: the bottleneck is not what VLMs know, but how that knowledge is elicited. Future work should explore multi-layer aggregation, nonlinear probes, and open-ended VQA settings to further unlock the clinical knowledge latent in general-purpose representations. As an initial step toward the open-ended setting, we show in Appendix H that the probe can rerank open-ended VLM generations in a rejection-sampling framework, though future work should explore this in more depth.

Limitations

This work has several limitations. First, MedProb requires a small labeled training set, while prompted VLMs can be evaluated zero-shot. This means MedProb should not be interpreted as a purely zero-shot method. However, our goal is not to compare zero-shot prompting with supervised learning in general, but to test whether answer-relevant information is already present in frozen VLM representations and can be recovered with minimal supervision. The probe is intentionally simple, updates no VLM parameters, and uses only a lightweight linear classifier.

Second, our experiments focus primarily on closed-ended Med-VQA benchmarks, and most non-yes/no items on SLAKE and VQA-RAD are still effectively 2-way rather than true multiclass; we report a dedicated true-multiclass evaluation on OmniMedVQA (4-way) in Appendix G. This setting allows controlled comparison across models and avoids ambiguity in free-text answer matching, but it does not capture the full complexity of open-ended clinical reasoning. We therefore view MedProb as a diagnostic tool for measuring recoverable answer signal, not as a complete clinical question-answering system. Extending the approach to open-ended VQA, report generation, and more complex clinical workflows is an important direction for future work; as an initial step in this direction, Appendix H shows the probe can score open-ended candidate generations in a rejection-sampling framework.

Third, linear probing measures what is linearly decodable from a chosen representation, not everything a model may know. A failure of the probe does not necessarily mean that the information is absent from the model; it may be encoded nonlinearly, distributed across layers, or dependent on richer aggregation strategies. This limitation makes our results conservative: despite using a simple probe, MedProb still recovers substantially more task-relevant signal than prompting across benchmarks. Following, we treat MedProb as a diagnostic tool for assessing representational content rather than model behavior. High probing accuracy means that closed-ended answer labels are linearly recoverable from frozen VLM hidden states on these benchmarks. It does not by itself show that the decoded directions are causally responsible for the model’s predictions, nor that they correspond to clinically meaningful knowledge in a causal sense.

Default Prompt Formats

In this section, we describe the default prompt formats used for each model family, using a representative multiple-choice question as a running example. We use the following color conventions throughout: the question text is shown in violet, the answer options in orange, and the image token in red. Importantly, the placement of the image token relative to the text block is not uniform across model families. For the Gemma 3 family (including MedGemma), the text block is placed before the image token within the user turn, following the ordering convention specified in the official model cards. We follow each model’s recommended convention strictly, as incorrect ordering can affect how the model attends to the visual input.

MedGemma (4B and 27B)

MedGemma shares the same underlying Gemma 3 architecture and tokenizer, and therefore uses an identical chat template structure. As with Gemma 3, the instruction-tuned models support only a user turn and a model turn, and do not natively support a system role; we therefore omit a system prompt entirely and keep the input minimal. Each prompt consists of a single user turn containing the question text followed by the answer options, formatted as a multiple-choice question consistent with the structure demonstrated in the official MedGemma fine-tuning notebook. A single image is appended after the text within the same user turn, following the ordering convention specified in the model card. Although MedGemma has been domain-adapted on medical imaging data, its prompt format is marked as partially available because no dedicated closed-ended evaluation protocol has been publicly released; we therefore rely on the format demonstrated in the fine-tuning notebook. The resulting prompt format is illustrated in Box C.2.

OpenFlamingo (9B)

OpenFlamingo uses no system prompt. Each prompt opens with a brief task instruction prepended directly to the conversation body, followed by the image token and the question text within the same turn. Answer options are formatted with lettered parenthetical labels on separate lines, and generation is triggered by a trailing Answer: stub. Notably, the image token is placed before the question text within the user turn, which is the opposite ordering convention from the Gemma 3 family described above. The resulting prompt format is illustrated in Box C.2.

Med-Flamingo (9B)

Med-Flamingo shares the same overall prompt structure as OpenFlamingo above, differing primarily in its system preamble. Rather than a generic task instruction, the preamble is replaced by the medically-adapted prompt from the official demo, which instructs the model to act as a helpful medical assistant and to follow provided examples before answering. The image token, question text, lettered answer options, and trailing Answer: stub follow the same ordering and formatting conventions described for OpenFlamingo. The resulting prompt format is illustrated in Box C.2.

BioMed-Qwen2-VL-2B (2B)

BioMed-Qwen2-VL-2B shares an identical prompt structure to BioMed-Llama-3.2-11B-Vision above, with the image token placed before the question text, the same Question: and The choices are: prefixes, and options rendered as a Python-style list. The only difference lies in the underlying backbone architecture; the prompt format itself is unchanged across the three BioMed models released by. The resulting prompt format is illustrated in Box C.2.

InternVL3-1B (1B)

InternVL3-1B uses no system prompt. Each prompt begins with the image token on its own line, followed by the question text prefixed by Question:, and then the answer options listed on separate lines under an Options: header, each prefixed by its corresponding letter label. A closing instruction line, Please select the correct answer from the options above., is appended after the options. The image token is placed before the question text, consistent with the ordering convention used by the BioMed-InternVL3-1B described above. The resulting prompt format is illustrated in Box C.2.

Llama-3.2-11B-Vision (11B)

Llama-3.2-11B-Vision uses no system prompt and follows the chat template prescribed by the official vision prompt format documentation. Each prompt is wrapped in the model’s native special tokens, opening with <|begin_of_text|> and a <|start_header_id|>user<|end_header_id|> role header. The <|image|> tag is placed immediately after the role header and before the question text, as required by the architecture: images only attend to subsequent text tokens, so the question must follow rather than precede the image tag. As no official closed-ended evaluation protocol is provided, the formatting of answer options and the closing instruction Answer with the letter only. were designed by us; answer options are listed on separate lines with parenthetical letter labels, and the closing instruction is appended after the final option. Generation is triggered by a trailing assistant<|end_header_id|> header. The resulting prompt format is illustrated in Box C.2.

Where MedProb Fails to Improve

MedProb fails to resolve errors on questions where the underlying visual distinction is too fine-grained, structurally ambiguous, or beyond the discriminative capacity of the model’s representations at any single layer. In these cases, both prompting and probing fail simultaneously, indicating that the deficit lies in the depth of perceptual encoding rather than in the elicitation mechanism. These tasks tend to involve subtle radiological patterns (e.g., distinguishing ring-enhancing from non-ring-enhancing lesions), complex histological tissue architecture, or multi-feature pathological descriptions requiring simultaneous integration of several visual cues. When representations do not encode a reliable decision boundary, a linear probe has nothing to extract, and these questions expose the true perceptual ceiling of the underlying vision-language model. No elicitation mechanism can recover signal that is absent from the representation.

Both models demonstrate genuine radiological expertise: Model 1 correctly defines ring enhancement, and Model 2 appropriately considers multiple sclerosis as a differential diagnosis, even invoking the clinical term “Dawson’s fingers.” Yet both arrive at the wrong answer, and both probes also fail. The fact that two independently trained models, using different reasoning strategies, produce the same wrong conclusion, with both their latent representations and their language outputs failing, indicates this is a perceptual encoding failure rather than a reasoning failure. The fine-grained spatial distinction between ring-shaped and nodular enhancement is not encoded reliably in any probed layer of either model.

Where MedProb Underperforms Prompting

MedProb underperforms prompting on questions that benefit from explicit semantic reasoning, medical world knowledge, or direct visual labeling naturally expressible in language. Prompting succeeds on these cases by leveraging the model’s broad medical knowledge base, composing pathological features into a clinical judgment, naming anatomy from contextual cues, or reasoning step-by-step from visible findings to a diagnosis. A linear probe is a shallow decoder capable only of recovering information that is linearly separable in a single layer’s activation space. Compositional reasoning, clinical inference chains, and world-knowledge-driven interpretation are fundamentally nonlinear and distributed, precisely the features a linear probe is least equipped to capture. As a result, the probe performs worse on questions where the correct answer requires integrating multiple visible features into a high-level clinical concept.