CausalMedBench / README.md
leaf0932's picture
Public CausalMedBench benchmark release
e091e85
|
Raw History Blame Contribute Delete
7.05 kB
---
license: c-uda
language:
- en
task_categories:
- image-classification
- visual-question-answering
tags:
- medical
- deepfake-detection
- multimodal-reasoning
- counterfactual-evaluation
- explainability
pretty_name: CausalMedBench
size_categories:
- 10K<n<100K
configs:
- config_name: five_view
default: true
data_files:
- split: train
path: five_view/train-*.parquet
- split: validation
path: five_view/validation-*.parquet
- split: test
path: five_view/test-*.parquet
- config_name: ordinary
data_files:
- split: test
path: ordinary/test-*.parquet
---
# CausalMedBench
CausalMedBench is an independent downstream benchmark created for this project.
It was not proposed or released as part of the MedForge paper or the official
MedForge release. CausalMedBench evaluates whether a medical deepfake detector's
final decision and explanation are supported by the visual evidence it claims
to use.
The upstream authentic images, forged images, manipulation boxes, and
real--forged pairing metadata come from MedForge-90K. CausalMedBench introduces
the five causal views, fixed splits, evidence-dependency tasks, explanation
faithfulness protocol, evaluation metrics, and public scorer. It contains 8,212
source-linked groups (41,060 five-view examples) across brain MRI, chest X-ray,
and fundus imaging.
The fixed held-out benchmark contains 1,840 groups (9,200 five-view examples),
an ordinary detection set of 6,501 images, and a stratified explanation subset
of 300 groups (1,500 examples).
## Five causal views
Each group contains:
1. `forged_original`: the original forged image.
2. `authentic_source`: the corresponding image before manipulation.
3. `local_restored`: the forged image with the annotated manipulated box
restored from the authentic source; the rest of the forged image is unchanged.
4. `local_forged_only`: the authentic image with only the annotated forged box
inserted; the rest of the image is authentic.
5. `authentic_nuisance`: the authentic image after a deterministic mild JPEG,
blur, denoising, or resize-resampling perturbation that preserves its medical
content.
Together, these views test ordinary detection, local evidence sufficiency,
global/outside evidence sufficiency, benign-perturbation invariance, five-view
consistency, and explanation–evidence alignment.
## Load the benchmark
```python
from datasets import load_dataset
five_view = load_dataset("leaf0932/CausalMedBench", "five_view")
ordinary = load_dataset("leaf0932/CausalMedBench", "ordinary", split="test")
print(five_view)
print(five_view["test"][0])
```
The `five_view` configuration has `train`, `validation`, and `test` splits. The
`ordinary` configuration contains the fixed 6,501-image detection test split.
Images are embedded in Parquet shards, so no local MedForge path is required.
## Prediction format
Classification predictions are JSONL records keyed by `record_id`:
```json
{"record_id":"pair_001174f8d03bfe37::forged_original","verdict":"FAKE"}
```
For the 1,500 records where `is_reasoning_subset` is `true`, structured
explanations use:
```json
{"record_id":"pair_001174f8d03bfe37::forged_original","verdict":"FAKE","evidence_type":"mixed","evidence_location":"mixed","evidence":"The localized anatomy is inconsistent and the surrounding texture also differs."}
```
Allowed evidence types are `none`, `local_medical`, `local_forensic`,
`local_medical_and_local_forensic`, `global_forensic`, and `mixed`. Allowed
locations are `none`, `local_bbox`, `global_or_outside`, and `mixed`.
## Score predictions
```bash
git clone https://huggingface.co/datasets/leaf0932/CausalMedBench
cd CausalMedBench
python -m pip install -r requirements.txt
python evaluation/score.py \
--ordinary-predictions /path/to/ordinary_predictions.jsonl \
--five-view-predictions /path/to/five_view_predictions.jsonl \
--reasoning-predictions /path/to/reasoning_predictions.jsonl \
--output metrics.json
```
The scorer reports:
- ordinary Accuracy and Macro-F1, including modality, forgery-type, and
generator breakdowns;
- five-view accuracy and all-five-correct consistency;
- local and global evidence sufficiency;
- benign nuisance invariance and authentic recovery;
- explanation verdict, evidence-type, evidence-location, and joint alignment.
Run `python evaluation/score.py --help` for local dataset and strict-coverage
options. A submission template is included in `examples/`.
## Dataset fields
Important fields include `record_id`, `group_id`, `view_id`, `target_label`,
`image`, `bbox_normalized_1000`, `modality`, `forgery_type`, `generator`,
`disease`, `operation`, `evidence_available`, `evidence_removed`, and
`is_reasoning_subset`. Bounding boxes use a 0–1000 normalized coordinate system.
The released masks are rectangular box rasterizations, not pixel-precise
segmentation masks. The locally composed views use an 8-pixel feathered box
boundary. Nuisance operations are deterministic and recorded per row.
## Source and license
CausalMedBench uses source data from
[`RichardChenZH/MedForge-90K`](https://huggingface.co/datasets/RichardChenZH/MedForge-90K).
The data, including redistributed and derived images, is released under the
Computational Use of Data Agreement (C-UDA). Users must comply with C-UDA and
preserve the upstream attribution. Benchmark code in `evaluation/` and `scripts/`
is provided under Apache-2.0. See `LICENSE` and `DATA_LICENSE.md` for details.
The MedForge citation acknowledges the upstream data source only. It does not
attribute CausalMedBench, its five-view construction, its evaluation protocol,
or experiments conducted with CausalMedBench to the MedForge authors.
This benchmark is for research and educational use. It is not a clinical
diagnostic tool and must not be used to make patient-care decisions.
## Citation
Please cite CausalMedBench for the benchmark, five-view construction, evaluation
protocol, metrics, and scorer:
```bibtex
@misc{you2026causalmedbench,
title={CausalMedBench: Evaluating Evidence Dependency and Explanation Faithfulness in Medical Deepfake Reasoning},
author={You, Maowei},
year={2026},
howpublished={Hugging Face dataset},
url={https://huggingface.co/datasets/leaf0932/CausalMedBench},
version={1.0.0}
}
```
The manuscript citation will replace the repository citation after the paper is
publicly archived. Because the released images and source annotations originate
from MedForge-90K, also cite MedForge as the upstream data source:
```bibtex
@misc{chen2026medforge90k,
title={MedForge-90K},
author={Chen, Zhihui and He, Kai and Lei, Qingyuan and Pu, Bin and Zhang, Jian and Xu, Yuling and Feng, Mengling},
year={2026},
howpublished={Hugging Face dataset},
url={https://huggingface.co/datasets/RichardChenZH/MedForge-90K},
note={Upstream source dataset used to construct CausalMedBench}
}
```
These two citations serve different purposes: the first credits CausalMedBench;
the second preserves the required attribution for the MedForge-90K source data.