Abstract
Multimodal large language models (MLLMs) demonstrate strong performance across visual tasks, but their efficiency is hindered by significant computational and memory demands from processing long contexts in multimodal inputs. To address this, we introduce PAR (Prompt-Aware Token Reduction), a novel and plug-and-play approach that reduces visual tokens efficiently without compromising model performance. Unlike previous methods that rely heavily on attention mechanisms and overlooking cross-modal interactions, PAR uses a prompt-aware strategy to adaptively identify and cluster essential visual tokens. PAR categorizes visual context redundancy into two types: external and internal. External redundancy is minimized through semantic retrieval, while internal redundancy is addressed using a token routing mechanism. This method substantially reduces computational load without requiring additional training or complex architectural modifications. Experimental results demonstrate that across various visual question answering tasks, PAR reduces FLOPs by 83% with a compression ratio of 89%, while retaining 97% of baseline accuracy. The adaptive design of PAR achieves a 2x token reduction ratio compared to prior approaches, enabling a better balance between performance and efficiency.
Introduction
Multimodal Large Language Models (MLLMs) like LLaVA or GPT-4 have revolutionized visual understanding, yet they suffer from a significant "visual token tax." A standard 336x336 image is typically decomposed into a grid of 576 tokens. Given the quadratic complexity of Transformer architectures, this massive input sequence leads to substantial computational and memory overhead during inference.
Previous efforts to mitigate this have focused on attention-based pruning. However, these methods are often "task-blind," retaining visually complex but semantically irrelevant patches—such as background foliage when the query is specifically about a foreground object. PAR addresses this by using the user's prompt as a guide to "skim" the image for only the most relevant information.
Methodology
PAR treats visual token selection as a retrieval problem guided by the user's specific query. It identifies and eliminates two primary forms of redundancy:
- External Redundancy: Visual tokens that are unrelated to the prompt.
- Internal Redundancy: Multiple tokens that represent the same semantic information (e.g., multiple tokens representing a uniform blue sky).
As shown in the pipeline below, PAR consists of three main stages:
- Query Rewriting: The input prompt is expanded via predefined templates to better align its semantic signature with visual features.
- Hybrid Granularity Retrieval: A graph-based clustering algorithm groups similar neighboring tokens into "semantic clusters." PAR then retrieves the most relevant clusters and individual tokens based on their similarity to the rewritten prompt.
- Token Routing: A final filtering step thins out internal redundancy by ensuring that if two retrieved tokens are too similar, only the most relevant one is preserved.
Crucially, PAR is training-free, allowing it to be integrated into existing models like LLaVA-1.5 without any fine-tuning or architectural changes.
Experimental Results
PAR was evaluated across a wide range of benchmarks, including GQA, MMBench, and TextVQA. Key findings include:
- Efficiency: PAR reduced FLOPs (floating-point operations) by 83% and reduced prefill time to just 31.3% of the original baseline.
- Compression: It achieved an 89% compression ratio, keeping only about 64 tokens instead of the original 576.
- Accuracy: Despite the massive reduction in data, it retained 97% of the baseline accuracy across all benchmarks.
- Hallucination Reduction: Interestingly, PAR improved performance on the POPE hallucination benchmark. By removing irrelevant visual tokens, the model was less likely to be distracted by background noise and hallucinate unrelated objects.
Conclusion
PAR offers a robust, plug-and-play solution for efficient MLLM inference. By shifting from task-blind attention pruning to prompt-aware retrieval, it achieves a superior balance of performance and efficiency. Future work will explore extending this logic to video processing, where temporal redundancy offers even greater opportunities for token reduction.
Summary updated