通过拆解注意力头功能,实现视觉语言模型的精准适配
DeAR: Fine-Grained VLM Adaptation by Decomposing Attention Head Roles
- 将深层注意力头按功能分为属性、泛化和混合三类
- 在15个数据集上兼顾任务适应与零样本泛化性能
- 适合需要精细控制模型行为的研究者
提示学习是适配预训练视觉语言模型(VLM)至下游任务的主流方法。然而,现有方法多依赖浅层捕获通用特征、深层处理任务特定知识的简单层中心观点,导致可学习标记与原始标记间交互失控,使任务知识削弱模型核心泛化能力,形成适配与泛化间的权衡。为此,我们挑战这一层中心视角,提出DeAR框架,通过分解注意力头角色实现细粒度适配。我们主张功能专属于深层中单个注意力头而非层间。基于此,引入概念熵度量,系统分类注意力头为属性、泛化和混合三类。依据角色设计专用属性标记与基于角色的注意力掩码机制,精确控制信息流,确保泛化头不受任务知识干扰。推理时进一步引入任务自适应融合策略。在15个数据集上的实验表明,DeAR在任务适配与泛化之间取得良好平衡,优于以往方法。
原文摘要 · Abstract (English)
Prompt learning is a dominant paradigm for adapting pre-trained Vision-Language Models (VLMs) to downstream tasks. However, existing methods often rely on a simplistic, layer-centric view, assuming shallow layers capture general features while deep layers handle task-specific knowledge. This assumption results in uncontrolled interactions between learnable tokens and original tokens. Task-specific knowledge could degrades the model's core generalization and creates a trade-off between task adaptation and the preservation of zero-shot generalization. To address this, we challenge the layer-centric view and propose \textbf{DeAR}, a framework that achieves fine-grained VLM adaptation by \textbf{De}composing \textbf{A}ttention head \textbf{R}oles. We posit that the functional specialization within VLMs occurs not between layers, but at the finer-grained level of individual attention heads in the deeper layers. Based on this insight, we introduce a novel metric, Concept Entropy, to systematically classify attention heads into distinct functional roles: \textit{Attribute}, \textit{Generalization}, and \textit{Mixed}. Guided by these roles, we introduce specialized attribute tokens and a Role-Based Attention Mask mechanism to precisely control information flow, ensuring generalization heads remain isolated from task-specific knowledge. We further incorporate a Task-Adaptive Fusion Strategy for inference. Extensive experiments on fifteen datasets show that DeAR achieves a strong balance between task adaptation and generalization, outperforming previous methods across various tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。