Datasets:
File size: 9,376 Bytes
7f7965b a947010 7f7965b a947010 7f7965b | 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 | ---
license: other
task_categories:
- visual-question-answering
language:
- en
tags:
- multimodal
- region-of-interest
- reinforcement-learning
size_categories:
- 100K<n<1M
---
# Vision-RL² training data
Paper: https://arxiv.org/abs/2609.19745
Training data for **Vision-RL²: Region-Level Policy Optimization for Fine-grained MLLM
Perception** — the stage-1 (SD-RPN self-distilled pseudo-label) response corpora and the
stage-2 (region-level RL) pools with their cached evidence maps, for all four backbones:
Qwen3.5-4B, Qwen3.5-9B, Qwen2.5-VL-7B and Gemma-4-12B-it.
Code: <https://github.com/YuHengsss/VisionRL2>. Images: [`YuhengSSS/RoITraining`](https://huggingface.co/datasets/YuhengSSS/RoITraining).
## Contents
```
sdrpn_corpora/ stage 1 — self-generated response corpora
qwen3_5_4b_response_corpus.jsonl 49,498 rows
qwen3_5_9b_response_corpus.jsonl 49,999 rows
gemma4_12b_response_corpus.jsonl 49,498 rows (tier 560)
rl_pools/ stage 2 — RL pools (7,000 rows each)
candidates_visualcot_50k.jsonl 50,000 candidate QAs the pools are drawn from
rl_pool_qwen3_5_4b.jsonl
rl_pool_qwen3_5_9b.jsonl
rl_pool_qwen2_5_vl_7b.jsonl
rl_pool_gemma4_12b.jsonl
ev_maps/ cached response→image evidence maps (7,000 .pt each)
ev_maps_qwen3_5_4b.tar
ev_maps_qwen3_5_9b.tar
ev_maps_qwen2_5_vl_7b.tar
ev_maps_gemma4_12b.tar
```
## Download and layout
```bash
hf download YuhengSSS/VisionRL2-data --repo-type dataset --local-dir data/VisionRL2-data
mkdir -p data/ev_maps
for t in data/VisionRL2-data/ev_maps/*.tar; do tar -xf "$t" -C data/ev_maps; done
```
giving `data/ev_maps/ev_maps_qwen3_5_4b/00000012.pt`, and so on.
Images come from [`YuhengSSS/RoITraining`](https://huggingface.co/datasets/YuhengSSS/RoITraining)
(tars: `gqa`, `textvqa`, `spdocvqa` → `DocVQA`, `infographicsvqa`). Extract them so that
`DATASET_ROOT` looks like:
```
DATASET_ROOT/
gqa/images/<image>
textvqa/train_images/<image>
DocVQA/<image>
infographicsvqa/infographicsvqa_images/<image>
```
`DATASET_ROOT` defaults to `datasets`; individual roots can be overridden with
`DS_IMAGE_ROOTS="gqa=/abs/path,docvqa=/abs/path,..."`.
## Regenerating these files
Every file here can be rebuilt from the candidates plus your own checkpoints, using the
release repo:
| target | command |
|---|---|
| Qwen3.5 corpora | `data_prep/build_corpus_qwen3_5.sh` (split → generate v1/v2 → merge) |
| Gemma-4 corpus | `scripts/train_sdrpn_gemma4.sh` stages `gen` + `merge` |
| Qwen3.5 pools | `data_prep/build_pool_qwen3_5.sh` (filter → compose → evidence → maps) |
| Qwen2.5-VL pool | `data_prep/build_pool_qwen2_5_vl.sh` |
| Gemma-4 pool | `data_prep/build_pool_gemma4.sh` |
## Row schemas
### SD-RPN corpus row (`sdrpn_corpora/`)
One row per QA; the response is generated by the **frozen backbone itself**, and the
pseudo-label is the response-to-image attention of that response.
| field | meaning |
|---|---|
| `dataset` | source tag: `gqa` / `textvqa` / `docvqa` / `infographicsvqa` — selects the image root |
| `image` | image path **relative to that dataset's image root** |
| `question` | raw question |
| `prompted_question` | the exact prompt that was fed to the backbone (prompt style baked in) |
| `answer` | gold short answer |
| `response` | the backbone's own response (the pseudo-label is read off its attention) |
The `prompted_question` of a row fixes its prompt style: `gqa` rows carry the
bounding-box task suffix and `textvqa` rows the "single word or phrase" suffix (style
v1, square-padded images, up to 1,024 visual tokens), while `docvqa` and
`infographicsvqa` rows carry the `[Visual Evidence] … [Answer]` prompt (style v2, no
square padding, up to 576 visual tokens). Both passes decode greedily with 512 new
tokens; rows whose response came back empty were dropped.
The Qwen corpora carry the extra VisualCoT provenance fields
(`width`, `height`, `bboxs`, `split`, `full_answer`, `reasoning`, `thought`,
`possible_answers`); the trainer ignores them. The pseudo-label *style* per row
(`v1` = mean-over-response-tokens map, `v2` = single-region peak-ratio union) is derived
from the `dataset` tag via `DS_TO_LABEL_VERSION` in `qwen-vl-finetune/qwenvl/data/__init__.py`
(`gqa`/`textvqa` → v1, `docvqa`/`infographicsvqa` → v2).
The **Gemma** corpus instead carries the style as an explicit per-row field and uses
full dataset-root-relative image paths:
| field | meaning |
|---|---|
| `dataset`, `question`, `answer`, `response` | as above |
| `image` | path relative to `DATASET_ROOT` (e.g. `gqa/images/2337160.jpg`) |
| `question_id`, `src_row` | provenance into `candidates_visualcot_50k.jsonl` |
| `version` | `v1` (gqa + textvqa) or `v2` (docvqa + infographicsvqa) — consumed by `qwen_src/gemma4_unified/data_gemma_stage1.py` |
### RL pool row (`rl_pools/rl_pool_*.jsonl`)
| field | meaning |
|---|---|
| `sample_id` | index into `candidates_visualcot_50k.jsonl` |
| `dataset` | source tag (image root selector) |
| `image` | image path relative to that dataset's image root |
| `question` | question (the eval answer suffix is appended by the loader) |
| `gold_answer` | gold answer scored by the frozen reader |
| `feat_hw` | `[H, W]` of the SD-RPN heatmap grid at pool-build resolution |
| `branch` | `K==1` / `K>=2` — number of connected components in the stage-1 proposal |
| `K`, `K_topR` | components found / components kept as actions |
| `n_actions` | size of the enumerated action set |
| `reward_mean`, `reward_std` | stage-1 reward statistics over that action set (the ranking signal) |
| `ev_maps_path` | `ev_maps_<backbone>/<sample_id>.pt` — the cached evidence maps for this row |
`candidates_visualcot_50k.jsonl` is the raw 50k VisualCoT candidate set the pools are
drawn from (`gqa` 20k, `textvqa` 10k, `docvqa` 10k, `infographicsvqa` 10k).
### `EV_MAPS_ROOT` convention
`ev_maps_path` is **relative**. The loader
(`qwen-vl-finetune/qwenvl/train/region_level_grpo/dataset.py`) resolves it in order:
as given, then `$EV_MAPS_ROOT/<ev_maps_path>`, then `$EV_MAPS_ROOT/<basename>`, then the
pool jsonl's own directory. With the layout above, set:
```bash
export EV_MAPS_ROOT=data/ev_maps
```
Each `.pt` holds `{"maps": uint8 tensor (n_layers, Hg, Wg)}` — the frozen backbone's
response-to-image attention at the probed layers, binarised per layer. They feed the
**additive (source-map) group** of the RL objective, which recovers evidence the policy
never proposed. A row that declares an `ev_maps_path` whose file cannot be found is a
hard error (a silent miss would turn that group off).
## How the 7k pools were selected
The pool is built with the backbone's **own** SD-RPN (stage-1) checkpoint:
1. Run the backbone's SD-RPN over the 50k candidates; drop `gqa` and `chartqa`, and drop
rows whose gold region covers more than 10% of the image.
2. Enumerate the action set (top `R = 6` components: the empty action plus singleton
drops), score every action with the frozen reader, and keep the top 20% of rows by
**per-sample reward standard deviation** — rows where the choice of region actually
moves the reward.
3. Compose the final pool: **5,000 InfographicVQA + 1,000 TextVQA + 1,000 DocVQA** = 7,000.
4. Cache the response-to-image evidence maps for every kept row (`ev_maps/`), from the
backbone's own evidence responses.
The heatmap gate at step 1 differs per family (Qwen3.5: fixed threshold 0.02;
Qwen2.5-VL-7B and Gemma-4: peak-ratio).
**Provenance note.** `rl_pool_qwen3_5_4b`, `rl_pool_qwen3_5_9b` and `rl_pool_gemma4_12b`
were each selected by their own SD-RPN and are therefore different row sets (the 4B and
9B pools share 2,780 of 7,000 rows). `rl_pool_qwen2_5_vl_7b` is the exception: it reuses
the Qwen3.5-4B **row selection** verbatim (identical 7,000 `sample_id`s and identical
step-1/2 statistics, reordered) and only steps 3–4 are its own — the evidence responses
and cached attention maps in `ev_maps_qwen2_5_vl_7b.tar` come from Qwen2.5-VL-7B itself.
That is what the paper's 7B run trained on.
The release repo ships the full pipeline (`data_prep/build_pool_qwen3_5.sh`,
`build_pool_qwen2_5_vl.sh`, `build_pool_gemma4.sh`) so the pools can be regenerated on
your own checkpoint.
## License and provenance
The QAs and images are derived from [Visual-CoT](https://github.com/deepcs233/Visual-CoT)
and, through it, from **GQA**, **TextVQA**, **DocVQA (SP-DocVQA)** and **InfographicVQA**.
All original licenses and terms of those datasets apply; this release adds only
model-generated responses, region statistics and cached attention maps, and is intended
for **research use**. No images are redistributed here — only jsonl rows and `.pt` caches
that reference them by relative path.
## Citation
```bibtex
@article{shi2026visionrl2,
title = {Region-Level Policy Optimization for Fine-grained MLLM Perception},
author = {Shi, Yuheng and Pei, Xiaohuan and Dong, Minjing and Xu, Chang},
journal = {arXiv preprint arXiv:2609.19745},
year = {2026}
}
@inproceedings{shi2026sdrpn,
title = {Catching the Details: Self-Distilled RoI Predictors for Fine-Grained MLLM Perception},
author = {Shi, Yuheng and Pei, Xiaohuan and Dong, Minjing and Xu, Chang},
booktitle = {ICLR},
year = {2026}
}
```
|