File size: 7,846 Bytes
3c19a72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
license: cc-by-4.0
language:
- en
pretty_name: PaintBench
task_categories:
- image-to-image
- image-text-to-image
size_categories:
- 1K<n<10K
tags:
- benchmark
- image-editing
- visual-editing
- paintbench
- evaluation
dataset_info:
- config_name: PaintBench
  features:
  - name: category
    dtype: string
  - name: task
    dtype: string
  - name: mode
    dtype: string
  - name: problem_id
    dtype: int32
  - name: instruction
    dtype: string
  - name: input_image
    dtype: image
  - name: answer_image
    dtype: image
  - name: metadata
    dtype: string
  splits:
  - name: test
    num_bytes: 17727512
    num_examples: 1050
  download_size: 16940626
  dataset_size: 17727512
- config_name: TinyGrafixBench
  features:
  - name: category
    dtype: string
  - name: task
    dtype: string
  - name: mode
    dtype: string
  - name: problem_id
    dtype: int32
  - name: instruction
    dtype: string
  - name: input_image
    dtype: image
  - name: answer_image
    dtype: image
  - name: metadata
    dtype: string
  splits:
  - name: test
    num_bytes: 51745870
    num_examples: 600
  download_size: 51552058
  dataset_size: 51745870
- config_name: ablations
  features:
  - name: category
    dtype: string
  - name: task
    dtype: string
  - name: mode
    dtype: string
  - name: problem_id
    dtype: int32
  - name: instruction
    dtype: string
  - name: input_image
    dtype: image
  - name: answer_image
    dtype: image
  - name: metadata
    dtype: string
  splits:
  - name: test
    num_bytes: 20114921
    num_examples: 1080
  download_size: 19106533
  dataset_size: 20114921
configs:
- config_name: PaintBench
  default: true
  data_files:
  - split: test
    path: PaintBench/test-*
- config_name: TinyGrafixBench
  data_files:
  - split: test
    path: TinyGrafixBench/test-*
- config_name: ablations
  data_files:
  - split: test
    path: ablations/test-*
---

# PaintBench

**A precise, deterministic visual editing benchmark.** PaintBench evaluates whether generative models can execute MS-Paint-style image editing operations with pixel-level correctness. Every problem is a `(input_image, instruction, answer_image)` triplet, generated programmatically so the answer is pixel-exact and the answer distribution is known by construction.

This dataset bundles three sibling benchmarks that share one generation and evaluation pipeline:

| Subset (config) | Rows | Scope |
|---|---|---|
| **PaintBench** (default) | 1,050 | 20 canonical tasks (35 task-modes) grouped into 4 categories — `geometric_transformation`, `structural_manipulation`, `color_change`, `symbolic_reasoning`. |
| **TinyGrafixBench** | 600 | Chart-edit mini-benchmark: 5 chart types (`bar_chart`, `heatmap`, `line_chart`, `network`, `scatter_plot`) × 4 edit subtasks per chart — a real-world analog of the primitive operations. The chart type is the `category` and the edit subtask is the `task` (mirrors the PaintBench grouping). |
| **ablations** | 1,080 | Per-axis variation studies on 4 focal PaintBench tasks (`removal_attribute`, `recolor_color_code`, `copying`, `preservation`) × 9 variants. Every row has `category="ablation"`; the focal task is the `task` and the variant (`baseline`, `horizontal`, `vertical`, `small`, `nonstandard`, `striped`, `n16`, `n36`, `n64`) is the `mode`. |

Each subset has a single `test` split — the benchmarks are intended for evaluation, not training.

## Quick start

