TokenCarve: Information-Preserving Visual Token Compression in Multimodal Large Language Models

Xudong Tan, Peng Ye, Chongjun Tu, Jianjian Cao, Yaoxin Yang, Lin Zhang, Dongzhan Zhou, Tao ChenarXiv 2025 · DOI

Introduction

Multimodal Large Language Models (MLLMs), such as LLaVA and Qwen-VL, have demonstrated remarkable capabilities in visual reasoning and understanding. However, these models face significant computational challenges due to the high number of visual tokens they must process. This paper introduces TokenCarve, a training-free, plug-and-play method designed to compress visual tokens by up to 77.8% while maintaining high accuracy. By strategically pruning and merging tokens based on their contribution to the attention matrix's information rank, TokenCarve achieves substantial inference speedups and memory reductions without requiring costly retraining.

Performance and efficiency gains of TokenCarve compared to the baseline LLaVA-7B model.

The Computational Bottleneck in MLLMs

Modern MLLMs typically convert images into hundreds of visual tokens (e.g., 576 tokens for a standard image). Since transformer self-attention scales quadratically ($O(n^2)$), this volume of tokens creates a massive bottleneck during inference, particularly by expanding the Key-Value (KV) cache.

Existing solutions generally fall into two categories: training-based methods, which require expensive end-to-end retraining, and training-free methods like FastV, which drop tokens dynamically. However, current training-free approaches often suffer from severe performance degradation when token counts are aggressively reduced. The core challenge lies in drastically cutting visual tokens without compromising the model's visual reasoning or OCR capabilities.

Methodology: The TokenCarve Framework

TokenCarve is a two-stage, training-free framework inserted early in the LLM (typically between the 2nd and 3rd layers) during the prefilling stage. Unlike methods that rely solely on attention scores, TokenCarve introduces Information-Preservation-Guided Selection (IPGS).

The TokenCarve architecture, illustrating the two-stage pruning and merging process within the LLM prefilling stage.

Stage 1: Pruning via IPGS

The authors utilize Singular Value Decomposition (SVD) on the attention output matrix to calculate an "Information Contribution Score." This metric measures how much a specific token contributes to the overall rank of the matrix. By combining this score with standard attention weights, TokenCarve prunes the least informative tokens, effectively removing noise while preserving essential structural data.

Stage 2: Guided Merging

The remaining tokens are categorized into high-importance (Set A) and lower-importance (Set B) groups based on their IPGS scores. Tokens in Set B are not simply discarded; instead, they are merged into their most similar counterparts in Set A using cosine similarity. This ensures that the "long tail" of visual context is compressed into key features rather than lost entirely.

Key Insights: Rank and Performance

A pivotal discovery in this research is the correlation between an MLLM's performance and the matrix rank of its attention outputs. The authors observed that performance drops precipitously when token reduction causes the matrix rank to collapse. By explicitly preserving matrix rank via SVD-based scoring, TokenCarve retains a richer representation of the image than attention-only methods. Furthermore, the grouping strategy ensures that critical foreground features are not diluted by averaging them with background noise during the merging process.

Experimental Results

TokenCarve was evaluated across 11 standard multimodal benchmarks, including MME, MMBench, ScienceQA, and TextVQA.

  • Efficiency: The method reduced visual tokens from 576 to 128 (a 77.8% reduction), resulting in a 1.23x speedup in inference latency and a 64% reduction in KV cache storage.
  • Accuracy: This aggressive compression resulted in only a 1.54% average drop in accuracy across the benchmark suite.
  • Robustness: At extreme compression levels (e.g., 64 tokens), TokenCarve significantly outperformed existing methods. On the POPE hallucination benchmark, while FastV's performance dropped by 17.2 points, TokenCarve's drop was limited to 2.7 points.

Limitations and Future Work

The authors note a current engineering limitation regarding Rotary Position Embeddings (RoPE). Because TokenCarve sparsifies tokens, the remaining tokens retain non-contiguous position IDs, requiring the model to recompute positional encodings rather than using optimized memory caches. This means the theoretical reduction in FLOPs is not yet fully realized as practical hardware speedup. Future work will focus on low-level optimizations to bridge this gap.

Summary updated

BibTeX
@misc{tan2025tokencarve,
  author = {Xudong Tan and Peng Ye and Chongjun Tu and Jianjian Cao and Yaoxin Yang and Lin Zhang and Dongzhan Zhou and Tao Chen},
  title = {{TokenCarve: Information-Preserving Visual Token Compression in Multimodal Large Language Models}},
  year = {2025},
  eprint = {2503.10501},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.10501},
}
Figure