[论文解读] Mask-guided Vision Transformer (MG-ViT) for Few-Shot Learning
本文提出了一种新型少样本学习框架——掩码引导视觉变换器(MG-ViT),通过在预训练视觉变换器中引入基于梯度加权类激活映射(Grad-CAM)的补丁掩码,聚焦于与任务相关的判别性图像补丁,同时通过残差连接保留全局上下文信息。MG-ViT在图像分类和目标检测基准上均达到最先进性能,在10-shot目标检测中相比标准微调最高提升9.1%,在10-shot图像分类中提升1.9%,实现了高效的知识泛化,且无需额外预训练成本。
Learning with little data is challenging but often inevitable in various application scenarios where the labeled data is limited and costly. Recently, few-shot learning (FSL) gained increasing attention because of its generalizability of prior knowledge to new tasks that contain only a few samples. However, for data-intensive models such as vision transformer (ViT), current fine-tuning based FSL approaches are inefficient in knowledge generalization and thus degenerate the downstream task performances. In this paper, we propose a novel mask-guided vision transformer (MG-ViT) to achieve an effective and efficient FSL on ViT model. The key idea is to apply a mask on image patches to screen out the task-irrelevant ones and to guide the ViT to focus on task-relevant and discriminative patches during FSL. Particularly, MG-ViT only introduces an additional mask operation and a residual connection, enabling the inheritance of parameters from pre-trained ViT without any other cost. To optimally select representative few-shot samples, we also include an active learning based sample selection method to further improve the generalizability of MG-ViT based FSL. We evaluate the proposed MG-ViT on both Agri-ImageNet classification task and ACFR apple detection task with gradient-weighted class activation mapping (Grad-CAM) as the mask. The experimental results show that the MG-ViT model significantly improves the performance when compared with general fine-tuning based ViT models, providing novel insights and a concrete approach towards generalizing data-intensive and large-scale deep learning models for FSL.
研究动机与目标
- 为解决标准微调在数据密集型视觉变换器(ViT)中进行少样本学习(FSL)时知识泛化效率低下的问题。
- 通过引入一种可抑制无关背景内容的掩码操作,引导ViT在少样本学习过程中聚焦于与任务相关且具有判别性的图像补丁。
- 通过在首个和最后一个编码器层之间引入残差连接,保留因掩码而丢失的全局空间和位置信息。
- 通过整合基于主动学习的样本选择方法,识别代表性少样本样本,提升模型泛化能力。
- 在低数据环境下,验证MG-ViT在多样化下游任务(包括图像分类和目标检测)中的有效性。
提出的方法
- 利用基于Grad-CAM的显著性图,从源数据集中识别出最具判别性和与任务相关联的图像补丁。
- 在首个ViT编码器层之前应用可学习掩码,抑制非相关补丁,使模型在少样本学习过程中聚焦于高显著性区域。
- 在首个和最后一个ViT编码器层之间引入残差连接,以保留因掩码而丢失的全局空间和位置上下文信息。
- 采用两阶段训练方案:先在基础数据集上使用标准ViT进行预训练,然后在基础类和新类上使用MG-ViT进行微调。
- 引入基于聚类的主动学习方法,选择代表性少样本样本,提升模型在未标注数据上的泛化能力和性能。
- 使用离散和连续掩码形状,探索不同任务中全局语义(离散)与目标轮廓精度(连续)之间的权衡。
实验结果
研究问题
- RQ1通过聚焦于与任务相关且具有判别性的图像补丁,基于补丁级别的掩码操作是否能提升视觉变换器在少样本学习中的性能?
- RQ2当因掩码导致部分全局空间信息丢失时,编码器层之间的残差连接对性能有何影响?
- RQ3与随机采样相比,基于主动学习的样本选择是否能带来更好的少样本学习泛化性能?
- RQ4不同类型的掩码(离散与连续)在图像分类与目标检测任务中的性能表现有何差异?
- RQ5MG-ViT是否能在无需额外预训练或架构大幅修改的情况下,有效泛化至多样化的下游任务,如图像分类和目标检测?
主要发现
- 在5-shot目标检测中,MG-ViT相比标准微调性能提升2.7%(50.6% vs. 47.9%),在10-shot中提升9.1%(65.3% vs. 56.2%),在30-shot中提升1.1%(76.0% vs. 74.9%)。
- 在图像分类任务中,MG-ViT在1-shot时达到85.6%的准确率,5-shot时为98.1%,10-shot时为98.5%,相比标准微调最高提升1.9%。
- 基于主动学习的样本选择使10-shot图像分类准确率提升1.9%(从96.6%提升至98.5%),10-shot目标检测mAP提升9.0%(从56.3%提升至65.3%)。
- 邻域样本识别使5-shot图像分类准确率提升7.4%(从90.4%提升至97.8%),30-shot目标检测mAP提升2.4%(从72.9%提升至75.3%)。
- 离散掩码在图像分类中表现更优(5-shot时准确率达98.7%),而连续掩码在目标检测中表现更优(10-shot时mAP达65.3%),表明掩码设计应根据任务特性进行优化。
- 掩码引导、残差连接与主动学习的结合,使MG-ViT能够继承预训练ViT权重,无需额外预训练,仅通过最小的架构修改即实现最先进性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。