NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Script: Graph-Structured and Query-Conditioned Semantic Token Pruning for Multimodal Large Language Models

Zhongyu Yang, Dannong Xu, Wei Pang, Yingfang Yuan

Abstract

The rapid growth of visual tokens in multimodal large language models (MLLMs) leads to excessive memory consumption and inference latency, especially when handling high-resolution images and videos. Token pruning is a technique used to mitigate this issue by removing redundancy, but existing methods often ignore relevance to the user query or suffer from the limitations of attention mechanisms, reducing their adaptability and effectiveness. To address these challenges, we propose Script, a plug-and-play pruning method that requires no retraining and generalizes across diverse MLLMs. Script comprises two modules: a graph-structured pruning module that removes visually redundant tokens, and a query-conditioned semantic pruning module that preserves query-relevant visual information. Together, they enhance performance on multimodal tasks. Experiments on fourteen benchmarks across image and video understanding tasks show that Script consistently achieves higher model efficiency and predictive accuracy compared to existing pruning methods. On LLaVA-NeXT-7B, it achieves up to $6.8\times$ prefill speedup and $10\times$ FLOP reduction, while retaining 96.88% of the original performance.

Introduction: The Challenge of Token Explosion

Multimodal Large Language Models (MLLMs), such as LLaVA, have demonstrated remarkable capabilities in visual understanding. However, their computational demands scale quadratically with the number of visual tokens. High-resolution images and long videos generate thousands of tokens, leading to significant memory overhead and slow inference response times.

Existing token pruning methods typically suffer from two main drawbacks:

  1. Query Blindness: Many methods prune tokens based solely on visual similarity, often discarding small but critical objects necessary to answer specific user queries.
  2. Attention Sinks: Methods relying on internal attention scores are frequently biased toward large foreground objects, potentially missing subtle background details relevant to the prompt.

The Script Framework

To overcome these limitations, we introduce Script (Graph-Structured and QueRy-CondItioned Pruning), a training-free, "plug-and-play" solution. Script refines the token set through two synergistic modules:

1. Graph-Structured Pruning (GSP)

GSP addresses visual redundancy by modeling the image as a bipartite graph. By partitioning tokens into "even" and "odd" sets and calculating similarities between them, Script identifies redundant regions (e.g., expansive backgrounds) with 75% less computational overhead than exhaustive similarity checks.

2. Query-Conditioned Semantic Pruning (QCSP)

QCSP acts as a semantic filter. It first scores tokens based on their relevance to the user's text query. It then employs Determinantal Point Processes (DPP) to select a subset of tokens that are both highly relevant and visually diverse. This ensures comprehensive scene coverage rather than redundant focus on a single object.

Qualitative comparison of Script against other pruning methods across various user queries.

Experimental Evaluation

Script was evaluated across 14 benchmarks, including general image VQA (GQA, ScienceQA, VQAv2), reasoning and hallucination (MMBench, POPE), and video understanding (VideoMME, MVBench). Testing spanned multiple architectures, including LLaVA-1.5, LLaVA-NeXT, and InternVL3.

Key Results

  • Massive Efficiency Gains: On LLaVA-NeXT-7B, Script achieved a 10x reduction in FLOPs and a 6.8x speedup in the prefill stage of inference.
  • High Accuracy Retention: Even when pruning nearly 89% of visual tokens, Script maintained 96.88% of the original model's performance on the POPE benchmark.
  • Superior to Baselines: Script consistently outperformed other state-of-the-art pruning methods like FastV, VisionZip, and DivPrune, especially in aggressive pruning scenarios.
Efficiency gains and performance comparison of Script against state-of-the-art pruning methods.

Key Insights

  • Long-Range Redundancy: Effective pruning must account for similar patterns appearing in distant parts of an image, not just adjacent pixels.
  • Avoiding the [CLS] Token Trap: Relying on standard [CLS] attention scores often misses query-relevant background tokens. Script's query-conditioned approach ensures these critical details are preserved.
  • Diversity via DPP: Treating token selection as a geometric problem via DPP naturally balances relevance with visual diversity, preventing the model from focusing on redundant features.

Limitations and Future Work

While highly effective, Script currently requires access to internal model tokens, limiting its use with closed-source APIs like GPT-4o. Future research may explore extending this approach to other modalities, such as audio, and implementing adaptive thresholds that adjust based on image complexity or query difficulty.

Summary updated

BibTeX
@article{yang2025script,
  author = {Zhongyu Yang and Dannong Xu and Wei Pang and Yingfang Yuan},
  title = {{Script: Graph-Structured and Query-Conditioned Semantic Token Pruning for Multimodal Large Language Models}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=F6xKzbgcHq},
}
Figure