Learning Embedding Adaptation for Few-Shot Learning---- 论文阅读笔记

Abstract

  • 之前的方法:is task-agnostic: the embedding function is not learned optimally discriminative with respect to the unseen classes, where discerning among them is the target task.
  • 改进的地方:to adapt the embedding model to the target classification task, yielding embeddings that are task-specific and are discriminative.
  • 具体的做法:Transformer to transform the embeddings from task-agnostic to task-specific by focusing on relating instances from the test instances to the training instances in both seen and unseen classes.
    在测试和训练阶段,关注于测试样本和训练样本的相关性。

Introduction

  • The main idea is to discover transferable visual knowledge in the SEEN classes, which have ample labeled instances, and leverage it to construct the desired classifier. 总结了之前few-shot learning的核心一点是从SEEN类别中学习到可迁移的知识,将其迁移到最后所需要的理想分类器中。 ----- 引出一些metric learning的做法。
  • 指出,之前的metric learning方法有一个不太合理的假设,即对于每个任务,使用的是共同的embedding space. : Assuming a common embedding space implies that the discovered knowledge. 然而, Intuitively, each task uses a different set of discriminative features. , Thus, 已有的方法 first needs to be able to extract discerning features for either task at the same time,即时这个共同的features 被提取到了,由于任务的不同,对于猫和老虎有用的feature,对于猫和狗而言可能不那么相关或者是有噪音的。 缺少了“自适应”策略 from the SEEN classes to the UNSEEN ones

Related Work

  • Metric learning 的关键: The key assumption is that the embeddings capture all necessarily discriminative representations of data such that simple classifiers are sufficed, hence avoiding the danger of overfitting on a small number of labeled instances
  • 和之前的 “任务无关” 不同,本文提出的是“任务具体的”, 因此得到 的 embeddings 能更好的 对齐每个具体任务的判别性。

Method

3.1 Learning Embedding for Task-agnostic Few-Shot Learning
  • 两个公式,(1)对于标准的FSL训练阶段的问题设定:
    在这里插入图片描述
  • (2) 特别地,对于metric learning的方法:
    在这里插入图片描述
3.2 Adapting Embedding for Task-specific Few Shot Learning
3.2.1 Adapting Embedding for Task-specific Few Shot Learning
  • 和3.1相比, We argue that the embedding φx is not ideal. In particular,the embeddings do not necessarily highlight the most discriminative representation for a specific target task. 即,3.1的embeddings并没有对一个具体的任务,强调出其相应的最具判别力的部分。
  • 因此,提出了自适应的部分。
    在这里插入图片描述
    可以和(2)公式对比,输入的训练embenddings是经过transformers的。
3.2.2 Detail (Transformer as a Set Function for Adaptation)
  • 核心: we employ self-attention mechanism [31, 51] to transform each instance embedding with consideration to its contextual instances。 即将每个实例的嵌入向量,转化为其相应的上下文实例向量。

  • 这里的“自然解释”暂时不太懂:“premutation invariant” : Note that it naturally satisfies the desired properties of T because it outputs refined instance embeddings and is permutation invariant (这个词在后面实验部分的 T 结构介绍也出现,具体含义暂时未理解透……)

    • permutation invariant 应该是 排序不变性,指 输入顺序的改变不影响最终输出 的 结果。
  • Transformer 框架流程:

    • 输入有三个,Q , K , V.
    • Q: query point 实例的集合;
    • K: 也是实例的集合,其 embeddings已经被计算出来,保存在 V 集合中;
    • V:K 集合的 embeddings。
    • 输出:Q集合每一个query point 的 values。
    • 流程
      • 首先对实例进行线性映射:
        在这里插入图片描述
      • 计算 query point 相对于每个 key 对应 value 的 权重系数
        在这里插入图片描述
      • 进行加权求和,得到 qurey point 对应的 value:
        在这里插入图片描述
  • 关于 这些 集合 sets 的选择,论文里大致分了两类 : 1)来自训练集;2)来自训练集合测试集。

3.2.3 Contrastive Learning of Set Functions
  • 关于这个 contrastive learning,暂时还不没理解透彻,应该是度量学习的一种吧。 论文里提到这样设计的目的是:
    It is designed to make sure that instances
    embeddings after adaptation is similar to the same class neighbors and dissimilar to those from different classes.
    在 Transformer 之后,使用对比目标函数,使得 训练实例 离它相应的 类别中心 近, 远离不是 其它的 类别中心。
    具体做法,是在公式(1)的后面加入该对比目标:
    在这里插入图片描述
3.2.4 Implementation details
  • 网络结构有两大块, 1)四层卷积;2)ResNet。
  • 使用了 pre-training 策略。
  • 浅的 Transformer 有好的效果?? We empirically observed that the shallow transformer (with one set of projection and one stacked layer) gives the best overall performance

Experimental Setups

4.1 Main Results
  • 注意还用了 OfficeHome, 为了 验证在不同 domain 的性能。
  • 提到了之前 的验证 方式,在600个目标任务(每个类15个样本)上测试模型的效果,会有较大 的方差,提出,在1000个目标任务上测试结果。 仍然用了95置信度。
  • Baseline 基本上是 Matching Net 和 Prototype Net, 并在 logit 上利用了 尺度参数(temperature)。 用 PN 提取 embedding.
  • 关于 embedding adaptation functions T 的学习, 主要有一下几种,其区别在于 集合函数 set function的选择:
    • BILSTM
    • BILSTM* : 增加 测试 实例 进行 联合嵌入向量的自适应。
    • DEEPSETS : 用了一个 排序不变性的结构 DeepSets 作为 T。 Note : DeepSets将训练实例 聚合到了 一个 过去的集合向量中。 之后, 用MLP 将当前的 实例 和 过去的向量 一起作为输入,然后 输出 实例的嵌入向量。
    • DEEPSETS* :
  • 以预训练的 PN 作为 baseline。 BILSTM和DEEPSETS并不是一直有效,Transformer 确是。 论文再次提到原因为:
    Transformer naturally implements the permutation invariance set-to-set adaptation function。
4.2 Ablation Studies and Analysis
  • 分析一: 简单 分析验证 adaption 是否有效。
  • 研究 “Interpolation and Extrapolation of few-shot tasks” ?? 用 20-way 训练固定的embedding adaption 以及 用 5-way 训练。 最后用 N = {5,10,15,20}这样类别数的任务上测试。
    BILSTM 表现最差,论文解释原因可能为 它不是 序列不变的(permutation invariant) , 那么可能会 拟合到 实例之间的任意的相关性。
  • 可视化 分析了原因 (HOW), 让 support embeddings 远离 杂乱的 。
  • 增加层 和 heads ?? (Transformer 的复杂度研究)影响不大。
4.3 Extended Few-Shot Learning Tasks
  • Cross-Domain FSL。 需要模型识别到物体的 固有属性 而不是 外观 (即,当visual appearance 改变时); 需要 类比 识别。 ???
  • Transductive FSL。 测试样本 是 全部 同时 进来 ????
    是把 无标签的测试样本加入到 Transformer 结构中的 key 和 values中。 那因此,也把 测试样本的相关关系考虑进来。
  • Generalized FSL & Low-shot Learnin。 测试样本来自 SEEN 和 UNSEEN。

Discussion

  • 本文 提出, 用一个 训练任务 和 目标任务 共同的 embedding spcace,对于 目标任务 而言, 这个embedding space 是不够具有判别力度的,尤其是当样本量少的情况。
  • 自适应的 embedding space 能够 利用到 目标任务中 训练实例和测试实例 之间的相互关系。 从而可以得到更具判别力度的 实例表示。
  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值