2025-06-06 · 专家 · 多模态 · 机器学习 · 计算机视觉

SparseMM: Head Sparsity Emerges from Visual Concept Responses in MLLMs

本文提出了一种基于视觉注意力头部稀疏性的KV-Cache优化策略,用于加速多模态大语言模型(MLLM)的推理,实现了更优的准确性与效率平衡。

更新于 2025-06-06。作者:Jiahui Wang、Zuyan Liu、Yongming Rao、Jiwen Lu。

中文摘要

多模态大型语言模型(MLLMs)通常是通过扩展预训练的大型语言模型(LLMs)以增加视觉能力而得到的。在本研究中,我们通过分析其注意力机制来探究MLLMs如何处理视觉输入。我们发现了一个令人惊讶的稀疏现象:在LLMs中,只有一小部分(大约不到5%)的注意力头(称为视觉头)积极贡献于视觉理解。为了有效地识别这些头,我们设计了一个无需训练的框架,通过有针对性的响应分析来量化注意力头的视觉相关性。基于这一发现,我们引入了SparseMM,这是一种基于KV-Cache的优化策略,它根据视觉得分对LLMs中的头部分配不对称的计算预算,利用视觉头的稀疏性来加速MLLMs的推理。与之前忽略视觉特性的KV-Cache加速方法相比,SparseMM在解码过程中优先考虑压力和保持视觉语义。在主流的多模态基准上的广泛评估表明,SparseMM实现了卓越的精度-效率权衡。值得注意的是,SparseMM在生成过程中实现了1.38倍的实时加速和52%的内存减少,同时在效率测试中保持了性能的一致性。我们的项目已在https://github.com/CR400AF-A/SparseMM上开源。

英文摘要

Multimodal Large Language Models (MLLMs) are commonly derived by extending pre-trained Large Language Models (LLMs) with visual capabilities. In this work, we investigate how MLLMs process visual inputs by analyzing their attention mechanisms. We reveal a surprising sparsity phenomenon: only a small subset (approximately less than 5%) of attention heads in LLMs actively contribute to visual understanding, termed visual heads. To identify these heads efficiently, we design a training-free framework that quantifies head-level visual relevance through targeted response analysis. Building on this discovery, we introduce SparseMM, a KV-Cache optimization strategy that allocates asymmetric computation budgets to heads in LLMs based on their visual scores, leveraging the sparity of visual heads for accelerating the inference of MLLMs. Compared with prior KV-Cache acceleration methods that ignore the particularity of visual, SparseMM prioritizes stress and retaining visual semantics during decoding. Extensive evaluations across mainstream multimodal benchmarks demonstrate that SparseMM achieves superior accuracy-efficiency trade-offs. Notably, SparseMM delivers 1.38x real-time acceleration and 52% memory reduction during generation while maintaining performance parity on efficiency test. Our project is open sourced at https://github.com/CR400AF-A/SparseMM.

解读

一句话总结

本文提出了一种基于视觉注意力头部稀疏性的KV-Cache优化策略,用于加速多模态大语言模型(MLLM)的推理,实现了更优的准确性与效率平衡。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源