Skip to main content
QUICK REVIEW

[论文解读] Semantic Prompt for Few-Shot Image Recognition

Wentao Chen, Chenyang Si|arXiv (Cornell University)|Mar 24, 2023
Domain Adaptation and Few-Shot LearningComputer Science被引用 9
一句话总结

引入 Semantic Prompt(SP)以自适应地调优用于少样本图像识别的视觉特征提取器,利用来自类别名称的文本提示,在四个基准数据集上相对于基线取得提升。

ABSTRACT

Few-shot learning is a challenging problem since only a few examples are provided to recognize a new class. Several recent studies exploit additional semantic information, e.g. text embeddings of class names, to address the issue of rare samples through combining semantic prototypes with visual prototypes. However, these methods still suffer from the spurious visual features learned from the rare support samples, resulting in limited benefits. In this paper, we propose a novel Semantic Prompt (SP) approach for few-shot learning. Instead of the naive exploitation of semantic information for remedying classifiers, we explore leveraging semantic information as prompts to tune the visual feature extraction network adaptively. Specifically, we design two complementary mechanisms to insert semantic prompts into the feature extractor: one is to enable the interaction between semantic prompts and patch embeddings along the spatial dimension via self-attention, another is to supplement visual features with the transformed semantic prompts along the channel dimension. By combining these two mechanisms, the feature extractor presents a better ability to attend to the class-specific features and obtains more generalized image representations with merely a few support samples. Through extensive experiments on four datasets, the proposed approach achieves promising results, improving the 1-shot learning accuracy by 3.67% on average.

研究动机与目标

  • 通过动机利用语义信息来提升少样本学习中的特征提取。
  • 开发一种将语义提示注入到视觉特征提取器中,并在空间和通道维度上进行处理的方法。
  • 展示语义提示在有限支撑数据下提升新颖类别的泛化能力。

提出的方法

  • 在基础类别上对基于 Vision Transformer 的特征提取器进行带线性头的预训练。
  • 使用预训练的语言/文本编码器(例如 CLIP、SBERT、GloVe)从类别名称提取语义特征。
  • 通过两种机制将语义提示融入特征提取器:通过扩展补丁序列并加入语义令牌并通过 Transformer 自注意力进行处理来实现空间交互;通过将语义提示与视觉上下文拼接并用基于 MLP 的 beta 向量调制特征来实现通道交互。
  • 使用以语义提示为条件的特征来计算类别原型,并通过一个元学习目标进行优化,使查询特征与原型之间的余弦相似度最大化。
  • 在四个数据集(mini ImageNet、tiered ImageNet、CIFAR-FS、FC100)上进行1-shot和5-shot设置的评估,默认文本编码器使用基于 CLIP 的提示。

实验结果

研究问题

  • RQ1语义信息(来自类别名称,作为提示)是否能提升少样本学习中视觉特征的判别质量?
  • RQ2空间和通道层面的语义提示交互是否相互补充以增强对新颖类别的泛化能力?
  • RQ3提示放置在哪些层次以及骨干网络的选择对少样本性能有何影响?
  • RQ4不同文本编码器(CLIP、SBERT、GloVe)在1-shot和5-shot情景下对 SP 的影响有多大?

主要发现

  • SP 在四个基准数据集上将1-shot准确率平均提升3.67%。
  • 空间交互(SI)和通道交互(CI)均贡献显著提升;将两者结合可获得最佳结果。
  • 在1-shot设置中,基于 CLIP 的文本提示通常优于 SBERT 与 GloVe 提示。
  • 使用 Visformer 作为骨干网络并配合 SP,在 mini ImageNet 和 tiered ImageNet 上显著优于若干基线和先前的语义方法。
  • 在更高层放置提示更易获得较好结果;layer3-2 放置在跨数据集上效果显著。
  • 对特征在补丁上的平均池化(相对于仅在提示位置的池化)对性能稳定性具有重要作用。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。