ST3: Accelerating Multimodal Large Language Model by Spatial-Temporal Visual Token Trimming

Jiedong Zhuang, Lu Lu, Ming Dai, Rui Hu, Jian Chen, Qiang Liu, Haoji Hu

Abstract

Multimodal Large Language Models (MLLMs) like LLaVA have demonstrated remarkable capabilities in visual understanding but suffer from high computational costs due to the large number of visual tokens. This paper introduces ST3 (Spatial-Temporal Visual Token Trimming), a training-free framework designed to accelerate MLLM inference. ST3 identifies and removes redundant visual tokens across both model layers (spatial) and the generation process (temporal). By leveraging insights into attention sparsity and "lazy layers," ST3 achieves up to a 2× speedup and reduces KV cache memory usage by over 50% while maintaining near-original accuracy across various benchmarks.

Introduction

The integration of visual encoders with Large Language Models has led to the rise of powerful MLLMs. However, these models are computationally "heavy." For instance, when processing an image, models like LLaVA break it down into hundreds or thousands of visual tokens. The quadratic complexity of the self-attention mechanism with respect to token count makes processing these tokens extremely expensive.

Existing acceleration methods often fall into two traps: they either require resource-intensive retraining or employ coarse pruning strategies that ignore the dynamic needs of the model during text generation. ST3 addresses these challenges with a "plug-and-play," training-free approach that optimizes token usage without touching model weights.

Methodology

ST3 introduces three core optimizations based on an in-depth analysis of MLLM attention patterns:

  1. Progressive Visual Token Pruning (PVTP): Shallow layers of a model typically exhibit dense attention across the entire image, while deeper layers focus on sparse, specific regions. PVTP prunes inattentive tokens layer-by-layer. It uses a step-wise mechanism to ensure consistency in token reuse between pruning steps.
  2. Visual Token Annealing (VTA): This addresses the temporal dimension. As the model generates text, its reliance on the original image tokens decreases. VTA employs a cosine-based decay function to gradually evict visual tokens from the KV cache as the output sequence grows, significantly saving memory.
  3. QK Heredity: Analysis revealed the existence of "lazy layers"—adjacent layers with nearly identical attention patterns. ST3 allows these layers to inherit Query (Q) and Key (K) distributions from preceding layers, skipping redundant calculations.
Comparison of visual token pruning strategies: (a) LLaVA (bloated), (b) FastV (layer-oblivious), (c) VTW (overcut), and (d) ST3 (adaptive spatial-temporal pruning).

Experimental Evaluation

The authors evaluated ST3 on several standard MLLM benchmarks, including ScienceQA (SQA), AI2D, MMMU, and MMBench for visual question answering, as well as POPE and MME for hallucination and perception. Image captioning performance was tested on COCO2017, Flickr30k, and Nocaps. The primary architectures used were LLaVA-1.5 and LLaVA-NeXT (7B and 13B variants).

Key Results

ST3 demonstrates a significant improvement in efficiency without compromising performance:

  • Efficiency: It achieves a 2× speedup in decoding latency and a 53% to 61% reduction in FLOPs (floating-point operations) across various LLaVA models.
  • Memory Savings: KV cache memory usage is reduced to approximately 30% of the original model, which is a massive win for deployment on memory-constrained edge devices.
  • Performance Retention: On benchmarks like ScienceQA and MME, ST3 maintains or even slightly exceeds the accuracy of the original "bloated" models, despite using half the resources.
Accuracy vs. Latency comparison on standard benchmarks. ST3-13B achieves superior accuracy with significantly lower latency compared to LLaVA-1.5 and other training-free baselines.

Discussion and Future Work

While ST3 is highly effective, its performance can be sensitive to hyperparameters like pruning stride ($S$) and annealing thresholds ($\tau$). Additionally, while the "lazy layer" phenomenon is general, specific layer locations were identified for LLaVA architectures; applying this to drastically different MLLMs might require a new layer-similarity sweep. Future work could involve integrating these spatial-temporal insights directly into the training phase to develop natively sparse multimodal models.

Summary updated

BibTeX
@inproceedings{zhuang2025st,
  author = {Jiedong Zhuang and Lu Lu and Ming Dai and Rui Hu and Jian Chen and Qiang Liu and Haoji Hu},
  title = {{ST3: Accelerating Multimodal Large Language Model by Spatial-Temporal Visual Token Trimming}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i10.33201},
}
Figure