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:
- Prefill Compute: Processing thousands of visual tokens through transformer layers is slow.
- 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.
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.
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.
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