arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2311.04464cs.CV
收藏

用语义感知微调增强少样本 CLIP

Enhancing Few-shot CLIP with Semantic-Aware Fine-Tuning

Tsinghua University(清华大学);Alibaba Group(阿里巴巴集团);Meituan Group(美团集团);Dalian University of Technology(大连理工大学);Microsoft Research Asia(微软亚洲研究院)

Yao Zhu, Yuefeng Chen, Wei Wang, Xiaofeng Mao, Xiu Yan, Yue Wang, Zhigang Li, Wang lu, Jindong Wang, Xiangyang Ji

AI总结:

本文针对少样本 CLIP 中冻结注意力池化难以适配任务语义的问题,提出 SAFE 微调该池化层并在推理时残差融合原始特征,可增强少样本性能并兼容 adapter。

摘要:

从有限训练样本中学习泛化表征,对于在低资源场景中应用深度神经网络至关重要。近年来,基于对比语言-图像预训练(Contrastive Language-Image Pre-training,CLIP)的方法在少样本适配任务中展现出可观性能。为避免少样本微调导致的灾难性遗忘和过拟合,现有工作通常冻结在大规模数据集上预训练的 CLIP 参数,却忽视了其中部分参数可能并不适合下游任务。为此,本文重新审视 CLIP 的视觉编码器,特别关注其独特的注意力池化层;该层对密集特征图执行空间加权求和。鉴于密集特征图包含有意义的语义信息,而且不同语义对各类下游任务具有不同重要性(例如在宠物分类任务中应优先关注耳朵和眼睛等语义,而非侧后视镜),在不同少样本任务中对密集特征使用相同的加权求和操作可能并不合适。因此,我们提出在训练过程中微调注意力池化层参数,促使模型关注任务特定语义。在推理阶段,我们将经微调注意力池化层和原始注意力池化层得到的特征进行残差融合,以同时纳入少样本知识和预训练 CLIP 的先验知识。我们将该方法命名为 Semantic-Aware FinE-tuning(SAFE)。SAFE 能有效增强传统少样本 CLIP,并且与现有 adapter 方法兼容(组合称为 SAFE-A)。

英文摘要:

Learning generalized representations from limited training samples is crucial for applying deep neural networks in low-resource scenarios. Recently, methods based on Contrastive Language-Image Pre-training (CLIP) have exhibited promising performance in few-shot adaptation tasks. To avoid catastrophic forgetting and overfitting caused by few-shot fine-tuning, existing works usually freeze the parameters of CLIP pre-trained on large-scale datasets, overlooking the possibility that some parameters might not be suitable for downstream tasks. To this end, we revisit CLIP's visual encoder with a specific focus on its distinctive attention pooling layer, which performs a spatial weighted-sum of the dense feature maps. Given that dense feature maps contain meaningful semantic information, and different semantics hold varying importance for diverse downstream tasks (such as prioritizing semantics like ears and eyes in pet classification tasks rather than side mirrors), using the same weighted-sum operation for dense features across different few-shot tasks might not be appropriate. Hence, we propose fine-tuning the parameters of the attention pooling layer during the training process to encourage the model to focus on task-specific semantics. In the inference process, we perform residual blending between the features pooled by the fine-tuned and the original attention pooling layers to incorporate both the few-shot knowledge and the pre-trained CLIP's prior knowledge. We term this method as Semantic-Aware FinE-tuning (SAFE). SAFE is effective in enhancing the conventional few-shot CLIP and is compatible with the existing adapter approach (termed SAFE-A).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