# Mediconfusion Eval

> Probes the visual reasoning reliability and robustness of multimodal medical foundation models by presenting pairs of visually distinct but semantically confused medical images. It measures whether models can correctly answer questions about each image individually and consistently across the pair, revealing shortcut learning and hallucination tendencies. Use when the user wants to benchmark on MediConfusion, or asks about evaluating this task. Reports Set accuracy.

- Skill: `qhjqhj00/mediconfusion-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/mediconfusion-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/mediconfusion-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/mediconfusion-eval

---


# mediconfusion-eval

> MediConfusion: Can you trust your AI radiologist? Probing the reliability of multimodal medical foundation models — Sepehri et al. (2024) (arXiv:2409.15477, 2024)

## What this evaluates

Probes the visual reasoning reliability and robustness of multimodal medical foundation models by presenting pairs of visually distinct but semantically confused medical images. It measures whether models can correctly answer questions about each image individually and consistently across the pair, revealing shortcut learning and hallucination tendencies.

## Datasets

- **MediConfusion** — total ?; splits: test (-1); repo https://github.com/AIF4S/MediConfusion

## Metrics

- `Set accuracy` **(primary)** — range: percent
  - Percentage of confusing image pairs where the model correctly answers the question for both images in the pair.
- `Individual accuracy` — range: percent
  - Standard accuracy metric: percentage of correct answers across all individual image-question instances.
- `Confusion score` — range: percent
  - Percentage of pairs where the model outputs the same answer for both images, excluding invalid or failed answers. High scores indicate visual invariance and reliance on language bias.

## Input / output format

**Input**: A medical image paired with a question (multiple-choice or free-form) and optionally a set of answer options.

**Output**: Text response. For MC/GD: a single letter option. For FF/PS: full answer text or sentence. Evaluated via regex parsing or LLM matching.

## Scoring recipe

```python
# predictions: list of dicts with keys 'img_id', 'q_id', 'answer', 'pair_id'
# gold: dict mapping (img_id, q_id) to correct answer string
# pair_map: dict mapping pair_id to tuple (img_id_1, img_id_2)

indiv_correct = sum(1 for p in predictions if p['answer'] == gold[(p['img_id'], p['q_id'])])
individual_accuracy = (indiv_correct / len(predictions)) * 100

pair_answers = {}
for p in predictions:
    pair_answers.setdefault(p['pair_id'], []).append(p['answer'])

pair_correct = 0; pair_total = 0; confused = 0
for pid, answers in pair_answers.items():
    if len(answers) != 2: continue
    img1, img2 = pair_map[pid]
    if answers[0] == gold[(img1, p['q_id'])] and answers[1] == gold[(img2, p['q_id'])]:
        pair_correct += 1
    pair_total += 1
    if answers[0] == answers[1]:
        confused += 1

set_accuracy = (pair_correct / pair_total) * 100
confusion_score = (confused / pair_total) * 100
return set_accuracy, individual_accuracy, confusion_score
```

## Common pitfalls

- Models are highly sensitive to prompt formatting and language bias, requiring multiple evaluation techniques (MC, GD, FF, PS) to fairly assess true visual knowledge.
- Proprietary models lack access to output logits, making prefix-based scoring (PS) and greedy decoding (GD) impossible, so results are only reported for multiple-choice (MC) prompting.
- High confusion scores (>90%) indicate models ignore visual differences and answer based on text/context, which can mask true visual understanding.

## Evidence (verbatim from paper)

> We evaluate models on MediConfusion based on two notions of accuracy. Set accuracy is the portion of correct confusing pairs, where we only consider a pair correct if the model has answered the question correctly for both images in the pair. Individual accuracy is the standard notion of accuracy, that is, the portion of correct answers over all questions. An example is depicted in Figure [3]. Furthermore, we report confusion score, which indicates the portion of pairs where the model has chosen the same answer for both images in the pair, out of all pairs (we exclude pairs where the model generated invalid answers or failed to answer).

## Citation

```bibtex
@misc{sepehri2024mediconfusion,
  title={MediConfusion: Can you trust your AI radiologist? Probing the reliability of multimodal medical foundation models},
  author={Sepehri et al. (2024)},
  year={2024},
  note={arXiv:2409.15477}
}
```

- arXiv: 2409.15477

