Chiosa
Computer Vision

One signal prunes visual tokens across two stages

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

3 min
Updated
TwinPrune pipeline. A single spatial density signal ρ, defined as each visual token’s average cosine dissimilarity to its w×w neighborhood (b), drives both phases. Prefill bipartite-merges low-ρ…
TwinPrune pipeline. A single spatial density signal ρ, defined as each visual token’s average cosine dissimilarity to its w×w neighborhood (b), drives both phases. Prefill bipartite-merges low-ρ source tokens into high-ρ destination anchors, cutting FLOPs (c). Decode ranks…Figure 3 · TwinPrune: Density-Aware Two-Phase Token Pruning for Vision-Language Models · Kai Liu et al. · CC BY 4.0

In plain words

Vision-language models process images and text together, but shortening the visual information they keep can affect different stages of answering.

TwinPrune is a method that uses one score to choose which visual details to merge before generation and which cached details to remove as an answer is generated.

In a diagnostic, removing all visual cache entries changed 45.5% of InternVL-3.5-8B’s TextVQA predictions, while first-token tests showed at most 0.54% mismatches. The counts compare prediction strings with uncompressed outputs; they are not accuracy changes.

The research

When a vision-language model is evaluated only on its first generated token, can that score tell us whether removing visual information during answer generation changes the rest of the answer?

The paper argues that the scoring rule matters: a first-token score is fixed before decode-time cache removal takes effect.

TwinPrune reuses one spatial-density score to merge visual tokens before generation and evict visual cache entries at the start of answer generation.

TwinPrune applies one spatial-density score to both stages of vision-language inference: it guides visual-token merging before generation and visual-cache eviction when answer generation begins.

On TextVQA, which scores full generated answers by exact match, how did density-based eviction compare with H2O when both kept 12.5% of visual cache entries?

InternVL-3.5-8B scored 0.648 with density eviction and 0.552 with H2O. The comparison shows an advantage in that tested setting.

These results cover seven model variants from three model families and the tested tasks and configurations. The authors did not test multi-stage prefill compression, and the spatial-density calculation assumes tokens lie on a regular grid, limiting its direct fit to non-grid tokenizers.

What the evidence shows

  • One method, two stages

    TwinPrune is a method for pruning visual information in vision-language models, which process images alongside text. It uses one spatial-density score in two inference stages: before answer generation, it guides the merging of visual tokens; during answer generation, it ranks visual entries in the cache for removal.

    The paper first asks whether common evaluation scores can actually reveal what happens in the second stage.

  • What the tests can see

    MMBench, POPE, and ScienceQA score the first generated token, such as a multiple-choice or yes/no answer. Decode-time cache removal happens only after that token is determined, so these tests cannot measure its effect on later tokens.

    TextVQA scores the full generated answer by exact match, making it a fuller test of decode changes. The distinction concerns what each test scores, not simply how long a response is.

  • A diagnostic exposes the gap

    To demonstrate the difference, the authors removed all visual cache entries during decode for InternVL-3.5-8B and compared prediction strings with the no-compression outputs. The mismatch rate was 45.5% on TextVQA, but no more than 0.54% on the three first-token tests.

    These are mismatches, not accuracy changes; the contrast shows that first-token scores can stay nearly unchanged while later answer generation changes.

  • A matched decode comparison

    The decode comparison asks how density ranking performs against H2O when both methods keep the same share of visual cache entries. On TextVQA, which scores full answers by exact match, density scored 0.648 and H2O scored 0.552 for InternVL-3.5-8B at a 12.5% keep ratio.

    This is a 9.6 percentage-point advantage in that specific setting, not a result for every model or task.

  • Separate evidence for prefill

    Prefill has a separate timing result. For InternVL-3.5-8B with batch size eight, 12 image tiles, 3,072 visual tokens, layer 0, and 80% pruning, TwinPrune took 150.8 milliseconds per sample on an RTX A6000; uncompressed prefill took 487.7 milliseconds.

    A further control held a layer-15, 50%-pruning pipeline fixed and changed its ranking score: density scored 0.616 on TextVQA versus 0.594 for L2 norm. That control supports density in the tested prefill setup.

Deep

Next paperBifocal preserves image detail and context while trimming visual input