TwinPrune: Density-Aware Two-Phase Token Pruning for Vision-Language Models

Kai Liu, Anqi Li, Junxian Li, Zhixin Wang, Zhikai Chen, Renjing Pei, Yulun Zhang

TL;DR

TwinPrune introduces a unified "spatial density" signal to prune redundant visual tokens in Vision-Language Models (VLMs) across both the prefill (compute-heavy) and decode (memory-heavy) phases. Beyond the technical contribution, the paper exposes a critical "measurement artifact" in the field: many popular benchmarks are structurally unable to detect errors introduced during the decoding phase, leading to over-optimistic results in prior research.

What Problem Does This Paper Address?

As Vision-Language Models (VLMs) move toward higher resolutions and longer sequences, they hit two major bottlenecks:

  1. Prefill Compute: Processing thousands of visual tokens through transformer layers is slow.
  2. Decode Memory: Storing the Key-Value (KV) cache for all those tokens during autoregressive generation consumes massive amounts of VRAM.

While many "token pruning" methods claim to solve these issues with near-zero accuracy loss, the authors of TwinPrune argue that this consensus is based on a flawed evaluation methodology. Most VLM benchmarks (like MMBench or POPE) only require a single-token output (e.g., "A" or "Yes"). Because decode-phase pruning only affects the second token onwards, these benchmarks are "blind" to any damage caused during decoding. TwinPrune aims to provide a more robust pruning framework and a more honest evaluation standard.

Methods

The core of TwinPrune is a single, unified spatial density signal ($\rho$).

  • The Signal: For every visual token, the system calculates its average cosine dissimilarity to its neighbors on the spatial grid. A high density score means a token is "informative" (different from its surroundings), while a low score suggests it is "redundant."
  • Phase 1: Prefill (Density-Tilted FPS): During the initial prefill stage, the model uses a "density-tilted" farthest-point sampling (FPS) recurrence. This method balances coverage (picking tokens spread across the image) with density (prioritizing informative tokens). Redundant tokens are merged into informative "anchors" to save compute without losing information.
  • Phase 2: Decode (Density-Guided KV Eviction): Once the first token is generated, the same density scores are reused to perform a one-shot "eviction" of the KV cache. It simply keeps the top-$k$ most dense visual tokens and discards the rest to save memory.
The TwinPrune pipeline showing how a single density signal drives both prefill merging and decode eviction.

Datasets

The authors evaluate their method across seven model variants, including the InternVL-3.5 family (2B to 38B), Qwen3-VL, and LLaVA-1.5. They categorize benchmarks into two types:

  • Prefill Probes: MMBench, POPE, and ScienceQA (SQA). These primarily test the first decoded token.
  • Full-Pipeline Probes: TextVQA, MM-Vet, and DocVQA. These require long-form generation and are necessary to truly test decode-phase pruning.

Key Insights and Ideas

  • The "Argmax" Flaw: The authors prove that if you drop every single visual KV token during the decode phase, scores on MMBench and POPE barely move. This is because those benchmarks only care about the very first logit produced. This discovery suggests that many previous papers claiming "lossless" decode pruning were actually just measuring prefill quality.
  • Density vs. Attention: Unlike attention-based pruning, which can be "sink-biased" (focusing on tokens the model uses for technical reasons rather than content), spatial density is an intrinsic, query-invariant feature of the visual data itself.
  • Scaling Gracefully: Interestingly, the accuracy loss from pruning actually decreases as the model size grows from 8B to 38B. Larger models appear more robust to token removal.
Figure 2: Prefill-probe benchmarks are structurally insensitive to decode-phase KV eviction across three VLM families. Left: accuracy vs. visual KV kept on InternVL-3.5-8B. Right: prediction mismatch at DALL grouped by (benchmark, model). Details in Sec. 3.

Key Results

  • Speedup: TwinPrune achieves a 3.24× end-to-end prefill speedup on InternVL-3.5-8B at its most aggressive setting, thanks to highly optimized Triton-fused kernels.
  • Accuracy-Memory Pareto: In the decode phase, TwinPrune's density-based eviction consistently outperforms established baselines like H2O, SnapKV, and StreamingLLM.
  • Performance Gap: At a 12.5% KV keep ratio on TextVQA, TwinPrune outperforms H2O by 9.6 percentage points.
Figure 1: Two-Stage Pruning in TwinPrune. TwinPrune improves VLM inference through a two-stage pruning framework using a single unified pruning signal. The left panel evaluates visual token pruning in the prefilling stage, showing better accuracy–speedup trade-offs, while the right panel evaluates KV cache pruning on long-output benchmarks in the decode stage. Both panels report results on InternVL-3.5-8B under the same evaluation setting.

Limitations and Future Work

  • Grid Dependency: The current spatial density calculation assumes a regular grid of tokens. This makes it incompatible with models using non-grid tokenizers (like Q-Former) without further modification.
  • Single-Stage Prefill: The prefill compression is currently applied at a single chosen layer. The authors suggest that multi-stage scheduling (pruning gradually across layers) is a promising but unexplored direction.
  • Future Directions: The team aims to investigate "learning" the optimal density-aggregation kernel rather than using a fixed heuristic.

Summary updated

Abstract

We propose a unified spatial-density signal to score token importance for both inference phases: bipartite merge for prefill and KV eviction for decode, yielding measurable gains in each stage. To isolate the two phases, we split benchmarks by scoring logic. Prefill probes (MMBench, POPE, ScienceQA) evaluate only the first decoded token; their accuracy reflects prefill logits argmax before any decode KV eviction. Full-pipeline probes (TextVQA, DocVQA, MM-Vet) assess the complete generated sequence and capture both phases. We identify a critical evaluation pitfall: decode pruning claims validated solely on prefill probes measure prefill quality, not decode performance. Experiments show discarding all visual KV during decode barely affects prefill-probe accuracy but degrades TextVQA and MM-Vet drastically; this insensitivity stems from the scoring rule, not compression intensity.Evaluated on seven model variants (InternVL-3.5, Qwen3-VL, LLaVA-1.5) and three full-pipeline benchmarks, our method achieves a three-way Pareto frontier across compute, memory and accuracy. Density-based prefill compression maintains strong accuracy, scales linearly with visual token count, and delivers 100x faster token selection at high resolution. For decode, density top-k KV eviction consistently outperforms strong baselines H2O, SnapKV and StreamingLLM on TextVQA and MM-Vet across three retention ratios. At 0.125 keep ratio on TextVQA, it surpasses H2O by 9.6 points; InternVL-3.5 models (2B to 38B) maintain a 7 to 10 point advantage. Compression scales favorably with model size: every measured 8B to 38B model transition reduces accuracy loss instead of worsening it. We suggest MM-Vet or DocVQA as mandatory full-pipeline validation for any decode-phase claims. Our code is available at https://github.com/Kai-Liu001/TwinPrune
BibTeX
@inproceedings{liu2026twinprune,
  author = {Kai Liu and Anqi Li and Junxian Li and Zhixin Wang and Zhikai Chen and Renjing Pei and Yulun Zhang},
  title = {{TwinPrune: Density-Aware Two-Phase Token Pruning for Vision-Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=cmNvJykWg5},
}
Figure