VisionRL2-data / README.md
YuhengSSS's picture
Card: arXiv link
a947010 verified
|
Raw History Blame Contribute Delete
9.38 kB
metadata
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.

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

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 (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:

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_ids 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 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

@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}
}