Skip to content
seilkPublic

About

vSTREAM: Real-Time Visual Attribution Streaming in Thinking Models

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

vSTREAM

Real-Time Visual Attribution Streaming in Thinking Models

Seil Kang¹ · Woojung Han¹ · Junhyeok Kim¹ · Jinyeong Kim¹ · Youngeun Kim² · Seong Jae Hwang¹

¹Yonsei University ²Amazon

paper project page bibtex license code released


Faithfulness–efficiency tradeoff. vSTREAM is faithful and real-time.
Existing attribution methods force a choice between faithfulness and efficiency. vSTREAM occupies the top-right region — faithful and real-time.
▶ Live animated demo on the project page


TL;DR

vSTREAM is a real-time visual attribution method for multimodal reasoning models. It explains which image regions ground each step of a thinking trace — while the model is still generating.

  • Faithful without extra passes. A linear estimator predicts counterfactual region-ablation effects from attention features that are already computed during generation. No extra backward passes, no repeated inference.
  • Streams as the model thinks. Attribution runs asynchronously in a background worker, so users can watch attributions appear span-by-span rather than waiting until generation finishes.
  • One estimator, five tasks, four models. Trained once in ~4.5 hours on a single GPU with 2,000 examples, the estimator reaches faithfulness comparable to gradient- and perturbation-based baselines across five task families and four thinking VLMs.

Method

vSTREAM pipeline: semantic region clustering → attention pooling → linear ablation-effect estimator → async streaming

vSTREAM decomposes attribution into three stages:

  1. Semantic Region Unitization. DINOv3 features partition the image into K ∈ [16, 128] semantically coherent regions via agglomerative clustering with Ward's linkage. No external segmentation masks required.
  2. Attention Feature Extraction. For each thinking span S and region Rₖ, mean-pool cross-attention across all layers and heads to form a feature vector f ∈ ℝ^(L·H). Since attention is already computed during generation, extraction cost is negligible.
  3. Amortized Estimator & Streaming. A linear estimator with L·H parameters maps attention features to counterfactual ablation effects. Trained once on 2,000 examples with a Pearson-correlation loss. At inference, attribution runs asynchronously via a producer-consumer queue, adding near-zero latency.

Code

The first public code release is now available in this repository. This drop includes a compact Qwen3-VL-8B-Thinking path for training and inference:

  • inference/ — Qwen wrapper, attention feature extraction, source construction, attribution export
  • training/ — linear estimator and Pearson-correlation loss
  • scripts/online_train.py — end-to-end estimator training from an image-question pair
  • inference/infer_attribution.py — attribution inference with heatmap and JSON outputs
  • assets/ — example image and a small estimator checkpoint

Install the core dependencies:

pip install -r requirements.txt

Run a CPU-only smoke check:

python -m scripts.verify_cpu

Run attribution with local Qwen3-VL-8B-Thinking weights:

python -m inference.infer_attribution \
  --weights_dir /path/to/hf_cache \
  --image assets/example_image.png \
  --question "What is shown?" \
  --theta assets/estimator_qwen3vl8b.pt \
  --out_dir /tmp/vstream_demo \
  --source_mode block

Model downloads are disabled by default. Pass --allow_download only when downloading weights from Hugging Face is intended.

Citation

If vSTREAM is useful in your research, please cite:

@misc{kang2026vstream,
  title         = {Real-Time Visual Attribution Streaming in Thinking Models},
  author        = {Kang, Seil and Han, Woojung and Kim, Junhyeok and Kim, Jinyeong and Kim, Youngeun and Hwang, Seong Jae},
  year          = {2026},
  eprint        = {2604.16587},
  archivePrefix = {arXiv},
  doi           = {10.48550/arXiv.2604.16587}
}

License

Released under the MIT License.

About

vSTREAM: Real-Time Visual Attribution Streaming in Thinking Models

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages