Datasets:
Add SemVarBench README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-to-image
|
| 5 |
+
- text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- compositionality
|
| 10 |
+
- semantic-variation
|
| 11 |
+
- text-to-image
|
| 12 |
+
- benchmark
|
| 13 |
+
- vision-language
|
| 14 |
+
pretty_name: SemVarBench
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: default
|
| 19 |
+
data_files:
|
| 20 |
+
- split: train
|
| 21 |
+
path: train.parquet
|
| 22 |
+
- split: test
|
| 23 |
+
path: test.parquet
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# SemVarBench
|
| 27 |
+
|
| 28 |
+
SemVarBench is the benchmark from the ICLR 2025 paper
|
| 29 |
+
[**Evaluating Semantic Variation in Text-to-Image Synthesis: A Causal Perspective**](https://openreview.net/forum?id=NWb128pSCb),
|
| 30 |
+
designed together with the **SemVarEffect** metric to evaluate the causality between
|
| 31 |
+
semantic variations in the input text and the generated image in text-to-image (T2I)
|
| 32 |
+
synthesis.
|
| 33 |
+
|
| 34 |
+
Each example is built around a base caption `T0` and a minimally-edited variant `T1`
|
| 35 |
+
that changes the composition (e.g. swapped subject/object or swapped attributes) while
|
| 36 |
+
reusing the same words, plus `T2`, a paraphrase of `T1` (passive voice / reordering)
|
| 37 |
+
that is semantically equivalent to `T1`. Semantic variations are achieved through two
|
| 38 |
+
types of linguistic permutations while avoiding easily predictable literal variations.
|
| 39 |
+
|
| 40 |
+
This dataset is the flattened version of the `benchmark/` directory in the
|
| 41 |
+
[SemVarBench GitHub repository](https://github.com/zhuxiangru/SemVarBench), merging:
|
| 42 |
+
|
| 43 |
+
- [`trainingset/training_data.txt`](https://github.com/zhuxiangru/SemVarBench/blob/main/benchmark/trainingset/training_data.txt) — the **train** split (10,770 rows).
|
| 44 |
+
- [`testset/test_data.txt`](https://github.com/zhuxiangru/SemVarBench/blob/main/benchmark/testset/test_data.txt) — the **test** split (684 rows).
|
| 45 |
+
- [`testset_divided_category/`](https://github.com/zhuxiangru/SemVarBench/tree/main/benchmark/testset_divided_category) — 20 per-category slices of the test set, used here to populate the `categories` field.
|
| 46 |
+
|
| 47 |
+
## Data fields
|
| 48 |
+
|
| 49 |
+
| Column | Description |
|
| 50 |
+
|--------|-------------|
|
| 51 |
+
| `id` | Unique example identifier (e.g. `0_61_326`). |
|
| 52 |
+
| `T0` | Base caption. |
|
| 53 |
+
| `T1` | Semantically varied caption (minimal compositional edit of `T0`). |
|
| 54 |
+
| `T2` | Paraphrase of `T1` (passive / reordered), semantically equivalent to `T1`. |
|
| 55 |
+
| `categories` | List of contrast-category tags. Populated for the **test** split; empty (`[]`) for the **train** split. A test example may carry more than one tag (118 of 684 do). |
|
| 56 |
+
|
| 57 |
+
### The 20 test categories
|
| 58 |
+
|
| 59 |
+
`absolute_location`, `action`, `age`, `appearance`, `color`, `counting`, `direction`,
|
| 60 |
+
`height`, `interaction`, `manner`, `material`, `relative_location`, `sentiment`,
|
| 61 |
+
`shape`, `size`, `spatio_temporal`, `temperature`, `texture`, `vague_amount`, `weight`.
|
| 62 |
+
|
| 63 |
+
## Splits
|
| 64 |
+
|
| 65 |
+
| Split | Rows |
|
| 66 |
+
|-------|------|
|
| 67 |
+
| `train` | 10,770 |
|
| 68 |
+
| `test` | 684 |
|
| 69 |
+
|
| 70 |
+
Train and test ids are disjoint. The 20 category files together cover exactly the 684
|
| 71 |
+
test ids (no more, no fewer).
|
| 72 |
+
|
| 73 |
+
## Usage
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
from datasets import load_dataset
|
| 77 |
+
|
| 78 |
+
ds = load_dataset("zhuxiangru/SemVarBench")
|
| 79 |
+
print(ds["test"][0]["T0"], "||", ds["test"][0]["T1"], "||", ds["test"][0]["T2"])
|
| 80 |
+
|
| 81 |
+
# filter the test set to a single category
|
| 82 |
+
color = ds["test"].filter(lambda r: "color" in r["categories"])
|
| 83 |
+
print(len(color), "color examples")
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Related work
|
| 87 |
+
|
| 88 |
+
The predecessor dataset [Winoground-T2I](https://github.com/zhuxiangru/Winoground-T2I)
|
| 89 |
+
is also available on the Hub at
|
| 90 |
+
[`zhuxiangru/Winoground-T2I`](https://huggingface.co/datasets/zhuxiangru/Winoground-T2I).
|
| 91 |
+
|
| 92 |
+
## Citation
|
| 93 |
+
|
| 94 |
+
If you find the data in our project useful, please consider citing our work:
|
| 95 |
+
|
| 96 |
+
```bibtex
|
| 97 |
+
@inproceedings{DBLP:conf/iclr/ZhuSSXL00YX25,
|
| 98 |
+
author = {Xiangru Zhu and
|
| 99 |
+
Penglei Sun and
|
| 100 |
+
Yaoxian Song and
|
| 101 |
+
Yanghua Xiao and
|
| 102 |
+
Zhixu Li and
|
| 103 |
+
Chengyu Wang and
|
| 104 |
+
Jun Huang and
|
| 105 |
+
Bei Yang and
|
| 106 |
+
Xiaoxiao Xu},
|
| 107 |
+
title = {Evaluating Semantic Variation in Text-to-Image Synthesis: {A} Causal
|
| 108 |
+
Perspective},
|
| 109 |
+
booktitle = {The Thirteenth International Conference on Learning Representations,
|
| 110 |
+
{ICLR} 2025, Singapore, April 24-28, 2025},
|
| 111 |
+
publisher = {OpenReview.net},
|
| 112 |
+
year = {2025},
|
| 113 |
+
url = {https://openreview.net/forum?id=NWb128pSCb},
|
| 114 |
+
timestamp = {Thu, 15 May 2025 17:19:05 +0200},
|
| 115 |
+
biburl = {https://dblp.org/rec/conf/iclr/ZhuSSXL00YX25.bib},
|
| 116 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
| 117 |
+
}
|
| 118 |
+
```
|