```python
from datasets import load_dataset

ds  = load_dataset("PaintBench/PaintBench", split="test")
tgb = load_dataset("PaintBench/PaintBench", "TinyGrafixBench", split="test")
abl = load_dataset("PaintBench/PaintBench", "ablations",       split="test")

ex = ds[0]
ex["category"]      # top-level group, e.g. "color_change"
ex["task"]          # canonical task, e.g. "flood_fill"
ex["mode"]          # subtask, e.g. "background"  ("" when the task has no modes)
ex["instruction"]   # natural-language edit instruction
ex["input_image"]   # PIL.Image — the source canvas
ex["answer_image"]  # PIL.Image — pixel-exact ground truth
ex["metadata"]      # JSON string — full per-problem spec (seed, scene_shapes, params, ...)
```

Group by category / task / mode:

```python
from collections import Counter
Counter(ds["category"]).most_common()       # 4 PaintBench categories
Counter(tgb["category"]).most_common()      # 5 chart types
Counter(abl["mode"]).most_common()          # 9 ablation variants
```

## Schema

All three configs share a uniform schema:

| Column | Type | Description |
|---|---|---|
| `category` | `string` | Top-level grouping. **PaintBench**: one of `geometric_transformation` / `structural_manipulation` / `color_change` / `symbolic_reasoning`. **TinyGrafixBench**: chart type (`bar_chart`, `heatmap`, `line_chart`, `network`, `scatter_plot`). **ablations**: `"ablation"`. |
| `task` | `string` | Operation within the category. **PaintBench**: canonical task (`flood_fill`, `recolor`, `translation`, ...). **TinyGrafixBench**: chart-edit subtask (`add_bar`, `sort_bars`, `mask_cells`, ...). **ablations**: focal task identifier (`removal_attribute`, `recolor_color_code`, `copying`, `preservation`). |
| `mode` | `string` | Subtask / variant within the `task`. **PaintBench**: subtask (`background`, `foreground`, `external`, ...) or `""` when the task has no modes. **TinyGrafixBench**: always `""`. **ablations**: variant (`baseline`, `horizontal`, `vertical`, `small`, `nonstandard`, `striped`, `n16`, `n36`, `n64`). The on-disk `problems.jsonl` keeps the empty slots as JSON `null`; the dataset normalizes to `""` so the column stays a non-nullable `string`. |
| `problem_id` | `int32` | Zero-indexed id within the `(category, task, mode)` cell. |
| `instruction` | `string` | Natural-language edit instruction. |
| `input_image` | `image` | Source canvas (PNG, embedded). |
| `answer_image` | `image` | Pixel-exact ground-truth output (PNG, embedded). |
| `metadata` | `string` | JSON-encoded per-problem spec — includes the random seed, scene composition, the on-disk folder name (`task_mode`), and any per-subset extras (`base_task_canonical` / `base_task_mode` for `ablations`; `params` / `scene_shapes` / colors for `PaintBench`). Useful for filtering, grouping, and exact regeneration. |

To pull structured fields out of `metadata`:

```python
import json
ex = ds[0]
meta = json.loads(ex["metadata"])
meta["seed"]                  # for deterministic regeneration
meta["task_mode"]             # on-disk folder name (= "<task>_<mode>" or "<task>")
meta.get("base_task_canonical")  # populated only for the `ablations` config
meta.get("scene_shapes")      # PaintBench scene composition
```

## Evaluation

PaintBench uses pointwise CIE76 ΔE between the model's output and `answer_image`. Per-pixel ΔE values are thresholded at {0, 2, 5, 10} and aggregated to per-problem and per-task pass rates. The reference implementation lives in the [project repo](https://github.com/PaintBench/paintbench-internal).

## Source

The benchmarks are generated programmatically — there is no human curation step. Every problem is reproducible from its `metadata.seed`. See the [project repo](https://github.com/PaintBench/paintbench-internal) for the generation pipeline and a full per-task description.

## License

Released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. You are free to share and adapt the dataset, including for commercial use, with attribution.

## Citation

Citation will be added upon paper publication. For now, please reference this dataset as:

```bibtex
@misc{paintbench2026,
  title  = {PaintBench: A Precise, Deterministic Visual Editing Benchmark},
  author = {PaintBench team},
  year   = {2026},
  url    = {https://huggingface.co/datasets/PaintBench/PaintBench}
}
```