๐ŸงŸ Frankenstein-Analysis on RLVR for VLM

February 18, 2026 ยท View on GitHub

What Does Reinforcement Learning Really Change in Visual Reasoning?

A Frankenstein-style analysis framework for understanding where reinforcement learning (RL) alters vision-language models (VLMs) and what changes across the training pipeline (Base โ†’ SFT/IN โ†’ RL).

Frankenstein-style Analysis Framework

๐Ÿ”‘ Key Findings

  • ๐Ÿ“‰ No monotonic improvement. Despite end-to-end benchmark gains, vision ability, reasoning ability, and vision-to-reasoning alignment do not improve monotonically from Base โ†’ IN โ†’ RL.
  • ๐Ÿ‘๏ธ Consistent attention shift. Across diverse training recipes, RL consistently increases attention from reasoning tokens to visual tokens, primarily in mid-to-late transformer layers.
  • ๐Ÿงฌ Structured parameter updates. RL refinements concentrate in mid-to-late layers, are transferable across recipes, and contribute primarily to improved vision-to-reasoning alignment and reasoning performance.

๐Ÿ—๏ธ Framework Overview

The framework consists of three analysis components and one validation step:

ComponentGoalMethodScript
๐Ÿ”ฌ Functional LocalizationWhere do vision/reasoning abilities reside?Causal probing across transformer depthlocalization_vision.py, localization_reasoning.py
๐Ÿ“Š Update CharacterizationWhat does RL change structurally?SVD spectral analysis & Frobenius norm comparisoncharacterisation_diversity.py, characterisation_energy.py
๐Ÿงฉ Transferability TestAre RL updates transferable?Block-wise model mergingtransferability_test.py
โ„๏ธ Necessity ValidationAre mid-late layer updates necessary?Block-wise parameter freezing during RLOpenMMReasoner

๐Ÿค– Supported Training Recipes

All experiments use Qwen/Qwen2.5-VL-7B-Instruct as the base model with the following IN+RL pairs:

RecipeIN (SFT) ModelRL Model
OpenMMReasonerOpenMMReasoner/OpenMMReasoner-ColdStartOpenMMReasoner/OpenMMReasoner-RL
Revisual-R1csfufu/Revisual-R1-Coldstartcsfufu/Revisual-R1-final
MMR1MMR1/MMR1-7B-SFTMMR1/MMR1-7B-RL

โš™๏ธ Setup

conda create -n frankenstein python=3.10
conda activate frankenstein
pip install -r requirements.txt

For experiments that use GPT-based grading (transferability test), set your OpenAI API key:

export OPENAI_API_KEY="your-api-key"

๐Ÿš€ Usage

All experiments are launched from the project root via shell scripts in runs/.

1. ๐Ÿ”ฌ Functional Localization

Vision localization measures how visual token swapping at each layer affects model output:

bash runs/localization_vision.sh

The script evaluates four vision tasks (counting, OCR, grounding, recognition) using a custom dataset under dataset/. At each target layer, visual tokens from a source image are swapped into the KV cache, and the resulting output change rate is measured.

Reasoning localization measures accuracy degradation when zero-ablating each layer on math benchmarks (GSM8K, MATH-500):

bash runs/localization_reasoning.sh

For each layer i, the attention + MLP output is set to zero (keeping the skip connection), isolating each layer's contribution to reasoning.

2. ๐Ÿ“Š Update Characterization

SVD analysis compares the singular value spectra of weight deltas between IN and RL phases:

bash runs/characterisation_diversity.sh

Energy analysis compares Frobenius norms of weight deltas layer by layer:

bash runs/characterisation_energy.sh

Both scripts analyze all layers across the vision encoder, projector, and LLM backbone using a unified layer indexing scheme.

3. ๐Ÿงฉ Transferability Test

Evaluates whether transplanting RL-refined layer blocks into IN models preserves functional improvements. Tests multiple block-wise splicing configurations (early/mid/late thirds):

bash runs/run_eval_v1_openmmreasoner.sh
bash runs/run_eval_v1_revisual.sh
bash runs/run_eval_v1_mmr1.sh

Each run evaluates the original SFT/RL models alongside six Frankenstein variants on perception (General VQA), alignment (Math VQA), and reasoning (MATH-500) tasks.

๐Ÿ“ Project Structure

Frankenstein-Analysis/
โ”œโ”€โ”€ scripts/                          # Core analysis scripts
โ”‚   โ”œโ”€โ”€ localization_vision.py        # Vision localization via visual token swapping
โ”‚   โ”œโ”€โ”€ localization_reasoning.py     # Reasoning localization via zero ablation
โ”‚   โ”œโ”€โ”€ characterisation_diversity.py # Layer-wise SVD spectral analysis
โ”‚   โ”œโ”€โ”€ characterisation_energy.py    # Layer-wise Frobenius norm analysis
โ”‚   โ””โ”€โ”€ transferability_test.py       # Block-wise model merging evaluation
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ vision_token_swapper.py       # Visual token swapping utility (KV cache manipulation)
โ”œโ”€โ”€ runs/                             # Shell scripts to launch experiments
โ”œโ”€โ”€ dataset/                          # Vision functionality dataset (counting, OCR, grounding, recognition)
โ”œโ”€โ”€ results/                          # Output directory (gitignored)
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

๐Ÿ“‚ Results

All results are saved under results/, organized by experiment type and model:

results/
โ”œโ”€โ”€ localization_vision/{Model_Name}/
โ”œโ”€โ”€ localization_reasoning/{Model_Name}/{dataset}/
โ”œโ”€โ”€ characterisation_diversity/{Recipe}/
โ”œโ”€โ”€ characterisation_energy/{Recipe}/
โ””โ”€โ”€ transferability_test/{Recipe}/

๐Ÿ“ Citation

@misc{li2026doesrlimprovevisual,
      title={What does RL improve for Visual Reasoning? A Frankenstein-Style Analysis}, 
      author={Xirui Li and Ming Li and Tianyi Zhou},
      year={2026},
      eprint={2602.12395},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2602.12395}, 
}

๐Ÿ“„ License

This project is licensed under the MIT License.