发现多模态大模型中视觉功能分布于特定解码层,可精准定位并优化。
Vision Function Layer in Multimodal LLMs
- 通过视觉令牌替换法,定位计数、识别等视觉功能所在层。
- 仅用20%数据训练,性能达全量数据的98%,显著提升效率。
- 适合想高效微调或理解模型视觉机制的研究者与工程师。
本研究发现,多模态大语言模型(MLLMs)中与视觉相关的功能解码分布在不同解码层中,每项功能如计数、定位或OCR识别通常集中于两到三层,我们将其定义为视觉功能层(VFL)。不同VFL的深度和顺序在多个MLLM中具有一致性,与人类认知行为高度吻合(如先识别、再计数、后定位)。该结论基于我们提出的新型分析框架——视觉令牌替换(Visual Token Swapping),通过修改目标键值缓存条目,精确揭示解码过程中的层特定功能。这些洞察可用于定制化微调:当仅对与训练数据功能匹配的VFL应用LoRA时,VFL-LoRA不仅优于全模型微调,还能防止域外功能遗忘。此外,通过分析特定VFL被移除时在训练数据上的性能差异,VFL-select可自动按功能分类数据,实现高效数据筛选。该方法在数据选择上超越人工专家,仅使用原数据集20%即可达到98%的全量数据性能。本研究深化了对MLLM视觉处理机制的理解,推动更高效、可解释、鲁棒的模型构建。
原文摘要 · Abstract (English)
This study identifies that visual-related functional decoding is distributed across different decoder layers in Multimodal Large Language Models (MLLMs). Typically, each function, such as counting, grounding, or OCR recognition, narrows down to two or three layers, which we define as Vision Function Layers (VFL). Additionally, the depth and its order of different VFLs exhibits a consistent pattern across different MLLMs, which is well-aligned with human behaviors (e.g., recognition occurs first, followed by counting, and then grounding). These findings are derived from Visual Token Swapping, our novel analytical framework that modifies targeted KV cache entries to precisely elucidate layer-specific functions during decoding. Furthermore, these insights offer substantial utility in tailoring MLLMs for real-world downstream applications. For instance, when LoRA training is selectively applied to VFLs whose functions align with the training data, VFL-LoRA not only outperform full-LoRA but also prevent out-of-domain function forgetting. Moreover, by analyzing the performance differential on training data when particular VFLs are ablated, VFL-select automatically classifies data by function, enabling highly efficient data selection to directly bolster corresponding capabilities. Consequently, VFL-select surpasses human experts in data selection, and achieves 98% of full-data performance with only 20% of the original dataset. This study delivers deeper comprehension of MLLM visual processing, fostering the creation of more efficient, interpretable, and robust models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。