Multi-modal Large Language Models (MLLMs) like LLaVA have significantly advanced AI's ability to interpret and discuss visual information. However, these models face a major computational bottleneck: high-resolution images generate hundreds of visual tokens. Since the Large Language Model (LLM) is the most computationally expensive component, processing this high volume of tokens leads to slow inference and high resource consumption.
To address this, the framework VisToG (Visual Token Grouping) introduces a novel mechanism to compress redundant visual tokens into a compact set of semantically rich representations before they reach the LLM. VisToG achieves a 27% reduction in inference time while maintaining 98.1% of the original performance of state-of-the-art models.
The VisToG Framework
The core innovation of VisToG lies in its ability to tap into the pre-trained knowledge of vision encoders (such as CLIP) to group tokens intelligently without requiring external segmentation masks or extra supervision.
Semantic Tokens and Grouping Layer
The architecture inserts learnable "semantic tokens" into the vision encoder to act as cluster centers. A grouping layer utilizes a differentiable assignment (via the Gumbel-Softmax trick) to merge original image patches into a smaller set of "VIS" tokens based on their similarity to these semantic centers.
Isolated Attention
A critical component is the "isolated attention" mask. This mechanism prevents the new semantic tokens from distorting the highly optimized features of the pre-trained vision encoder. While original image patches are blocked from attending to the new semantic tokens, the semantic tokens can attend to the patches. This preserves visual feature integrity while allowing the new tokens to learn effective grouping strategies.
Instruction-Aware Training
VisToG is trained in two stages. After an initial alignment stage, the model undergoes "Visual Instruction Tuning." During this phase, the grouping layer is trained alongside the LLM, enabling the model to group tokens based on the context of user queries—for example, focusing on specific objects mentioned in a question.
Experimental Results
Researchers evaluated VisToG using standard benchmarks including GQA, TextVQA, POPE, MMBench, and ScienceQA. The results demonstrate that VisToG effectively manages the trade-off between speed and accuracy.
- Efficiency Gains: VisToG reduces visual token counts from 576 to as few as 64, resulting in a speedup of over 27%.
- Performance Retention: On the MME benchmark, VisToG with 128 tokens achieved a score of 1421.2, closely matching the full LLaVA-1.5 score of 1452.0.
- Superiority Over Baselines: VisToG consistently outperformed other compression methods, such as Q-Former and Adaptive Average Pooling, particularly at lower token counts. Qualitative analysis confirms that VisToG successfully clusters tokens belonging to the same semantic objects, such as animals or electronics, preserving the "essence" of the image for the LLM.
Conclusion
VisToG demonstrates that visual token redundancy in MLLMs can be mitigated through intelligent semantic grouping. By utilizing isolated attention and instruction-aware training, the framework provides a stable and efficient alternative to random token pruning or simple pooling. Future work may involve extending VisToG to video-based MLLMs, where temporal redundancy offers even greater opportunities for computational optimization.
Summary updated