Med-R2-Bench / README.md
BiTaNan's picture
Add dataset card and usage guide
b67a8e7 verified
|
Raw History Blame Contribute Delete
7.15 kB
metadata
pretty_name: Med-R2 Bench
language:
  - en
license: other
size_categories:
  - 10K<n<100K
task_categories:
  - visual-question-answering
  - image-to-text
  - question-answering
tags:
  - medical
  - medical-vlm
  - vision-language
  - adversarial-benchmark
  - evidence-grounded-reasoning
  - clinical-report-generation
configs:
  - config_name: default
    data_files:
      - split: train
        path: train/*.jsonl
      - split: test
        path: test/*.jsonl

🩺 Med-R2 Bench

An adversarial benchmark for evidence-grounded reasoning in medical vision-language models

Med-R2 Bench evaluates whether a medical VLM can make decisions from visual evidence instead of relying on superficial language patterns. The benchmark combines image-quality perturbations, anatomy-level reasoning, lesion-level reasoning, clinical-report generation, and multi-step joint QA in one consistent release.

πŸ“„ Paper: Med-R2: An Adversarial Benchmark for Evidence-Grounded Reasoning in Medical VLMs (EMNLP 2026 Main Conference)

πŸ”— Project repository: BiTaNannnnn/Med-R2-Bench on GitHub


✨ What is in the dataset?

The public release contains 99,997 English JSONL QA examples and the image files referenced by those examples.

Split Level 1 Level 3 Level 4 Level 5 Joint QA Total
πŸ§ͺ Test 2,640 7,316 11,140 600 500 22,196
πŸ‹οΈ Train 5,184 14,152 25,557 30,320 2,588 77,801
🌟 Total 7,824 21,468 36,697 30,920 3,088 99,997

Level 2 is not part of this benchmark release. The level numbering follows the original Med-R2 task design.

🧠 Evaluation tracks

Track Medical reasoning focus Representative tasks
Level 1 Β· Image quality Detect whether an image has been corrupted or altered Noise recognition, artifact recognition
Level 3 Β· Anatomy Identify organs and reason about location or erased evidence Organ recognition, organ location, organ eraser identification
Level 4 Β· Lesions Reason about body parts, lesions, boxes, and lesion size Body-part recognition, lesion recognition, multi-box reasoning, lesion size
Level 5 Β· Clinical reports Generate a report under localized or image-level interference Box report, noise interference, artifact interference
Joint QA Β· Multi-step reasoning Answer a sequence from modality to anatomy, abnormality, and diagnosis Four-step sequential visual reasoning

βš”οΈ Adversarial diversity

Med-R2 is designed to test robustness under controlled visual changes. Depending on the task, examples include:

  • βœ… Positive cases: the visual evidence and the question are consistent.
  • βž– Neutral / normal cases: the image provides no abnormal evidence for the queried condition.
  • ❌ Negative / adversarial cases: the question, region, or visual evidence is intentionally mismatched.
  • πŸŸ₯ Box interventions: correct boxes, wrong boxes, or localized regions that redirect attention.
  • 🧹 Erased-region cases: relevant anatomy or evidence is removed or occluded.
  • πŸ”Š Noise and artifact interventions: image-level corruption is added while the underlying medical content is controlled.

This diversity makes it possible to measure not only average accuracy, but also whether a model remains evidence-grounded across positive, normal, and adversarial conditions.

πŸ“ Repository layout

Med-R2-Bench/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ visual_evidence_Level1.jsonl
β”‚   β”œβ”€β”€ visual_evidence_Level3.jsonl
β”‚   β”œβ”€β”€ visual_evidence_Level4.jsonl
β”‚   β”œβ”€β”€ visual_evidence_Level5.jsonl
β”‚   └── visual_evidence_joint_qa.jsonl
β”œβ”€β”€ test/
β”‚   └── same five JSONL files as train/
└── Med-R2-Bench/
    β”œβ”€β”€ dataset/          # Referenced generated and processed images
    └── images/            # Referenced visual-evidence and joint-QA images

The JSONL files are the benchmark annotations. The image files are released separately in the nested Med-R2-Bench/ directory so that the image_paths field remains reproducible after downloading the repository.

🧾 Annotation format

Each JSONL line is one example. The exact fields depend on the evaluation track, but common fields include:

Field Description
image_paths Repository-relative image path, such as Med-R2-Bench/dataset/...png
question The visual question or report-generation instruction
options Multiple-choice options when the task is closed-ended
answer Gold answer for the example
task Fine-grained task name, such as noise_recognition or lesion_recognition
type Data condition or adversarial bucket
modality Imaging modality, when available

Level 5 report examples use an open-ended answer field rather than multiple-choice options. Joint QA examples include the sequential prompts and gold answers for each reasoning step.

πŸš€ Loading the annotations

from datasets import load_dataset

dataset = load_dataset(
    "BiTaNan/Med-R2-Bench",
    data_files={
        "train": "train/*.jsonl",
        "test": "test/*.jsonl",
    },
)

print(dataset)
print(dataset["test"][0])

To resolve an image locally after downloading the repository:

from pathlib import Path

repo_root = Path("/path/to/Med-R2-Bench")
image_file = repo_root / example["image_paths"]

The image paths are intentionally relative and contain no private server prefixes. The public package does not include model weights or prediction results.

πŸ“Š Evaluation code and prompts

The benchmark-construction code, metric scripts, comparison scripts, and prompt notes are maintained in the companion GitHub repository:

πŸ‘‰ https://github.com/BiTaNannnnn/Med-R2-Bench

The Hugging Face repository is the data release. The GitHub repository is the code and documentation release.

πŸ” Release and usage notes

  • The released annotations use English prompts and answers.
  • Absolute server paths have been removed from the public annotations.
  • Model weights, private experiment outputs, API keys, and training logs are not included.
  • Please check the licenses and terms of the underlying medical image sources before redistributing the data or using it in a new collection.
  • This benchmark is intended for research evaluation and does not provide medical advice or a clinical diagnostic service.

πŸ“š Citation

@inproceedings{medr2-2026,
  title = {Med-R2: An Adversarial Benchmark for Evidence-Grounded Reasoning in Medical VLMs},
  author = {Ma, Wen and collaborators},
  booktitle = {Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing},
  year = {2026}
}

⭐ If you use Med-R2 Bench, please cite the paper and link back to both the dataset and the GitHub repository.