This paper addresses the few-shot image classification problem. One notable limitation of few-shot learning is the variation in describing the same category, which might result in a significant difference between small labeled support and large unlabeled query sets. Our approach is to obtain a relation heatmap between the two sets in order to label the latter one in a transductive setting manner. This can be solved by using cross-attention with the scaled dot-product mechanism. However, the magnitude differences between two separate sets of embedding vectors may cause a significant impact on the output attention map and affect model performance. We tackle this problem by improving the attention mechanism with cosine similarity. Specifically, we develop FS-CT (Few-shot Cosine Transformer), a few-shot image classification method based on prototypical embedding and transformer-based framework. The proposed Cosine attention improves FS-CT performances significantly from nearly 5% to over 20% in accuracy compared to the baseline scaled dot-product attention in various scenarios on three few-shot datasets mini-ImageNet, CUB-200, and CIFAR-FS. Additionally, we enhance the prototypical embedding for categorical representation with learnable weights before feeding them to the attention module. Our proposed method FS-CT along with the Cosine attention is simple to implement and can be applied for a wide range of applications. Our codes are available at https://github.com/vinuni-vishc/Few-Shot-Cosine-Transformer
翻译:本文处理微小图像分类问题。 少镜头学习的一个显著限制是描述同一类别的差异,这可能导致小标签支持和大无标签查询组之间的巨大差异。 我们的做法是在两组之间获得一个关系热映射, 以便以转式设置方式给后一组贴上标签。 可以通过使用缩放点产品机制, 使用交叉关注来解决这个问题。 然而, 两组不同的嵌入矢量之间的巨大差异可能会对产出关注地图产生重大影响,并影响模型性能。 我们通过改进关注机制来解决这个问题,这可能会导致小型标签支持和大型无标签查询组之间的巨大差异。 具体而言,我们开发了FS-CT( Few-shot Cosine 变异器),这是基于原型嵌入和变异器框架的几组图像分类方法。 拟议的科尼注意使FS-CT的准确性能从近5%提高到20%以上。 在三种微镜头中, 微型- ImageNet、 CUB- 200 和 CIFAR-FS-FS 应用的注意机制。 我们用S- streal- redustrain 来学习常规的系统, 。 在常规系统上学习系统/可应用的系统模块, 。 我们的SIMFS- 系统- train- train- train- tremess- tremduction- trisal- tremess- to ta to ta to ta to ress