File size: 10,089 Bytes
3ffc717 4bfb66d 2fd1458 3908311 3ffc717 2fd1458 4bfb66d 2fd1458 36d90ff 2fd1458 0613766 2fd1458 dc6765d 3ffc717 93d8935 2fd1458 dc6765d 2fd1458 dc6765d 93d8935 2fd1458 93d8935 2fd1458 93d8935 2fd1458 dc6765d 93d8935 dc6765d | 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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | ---
configs:
- config_name: default
data_files:
- split: scene1
path: data/scene1-*
- split: scene2
path: data/scene2-*
- split: scene3
path: data/scene3-*
- split: scene4
path: data/scene4-*
- split: fall
path: data/fall-*
- split: refraction
path: data/refraction-*
- split: slope
path: data/slope-*
- split: spring
path: data/spring-*
dataset_info:
features:
- name: image
dtype: image
- name: render_path
dtype: string
- name: metavalue
dtype: string
splits:
- name: scene1
num_examples: 11736
num_bytes: 19942310778.0
- name: scene2
num_examples: 11736
num_bytes: 17009899490.0
- name: scene3
num_examples: 11736
num_bytes: 22456754445.0
- name: scene4
num_examples: 3556
num_bytes: 22976022064.0
- name: fall
num_examples: 40000
num_bytes: 10915924301.0
- name: refraction
num_examples: 40000
num_bytes: 10709791288.0
- name: slope
num_examples: 40000
num_bytes: 16693093236.0
- name: spring
num_examples: 40000
num_bytes: 15431950241.0
download_size: 136135745843.0
dataset_size: 136135745843.0
license: apache-2.0
task_categories:
- image-feature-extraction
- object-detection
- video-classification
language:
- en
tags:
- causal-representation-learning
- simulation
- robotics
- traffic
- physics
- synthetic
---
# CausalVerse Image Dataset
This dataset contains **two families of splits**:
- **Physics splits**: `Fall`, `Refraction`, `Slope`, `Spring`
- **Static image generation**: `scene1`, `scene2`, `scene3`, `scene4`
All splits share the same columns:
- `image` (binary image; `datasets.Image`)
- `render_path` (string; original image filename/path)
- `metavalue` (string; per-sample metadata; schema varies by split)
**Paper:** [CausalVerse: Benchmarking Causal Representation Learning with Configurable High-Fidelity Simulations](https://huggingface.co/papers/2510.14049)
**Project page:** [https://causal-verse.github.io/](https://causal-verse.github.io/)
**Code:** [https://github.com/CausalVerse/CausalVerseBenchmark](https://github.com/CausalVerse/CausalVerseBenchmark)
## Overview
<p align="center"> <img src="https://github.com/CausalVerse/CausalVerseBenchmark/blob/main/assets/causalverse_intro.png?raw=true" alt="CausalVerse Overview Figure" width="85%">
**CausalVerse** is a comprehensive benchmark for **Causal Representation Learning (CRL)** focused on *recovering the data-generating process*. It couples **high-fidelity, controllable simulations** with **accessible and configurable ground-truth causal mechanisms** (structure, variables, interventions, temporal dependencies), bridging the gap between **realism** and **evaluation rigor**.
The benchmark spans **24 sub-scenes** across **four domains**:
- 🖼️ Static image generation
- 🧪 Dynamic physical simulation
- 🤖 Robotic manipulation
- 🚦 Traffic scene analysis
Scenarios range from **static to temporal**, **single to multi-agent**, and **simple to complex** structures, enabling principled stress-tests of CRL assumptions. We also include reproducible baselines to help practitioners align **assumptions ↔ data ↔ methods** and deploy CRL effectively.
## Dataset at a Glance
<p align="center">
<img src="https://github.com/CausalVerse/CausalVerseBenchmark/blob/main/assets/causalverse_overall.png?raw=true" alt="CausalVerse Overview Figure" width="45%">
<img src="https://github.com/CausalVerse/CausalVerseBenchmark/blob/main/assets/causalverse_pie.png?raw=true" alt="CausalVerse data info Figure" width="49.4%">
</p>
- **Scale & Coverage**: ≈ **200k** high-res images, ≈ **140k** videos, **>300M** frames across **24 scenes** in **4 domains**
- Image generation (4), Physical simulation (10; aggregated & dynamic), Robotic manipulation (5), Traffic (5)
- **Resolution & Duration**: typical **1024×1024** / **1920×1080**; clips **3–32 s**; diverse frame rates
- **Causal Variables**: **3–100+** per scene, including **categorical** (e.g., object/material types) and **continuous** (e.g., velocity, mass, positions). Temporal scenes combine **global invariants** (e.g., mass) with **time-evolving variables** (e.g., pose, momentum).
## Sizes (from repository files)
- `scene1`: 11,736 examples — ~19.94 GB
- `scene2`: 11,736 examples — ~17.01 GB
- `scene3`: 11,736 examples — ~22.46 GB
- `scene4`: 3,556 examples — ~22.98 GB
- `fall`: 40,000 examples — ~10.92 GB
- `refraction`: 40,000 examples — ~10.71 GB
- `slope`: 40,000 examples — ~16.69 GB
- `spring`: 40,000 examples — ~15.43 GB
> Notes:
> - `metavalue` is **split-specific** (e.g., `fall` uses keys like `id,h1,r,u,h2,view`, while `scene*` have attributes like `domain,age,gender,...`).
> - If you only need a portion, consider slicing (e.g., `split="fall[:1000]"`) or streaming to reduce local footprint.
## Sample Usage
### Loading with `datasets` library
```python
from datasets import load_dataset
# Physics split
ds_fall = load_dataset("CausalVerse/CausalVerse_Image", split="fall")
# Scene split
ds_s1 = load_dataset("CausalVerse/CausalVerse_Image", split="scene1")
```
### Using the Image Dataset (PyTorch-ready)
We provide a **reference PyTorch dataset/loader** that works with exported splits.
* Core class: `dataset/dataset_multisplit.py` → `MultiSplitImageCSVDataset`
* Builder: `build_dataloader(...)`
* Minimal example: `dataset/quickstart.py`
**Conventions**
* Each split folder contains `<SPLIT>.csv` + `.png` files
* CSV must include **`render_path`** (relative to the repository root or chosen data root)
* All remaining CSV columns are treated as **metadata** and packed into a float tensor `meta`
**Quick example**
```python
from dataset.dataset_multisplit import build_dataloader
# Optional torchvision transforms:
# import torchvision.transforms as T
# tfm = T.Compose([T.Resize((256, 256)), T.ToTensor()])
loader, ds = build_dataloader(
root="/path/to/causalverse",
split="SCENE1",
batch_size=16,
shuffle=True,
num_workers=4,
pad_images=True, # zero-pads within a batch if resolutions differ
# image_transform=tfm,
# check_files=True,
)
for images, meta in loader:
# images: FloatTensor [B, C, H, W] in [0, 1]
# meta : FloatTensor [B, D] with ordered metadata (including 'view' if present)
...
```
> **`view` column semantics**:
> • Physical splits (e.g., FALL/REFRACTION/SLOPE/SPRING): **camera viewpoint**
> • Human rendering splits (SCENE1–SCENE4): **indoor background type**
## Installation
```bash
# 1) Clone
git clone https://github.com/CausalVerse/CausalVerseBenchmark.git
cd CausalVerseBenchmark
# 2) Core environment
python3 --version # >= 3.9 recommended
pip install -U torch datasets huggingface_hub pillow tqdm
# 3) Optional: examples / loaders / transforms
pip install torchvision scikit-learn rich
```
## Download & Convert (Image subset)
Fetch the **image** portion from Hugging Face and export to a simple on-disk layout (PNG files + per-split CSVs).
**Quick start (recommended)**
```bash
chmod +x dataset/run_export.sh
./dataset/run_export.sh
```
This will:
* download parquet shards (skip if local),
* export images to `image/<SPLIT>/*.png`,
* write `<SPLIT>.csv` next to each split with metadata columns + a `render_path` column.
**Output layout**
```
image/
FALL/
FALL.csv
000001.png
...
SCENE1/
SCENE1.csv
char_001.png
...
```
<details>
<summary><b>Custom CLI usage</b></summary>
```bash
python dataset/export_causalverse_image.py \
--repo-id CausalVerse/CausalVerse_Image \
--hf-home ./.hf \
--raw-repo-dir ./CausalVerse_Image \
--image-root ./image \
--folder-case upper \
--no-overwrite \
--include-render-path-column \
--download-allow-patterns data/*.parquet \
--skip-download-if-local
# Export specific splits (case-insensitive)
python dataset/export_causalverse_image.py --splits FALL SCENE1
```
</details>
## Evaluation (Image Part)
We release four reproducible baselines (shared backbone & similar training loop for fair comparison):
* `CRL_SC` — Sufficient Change
* `CRL_SF` — Mechanism Sparsity
* `CRL_SP` — Multi-view
* `SUP` — Supervised upper bound
**How to run**
```bash
# From repo root, run each baseline:
cd evaluation/image_part/CRL_SC && python main.py
cd ../CRL_SF && python main.py
cd ../CRL_SP && python main.py
cd ../SUP && python main.py
# Example: pass data root via env or args
# DATA_ROOT=/path/to/causalverse python main.py
```
**Full comparison (MCC / R²)**
| Algorithm | Ball on the Slope<br><sub>MCC / R²</sub> | Cylinder Spring<br><sub>MCC / R²</sub> | Light Refraction<br><sub>MCC / R²</sub> | Avg<br><sub>MCC / R²</sub> |
|---|---:|---:|---:|---:|
| **Supervised** | 0.9878 / 0.9962 | 0.9970 / 0.9910 | 0.9900 / 0.9800 | **0.9916 / 0.9891** |
| **Sufficient Change** | 0.4434 / 0.9630 | 0.6092 / 0.9344 | 0.6778 / 0.8420 | 0.5768 / 0.9131 |
| **Mechanism Sparsity** | 0.2491 / 0.3242 | 0.3353 / 0.2340 | 0.1836 / 0.4067 | 0.2560 / 0.3216 |
| **Multiview** | 0.4109 / 0.9658 | 0.4523 / 0.7841 | 0.3363 / 0.7841 | 0.3998 / 0.8447 |
| **Contrastive Learning** | 0.2853 / 0.9604 | 0.6342 / 0.9920 | 0.3773 / 0.9677 | 0.4323 / 0.9734 |
> Ablations can be reproduced by editing each method’s `main.py` or adding configs (e.g., split selection, loss weights, target subsets).
## Acknowledgements
We thank the open-source community and the simulation/rendering ecosystem. We also appreciate contributors who help improve CausalVerse through issues and pull requests.
## Citation
If CausalVerse helps your research, please cite:
```bibtex
@inproceedings{causalverse2025,
title = {CausalVerse: Benchmarking Causal Representation Learning with Configurable High-Fidelity Simulations},
author = {Guangyi Chen and Yunlong Deng and Peiyuan Zhu and Yan Li and Yifan Shen and Zijian Li and Kun Zhang},
booktitle = {NeurIPS},
year = {2025},
note = {Spotlight},
url = {https://huggingface.co/CausalVerse}
}
``` |