| --- |
| license: apache-2.0 |
| task_categories: |
| - video-classification |
| - text-to-video |
| - image-to-video |
| language: |
| - en |
| size_categories: |
| - 1M<n<10M |
| tags: |
| - reasoning |
| - video-generation |
| - benchmark |
| - vbvr |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: parquet/train__*.parquet |
| - split: train_samples |
| path: parquet/train_samples.parquet |
| - split: test_in_domain |
| path: parquet/test_in_domain.parquet |
| - split: test_out_of_domain |
| path: parquet/test_out_of_domain.parquet |
| - split: train_pr_rewritten |
| path: parquet/train_pr_rewritten.parquet |
| - split: train_pr_unchanged |
| path: parquet/train_pr_unchanged.parquet |
| --- |
| |
| # VBVR-Reorganized |
|
|
| Reorganized + prompt-cleaned + paired-variant-augmented version of VBVR |
| (Video-Based Visual Reasoning), prepared for **video-generation training**. |
| The dataset partitions every task into **Pure_Reasoning** (PR) vs |
| **Instruction_Following** (IF), rewrites Pure_Reasoning prompts to remove |
| leak phrases, and adds 4 *paired-variant* generators (G-21B/G-36B/O-18B/O-19B) |
| that share a first frame with their forward counterpart but require the |
| model to generate a different ground-truth video purely based on a prompt |
| cue. |
| |
| The whole tree is built from hardlinks into the original VBVR dataset, so |
| zero extra disk is consumed for media files. |
| |
| ## Layout |
| |
| ``` |
| VBVR-Reorganized/ |
| ├── train/ |
| │ ├── Pure_Reasoning/ (51 generators, 510,000 samples) |
| │ └── Instruction_Following/ (53 generators, 530,000 samples) |
| └── test/ |
| ├── In-Domain_50/ |
| │ ├── Pure_Reasoning/ (34 generators, 170 samples) |
| │ └── Instruction_Following/ (19 generators, 95 samples) |
| └── Out-of-Domain_50/ |
| ├── Pure_Reasoning/ (13 generators, 65 samples) |
| └── Instruction_Following/ (42 generators, 210 samples) |
| ``` |
| |
| Sample dir layouts within a generator: |
| - **train**: `<gen>/<task>_task/<task>_<8digit>/` (10,000 samples / generator) |
| - **test/**: `<gen>/<sample-id>/` (5 samples / generator) |
|
|
| Each sample directory contains: |
| - `first_frame.png`, `final_frame.png` — visual context (input + target final state) |
| - `ground_truth.mp4` — the video the generator should produce |
| - `metadata.json` — generator-emitted task parameters (e.g. ball trajectory points, |
| reward positions, …) for reproducibility / programmatic eval |
| - `prompt.txt` — the prompt to use as text input |
| - `prompt_original.txt` — present only for Pure_Reasoning samples on a rule-based-rewrite task; preserves the unmodified original prompt for traceability |
| |
| ## Counts |
| |
| | Split | Class | Generators | Samples | |
| |------------------------|------------------------|-----------:|----------:| |
| | train | Pure_Reasoning | 51 | 510,000 | |
| | train | Instruction_Following | 53 | 530,000 | |
| | test/In-Domain_50 | Pure_Reasoning | 34 | 170 | |
| | test/In-Domain_50 | Instruction_Following | 19 | 95 | |
| | test/Out-of-Domain_50 | Pure_Reasoning | 13 | 65 | |
| | test/Out-of-Domain_50 | Instruction_Following | 42 | 210 | |
| | **TOTAL** | | **212** | **1,040,540** | |
| |
| **Note on generator-vs-instance count**: there are **159 unique generator |
| identities** but each can appear in multiple splits (e.g. G-13 lives in |
| `train/PR` AND `test/In-Domain_50/PR`). |
|
|
| ## Pure_Reasoning subset |
| |
| The **64 Pure_Reasoning generators** (counted by unique identity) split as: |
| |
| - **12 already-clean tasks** (no rewrite rule fires): G-43, G-51, G-132, |
| G-193, O-8, O-22, O-44, O-47, O-52, O-53, O-56, O-85. |
| - **47 rule-based-rewrite tasks** organized by family: |
| - **A_GRID_GRAPH_SEARCH** (15): G-12/13/14/15/16/17/18, G-31/32, G-41, |
| G-44/45/46/47, O-39 — strip "step by step" choreography |
| - **B_PATTERN_SEQUENCE** (5): G-131/133/134/135, O-45 — strip pattern leaks |
| - **C_ANALOGY** (7): O-7/9/10/11/12/13/14 — strip transformation scripts |
| and answer leaks |
| - **D_PHYSICS** (13): G-35, G-48, G-273, O-1/2/15/16/17/18/19/62/75/87 — |
| strip law names + answer-leaking sentences (parameters preserved) |
| - **E_OUTCOME_NARRATIVE** (4): O-23/24/29/31 — strip branch-result and |
| stop-point spoilers |
| - **F_CANDIDATE_CHECK** (1): O-21 — strip candidate-checking choreography |
| - **5 promotion tasks** (originally IF, promoted with full rewrites): |
| G-21, G-36, O-43, plus 2 paired-variant inverses below. |
| |
| ### Paired training-variant generators (4 unique tasks, 8 generators total) |
| |
| Same `first_frame.png` as the forward task, but the prompt cues a different |
| ground-truth video. Designed to teach the video model to actually *read* the |
| prompt rather than memorise the visual. |
|
|
| | Pair | Mechanic difference | |
| |---------------------------------------------------|----------------------------------------------------------------------------------| |
| | `G-21` ↔ `G-21B_multiple_occlusions_vertical_behind` | Mask passes **in front of** vs **behind** the objects (depth ordering) | |
| | `G-36` ↔ `G-36B_multiple_occlusions_horizontal_behind` | Same depth flip, horizontal direction | |
| | `O-18` ↔ `O-18B_glass_refraction_inverse` | Forward Snell's vs **inverse** Snell's (given in-glass ray, predict incidence) | |
| | `O-19` ↔ `O-19B_mirror_reflection_inverse` | Forward reflection vs **inverse** reflection (given reflected ray, predict incidence) | |
|
|
| ### Tier-2 extremum-flip variants (5 unique tasks, test-only) |
|
|
| Five additional `*B` variants exist in `test/Out-of-Domain_50/Instruction_Following`, |
| flipping the extremum criterion of their forward task: |
|
|
| | Variant | Forward | Flip | |
| |--------------------------------------------------|------------------------------------|-------------------------------| |
| | `G-160B_circle_smallest_numerical_value` | `G-160_circle_largest_numerical_value` | largest → **smallest** | |
| | `G-167B_select_shortest_polygon_side` | `G-167_select_longest_polygon_side` | longest → **shortest** | |
| | `G-218B_identify_smallest_angle_in_triangle` | `G-218_identify_largest_angle_in_triangle` | largest → **smallest** | |
| | `G-219B_select_rightmost_shape` | `G-219_select_leftmost_shape` | leftmost → **rightmost** | |
| | `G-221B_outline_outermost_square` | `G-221_outline_innermost_square` | innermost → **outermost** | |
|
|
| These are **classified as Instruction_Following, not Pure_Reasoning** — |
| they're explicit-criterion mark-and-pick tasks (mechanical |
| perception+comparison), so flipping the criterion only changes which |
| shape gets marked, not the reasoning structure. Each has 5 samples in |
| the OOD test split (25 samples total). Counted in the OOD IF total |
| above; this section just makes them discoverable by name. |
|
|
| ## Rewrite stats |
|
|
| - Pure_Reasoning samples covered by rule-based rewriting: **400,180** (47 PR_REWRITE |
| tasks × all of their samples in any split, plus the 4 paired variants) |
| - Prompts actually rewritten by rules: **~320,000** (~80%) |
| - Prompts left verbatim because no rule fired (already clean): **~80,000** (~20%) — |
| these are still PR tasks but their specific paraphrase didn't trip a rule |
| - Instruction_Following samples (no rewriting): **620,330** — no `prompt_original.txt` |
|
|
| ### Inspection splits: `train_pr_rewritten` / `train_pr_unchanged` |
|
|
| Two small viewer-friendly splits (carved out of `train/Pure_Reasoning`) make |
| the rewrite behavior browsable without loading the full 1M training set: |
|
|
| | Split | Rows | Per task | Selection criterion | |
| |------------------------|-----:|-----------------|-------------------------------------------------------------------------------------| |
| | `train_pr_rewritten` | 62 | 2/task | `prompt != prompt_original` (rule fired and changed the prompt) | |
| | `train_pr_unchanged` | 46 | 2/task | `prompt_original` missing OR `prompt == prompt_original` (already-clean or no-op) | |
|
|
| A given task generator may contribute to one bucket, the other, or both — |
| see [`TRAIN_PR_REWRITE_CLASSIFICATION.md`](TRAIN_PR_REWRITE_CLASSIFICATION.md) for the per-task breakdown. |
| Among the 51 train PR tasks: 28 are rewritten-only, 20 are unchanged-only, and 3 |
| (O-10, O-16, O-17) carry multiple paraphrase templates and contribute to *both* |
| splits (verified by full 10,000-sample scan; per-task rewritten rate is 97.8% / |
| 49.8% / 24.7% respectively). |
|
|
| ## How prompt rewrites work |
|
|
| `prompt.txt` is the version to feed to the model. For PR tasks where the |
| rule engine identified a leak phrase, the rewrite removes it while |
| preserving setup info needed to make the task solvable. The `prompt_original.txt` |
| sibling preserves the unrewritten source for traceability. |
|
|
| ### `prompt_original` semantics (important) |
| |
| `prompt_original` field **presence** signals "this sample's task was processed |
| by the rule-based rewrite engine" — *not* "this sample's prompt was modified". |
| Whether the prompt was actually changed is determined by comparing strings: |
|
|
| | State | `prompt_original` | `prompt == prompt_original` | |
| |----------------------------------------------------|------------------------|------------------------------| |
| | Instruction_Following task | `null` | (n/a) | |
| | PR already-clean task (12 tasks: G-43, O-22, …) | `null` | (n/a) | |
| | PR rewrite task, rule fired | not null | **False** — prompt was changed | |
| | PR rewrite task, no rule fired (already-clean text) | not null | **True** — prompt unchanged | |
| |
| So the field combines two signals: presence ↔ "this task ran the rewrite |
| engine"; equality ↔ "no rule actually fired on this paraphrase". To filter |
| to *actually-modified* samples: |
| |
| ```python |
| modified = ds.filter(lambda x: x["prompt_original"] is not None |
| and x["prompt_original"] != x["prompt"]) |
| # ~320,000 samples (80% of PR-rewrite-task samples; 20% had no rule fire) |
| ``` |
| |
| Family-level rules + task-specific overrides live in |
| `scripts/vbvr_reorg/rules.py` (in the source repo). See |
| [PROMPT_REWRITES.md](../VBVR-Reorganized-Samples/PROMPT_REWRITES.md) (in the |
| `VBVR-Reorganized-Samples/` subset) for a representative before→after diff |
| of every rewritten task. |
|
|
| ## How to use this dataset |
|
|
| > **The HF repo ships parquet shards, not the directory tree above.** The |
| > `Layout` section describes the *conceptual* organization. On Hub, every |
| > sample is one parquet row with media bytes (`first_frame.png`, |
| > `final_frame.png`, `ground_truth.mp4`) embedded inline. You have two |
| > options: read the parquet directly (Path A), or materialize the parquet |
| > back into the directory layout (Path B). |
| |
| ### Parquet row schema (all splits) |
| |
| Every parquet shard under `parquet/` shares the same row schema: |
| |
| | Column | Type | Notes | |
| |---------------------|---------------------------------------------|----------------------------------------------------------------| |
| | `class` | string | `Pure_Reasoning` or `Instruction_Following` | |
| | `task` | string | e.g. `G-13_grid_number_sequence_data-generator` | |
| | `split` | string | e.g. `train`, `test/In-Domain_50`, `train_pr_rewritten` | |
| | `sample_id` | string | per-task relative path (for train rows includes the wrapper) | |
| | `prompt` | string | the prompt to feed to the model | |
| | `prompt_original` | string \| null | only for PR-rewrite tasks (see "How prompt rewrites work") | |
| | `first_frame` | `{bytes: binary, path: string}` (HF Image) | PNG bytes of the input frame | |
| | `final_frame` | `{bytes: binary, path: string}` (HF Image) | PNG bytes of the target final frame | |
| | `ground_truth_video`| `{bytes: binary, path: string}` (HF Video) | MP4 bytes of the target video | |
| | `metadata_json` | string | raw text of the per-sample `metadata.json` | |
|
|
| Available splits / parquet shards: |
|
|
| | Logical split | Parquet path | Total size | |
| |-------------------------|-----------------------------------------|-----------:| |
| | `train` | `parquet/train__<task>.parquet` (107 shards, one per task) | ~370 GB | |
| | `test_in_domain` | `parquet/test_in_domain.parquet` | ~90 MB | |
| | `test_out_of_domain` | `parquet/test_out_of_domain.parquet` | ~120 MB | |
| | `train_pr_rewritten` | `parquet/train_pr_rewritten.parquet` | ~19 MB | |
| | `train_pr_unchanged` | `parquet/train_pr_unchanged.parquet` | ~14 MB | |
|
|
| **Important — picking which train shards to download**: train is sharded |
| per task (51 Pure_Reasoning shards + 56 Instruction_Following shards = |
| 107 shards, ~370 GB total). Most users do **not** want all 370 GB. See |
| [**TASK_INVENTORY.md**](TASK_INVENTORY.md) for the full per-task table |
| (shard name ↔ full task id ↔ class ↔ size). The same data is also |
| shipped as machine-readable `TASK_INVENTORY.json` so you can script |
| selective downloads. **The shard filename alone does NOT tell you |
| whether a task is PR or IF** — use the inventory. |
|
|
| ### Path A — read parquet rows directly (recommended) |
|
|
| The HF `datasets` library auto-decodes `first_frame` / `final_frame` into |
| `PIL.Image` and `ground_truth_video` into a `decord`/`VideoReader`-style |
| object: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| # Load any single split. Shards under parquet/train__*.parquet are merged |
| # into one logical "train" split via the YAML config above. |
| ds = load_dataset("May-apple/VBVR-Reorganized", split="test_in_domain") |
| # other splits: "train", "test_out_of_domain", "train_pr_rewritten", "train_pr_unchanged" |
| |
| row = ds[0] |
| print(row["prompt"]) # str |
| print(row["class"], row["task"]) |
| row["first_frame"].save("first.png") # PIL.Image |
| row["final_frame"].save("final.png") |
| # ground_truth_video is a `datasets.Video` object; underlying bytes are in |
| # row["ground_truth_video"]["bytes"] if you bypass auto-decoding (see below). |
| ``` |
|
|
| If you only want the **prompts / metadata** and don't need to decode the |
| heavy media (much faster, no PIL/decord needed), bypass HF's feature |
| decoding and read the raw parquet with `pyarrow` / `pandas`: |
|
|
| ```python |
| import pyarrow.parquet as pq |
| |
| t = pq.read_table("parquet/test_in_domain.parquet", |
| columns=["class", "task", "split", "sample_id", |
| "prompt", "prompt_original", "metadata_json"]) |
| df = t.to_pandas() |
| print(df.head()) |
| ``` |
|
|
| To pull the **raw bytes** of one media field for a single row: |
|
|
| ```python |
| import pyarrow.parquet as pq |
| |
| pf = pq.ParquetFile("parquet/test_in_domain.parquet") |
| row = pf.read_row_group(0).to_pylist()[0] |
| open("first_frame.png", "wb").write(row["first_frame"]["bytes"]) |
| open("final_frame.png", "wb").write(row["final_frame"]["bytes"]) |
| open("ground_truth.mp4", "wb").write(row["ground_truth_video"]["bytes"]) |
| ``` |
|
|
| To load only **one train task** (without pulling the whole 1M-row |
| training set), just load that task's parquet shard by filename: |
|
|
| ```python |
| from datasets import load_dataset |
| ds = load_dataset("parquet", |
| data_files="parquet/train__G-13_grid_number_sequence.parquet", |
| split="train") |
| ``` |
|
|
| #### Filtering PR vs IF in Path A |
|
|
| Every row carries a `class` column with value `"Pure_Reasoning"` or |
| `"Instruction_Following"`. Two ways to use it: |
|
|
| ```python |
| # (1) Load all 107 shards, filter in code (requires downloading all ~370 GB) |
| from datasets import load_dataset |
| ds = load_dataset("May-apple/VBVR-Reorganized", split="train") |
| pr_only = ds.filter(lambda x: x["class"] == "Pure_Reasoning") |
| if_only = ds.filter(lambda x: x["class"] == "Instruction_Following") |
| |
| # (2) Load only the PR shards (downloads only ~195 GB) — use TASK_INVENTORY.json: |
| import json |
| from datasets import load_dataset |
| inv = json.load(open("TASK_INVENTORY.json")) # ship from this repo |
| pr_shards = [f"parquet/train__{e['shard']}.parquet" for e in inv["Pure_Reasoning"]] |
| ds_pr = load_dataset("parquet", data_files=pr_shards, split="train") |
| |
| # Same for IF: |
| if_shards = [f"parquet/train__{e['shard']}.parquet" for e in inv["Instruction_Following"]] |
| ds_if = load_dataset("parquet", data_files=if_shards, split="train") |
| ``` |
|
|
| `TASK_INVENTORY.json` is shipped at the repo root specifically so you |
| can do this kind of selective load without enumerating shards by hand. |
| For the canonical authoritative source on which task is PR vs IF, see |
| [TASK_INVENTORY.md](TASK_INVENTORY.md). |
|
|
| ### Path B — materialize parquet → on-disk directory layout |
|
|
| If your existing pipeline reads `first_frame.png` / `ground_truth.mp4` / |
| `prompt.txt` from a directory tree, this repo ships an extractor script |
| (`extract_parquet_to_dir.py`, in the repo root) that streams a parquet |
| shard and writes one directory per row, reproducing exactly the "Layout" |
| tree at the top of this card: |
|
|
| Only dependency: `pyarrow` (`pip install pyarrow`). |
|
|
| #### B.1 — Standard workflow: download everything, extract everything |
|
|
| ```bash |
| # (a) Pull the whole repo (~370 GB parquet + tiny test/inspection splits + helpers). |
| hf download May-apple/VBVR-Reorganized --repo-type dataset \ |
| --local-dir ./VBVR-Reorganized |
| cd ./VBVR-Reorganized |
| |
| # (b) Materialize every parquet under parquet/ into ./extracted/. |
| # Streams one row-group at a time, safe on the multi-GB train shards. |
| python3 extract_parquet_to_dir.py \ |
| --parquet parquet/ \ |
| --out ./extracted |
| ``` |
|
|
| After this, `./extracted/` is the exact tree shown in the "Layout" |
| section at the top of this card: |
|
|
| ``` |
| extracted/ |
| ├── train/ |
| │ ├── Pure_Reasoning/ (51 generators, 510,000 samples) |
| │ └── Instruction_Following/ (56 generators, 560,000 samples) |
| ├── test/ |
| │ ├── In-Domain_50/... |
| │ └── Out-of-Domain_50/... |
| ├── train_pr_rewritten/... (inspection split, 62 samples) |
| └── train_pr_unchanged/... (inspection split, 46 samples) |
| ``` |
|
|
| > **Disk note**: extracted media files are the same bytes that already |
| > live in the parquet (no recompression), so the extracted tree is |
| > roughly the same size as the parquet (~370 GB). Peak disk usage during |
| > extraction is ~2× that since both copies exist. If disk is tight, |
| > extract per-shard and delete the source parquet after each: see B.2. |
|
|
| #### B.2 — Subset variants |
|
|
| ```bash |
| # Just the test splits (~210 MB combined, fast): |
| hf download May-apple/VBVR-Reorganized --repo-type dataset \ |
| --include 'parquet/test_*.parquet' 'extract_parquet_to_dir.py' \ |
| --local-dir ./VBVR-Reorganized |
| cd ./VBVR-Reorganized |
| python3 extract_parquet_to_dir.py --parquet parquet/ --out ./extracted |
| |
| # A single task (e.g. G-13, ~5.96 GB) — see TASK_INVENTORY.md for shard names: |
| hf download May-apple/VBVR-Reorganized --repo-type dataset \ |
| --include 'parquet/train__G-13_grid_number_sequence.parquet' \ |
| 'extract_parquet_to_dir.py' \ |
| --local-dir ./VBVR-Reorganized |
| cd ./VBVR-Reorganized |
| python3 extract_parquet_to_dir.py \ |
| --parquet parquet/train__G-13_grid_number_sequence.parquet \ |
| --out ./extracted |
| |
| # Per-shard extract-then-delete (avoid peak 2× disk for the full pull): |
| cd ./VBVR-Reorganized |
| for f in parquet/train__*.parquet; do |
| python3 extract_parquet_to_dir.py --parquet "$f" --out ./extracted |
| rm "$f" |
| done |
| ``` |
|
|
| For class-level downloads (e.g. *all* PR train shards = ~195 GB), see |
| the "Selective download recipes" section in |
| [TASK_INVENTORY.md](TASK_INVENTORY.md). |
|
|
| Output tree: |
|
|
| ``` |
| VBVR-extracted/ |
| └── <split>/<class>/<task>/<sample_id>/ |
| ├── first_frame.png |
| ├── final_frame.png |
| ├── ground_truth.mp4 |
| ├── prompt.txt |
| ├── prompt_original.txt (only for PR-rewrite tasks) |
| └── metadata.json |
| ``` |
|
|
| The script reads one parquet row-group at a time, so it works on the |
| multi-GB train shards without loading the whole file into memory. The |
| script body is short (<150 lines, pure stdlib + `pyarrow`) — copy it |
| directly if you don't have access to the source repo. |
|
|
| ### Local browsing (small viewable subset) |
|
|
| For a 3-samples-per-generator view (612 samples, ~2GB), see the |
| `VBVR-Reorganized-Samples/` companion repo / subset. |
|
|
| ## Provenance |
|
|
| This is a **derivative** of the original VBVR dataset. The original dataset |
| ([Video-Reason/VBVR-Bench-Data](https://huggingface.co/datasets/Video-Reason/VBVR-Bench-Data) and the |
| 1M-sample train extract) is preserved untouched at: |
|
|
| - `<source>/VBVR-Dataset-extracted/train/` |
| - `<source>/VBVR-Bench-Data/{In-Domain_50,Out-of-Domain_50}/` |
|
|
| This dataset is built from those via hardlinks (zero copy of media); only |
| `prompt.txt` files are physically rewritten. |
|
|
| ## Reproduce |
|
|
| The full reorganization + rewrite pipeline is in `scripts/vbvr_reorg/` of the |
| source repo (not bundled here): |
|
|
| - `classification.py` — 64 PR + 91 IF + family labels (the "what is what") |
| - `rules.py` — rewrite rules (task-specific + family-level) |
| - `build_and_rewrite.py` — single-pass: hardlink media + apply rewrites |
| - `reapply_rules.py` — refresh rewrites in place when `rules.py` changes |
| - 9 paired-variant generators forked from `O-2`/`O-18`/`O-19`/`G-21`/`G-36`/etc. |
|
|
| ## Citation |
|
|
| ```bibtex |
| @dataset{vbvr_reorganized_2026, |
| title = {VBVR-Reorganized: Reasoning-vs-Instruction Partition with Prompt-Cleaning and Paired-Variant Augmentation for Video Generation}, |
| author = {Video-Reason}, |
| year = {2026}, |
| url = {https://huggingface.co/datasets/Video-Reason/VBVR-Reorganized}, |
| } |
| ``` |
|
|
| ## License |
|
|
| Inherits the license of the underlying VBVR dataset (Apache-2.0 unless |
| otherwise specified by the original publishers). |
|
|