VFlowOpt: A Token Pruning Framework for LMMs with Visual Information Flow-Guided Optimization

Sihan Yang, Runsen Xu, Chenhang Cui, Tai Wang, Dahua Lin, Jiangmiao Pang

TL;DR

VFlowOpt is a training-free token pruning framework that dramatically cuts inference cost in Large Multimodal Models (LMMs) by estimating visual token importance via calibrated attention and patch entropy, recycling discarded tokens into compact spatial summaries, and tuning pruning hyperparameters through Bayesian optimization. On LLaVA-OneVision-7B, it prunes up to 90% of visual tokens while preserving ~85.5% of original benchmark performance, reducing KV-cache footprint by 89% and speeding up inference by 3.8×.

What Problem Does This Paper Address?

Modern LMMs (such as LLaVA-OneVision and Qwen2-VL) process high-resolution images by converting them into thousands of visual tokens. While this enables fine-grained scene understanding, the quadratic complexity of self-attention leads to massive KV-cache memory usage and high inference latency.

Existing training-free token pruning techniques rely on simplistic heuristics—such as using raw attention weights from all tokens or uniform pruning schedules across layers. However, redundant background tokens often pay high attention to each other, corrupting importance metrics. Furthermore, hand-crafted pruning ratios fail to adapt across different model architectures, often leading to severe performance collapse.

Methods

VFlowOpt introduces three tightly integrated components:

  1. Calibrated Importance Estimation: Rather than averaging attention over all tokens, VFlowOpt first filters for "relatively important tokens" (tokens receiving attention above a calibrated threshold $\tau$) and computes importance scores based only on the attention incoming from this subset. This score is combined with patch-level information entropy, ensuring high-texture, visually rich image regions are not pruned.
  2. Progressive Pruning with Spatial Token Recycling: Pruning is executed across three progressive stages within the LMM backbone. In the initial stage, discarded tokens within local $a \times a$ spatial grid cells are merged via importance-weighted averaging into a single "recycled" token, preserving subtle context while still cutting token volume.
  3. Visual Information Flow-Guided Bayesian Optimization: Instead of guessing layer-wise retention rates ($R_1, R_2, R_3$), entropy weights ($\alpha$), and grid sizes ($a$), VFlowOpt formulates hyperparameter selection as an optimization problem. Observing that visual information ultimately aggregates into the final token of the prompt sequence, it uses Bayesian Optimization (with only ~30 unlabeled calibration instances over 50 steps) to maximize the cosine similarity between the final token representations with and without pruning.
Input Image ──> Vision Encoder ──> Calibrated Importance + Entropy
                                            │
  ┌──────────────── Token Recycling ◄───────┴── Initial Pruning (Stage 1)
  │
  └─► Recycled + Retained Tokens ──► LLM Layers (Stage 2 & 3 Pruning) ──► Output
                                              ▲
                 Bayesian Optimization ───────┘ (Matches unpruned final token flow)

Datasets

The authors evaluated VFlowOpt across standard multimodal benchmarks without introducing new datasets:

  • Image Benchmarks (10 datasets): MME, MMStar, MMBench, ScienceQA-IMG (SQA), POPE, GQA, VizWiz, TextVQA, ChartQA, and DocVQA.
  • Video Benchmarks (2 datasets): SEED-Bench (video) and VideoMME (split into short, medium, and long durations).

Key Insights and Ideas

  • Redundant tokens reinforce each other: Background tokens (like uniform sky or wall patches) attend disproportionately to one another. Naive attention averaging treats these as "important," so isolating high-confidence tokens before computing attention importance is essential.
  • The "final token" represents multimodal convergence: By the final layer of a decoder-only LLM, multimodal information flow concentrates into the sequence's last token position. Minimizing representation drift at this single token serves as a lightweight, effective surrogate for preserving end-to-end task performance.
  • Lightweight data-driven tuning beats hand-crafted heuristics: Running a 30-minute Bayesian search on 30 unlabeled samples reliably finds model-specific sweet spots that prevent the catastrophic degradation seen in static multi-stage baselines (e.g., FitPrune, PDrop).

Key Results

  • LLaVA-OneVision-7B (Image):
  • 50% Retention: Retains 99.9% of original multi-benchmark performance (scoring 1591 on MME vs. 1581 vanilla) with a 49.5% KV-cache reduction and 1.8× speedup.
  • 10% Retention (90% Pruned): Retains 85.5% average accuracy (surpassing the nearest baseline, VisionZip, by 3.3%), slashes KV-cache memory by 89.0% (1786 MB down to 197 MB), and delivers a 3.8× inference acceleration (latency reduced from 1040 ms to 272 ms).
  • Architecture Generalization: Maintains 98.8% and 97.8% of original performance at 25% token retention on LLaVA-NeXT-7B and Qwen2-VL-7B, respectively.
  • Video Tasks: Achieves 100% performance preservation at 25% token retention on VideoMME and SEED-Bench.

Limitations and Future Work

  • Search Overhead: Although brief (~30 minutes), the Bayesian optimization step requires an offline search pass per model architecture and target budget before deployment.
  • Spatial Grid Constraints: The token recycling mechanism relies on regular spatial grids, which requires coordinate remapping when handling modern dynamic-resolution schemes (such as unpadding and aspect-ratio interpolation).
  • Generation-phase Savings: The paper measures prefill latency, FLOPs, and KV-cache footprint reductions; assessing the impact on long-form autoregressive generation quality remains an area for further investigation.

Summary updated

BibTeX
@inproceedings{yang2025vflowopt,
  author = {Sihan Yang and Runsen Xu and Chenhang Cui and Tai Wang and Dahua Lin and Jiangmiao Pang},
  title = {{VFlowOpt: A Token Pruning Framework for LMMs with Visual Information Flow-Guided Optimization}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
  url = {https://openreview.net/forum?id=mJbmzMl3I3},
}

Loading related content...

Figure