[arxiv 2020] Few-Shot Class-Incremental Learning via Feature Space Composition

    技术2022-08-09  97

    paper [1] CVPR 2020: Semantic Drift Compensation for Class-Incremental Learning [2] CVPR 2020: Few-Shot Class-Incremental Learning

    目录

    什么是小样本类别增量学习?动机嵌入网络

    什么是小样本类别增量学习?

    流程: 1)模型在大规模基础数据集 D ( 1 ) D^{(1)} D(1) 上训练 2)模型在不断增加的新数据集 D ( t ) ( t > 1 ) D^{(t)} (t>1) D(t)(t>1)上学习。 D ( t ) 与 D ( 1 ) D^{(t)}与D^{(1)} D(t)D(1)类别不重叠,且样本数量较少。要求模型学习新样本,同时不忘记旧样本

    关键两个难题: 1)对旧数据灾难性遗忘 2)对新数据过拟合

    动机

    增量学习过程中,base tasks 学习base knowledge,new tasks学习new (lifelong) knowledge。用两个组件base和life-long learning,分别保持旧知识和学习新知识。如图所示,Base Model学习旧知识,其参数保持不变。Model t(t>1)学习新知识,融合上一个模型的知识。

    session D ( t ) D^{(t)} D(t)表示第t个数据集的学习阶段。

    嵌入网络

    小样本类别增量学习的图像分类框架主要有两种,特征提取器+softmax分类器,特征提取器+NCM分类器。由于用softmax分类器的挑战性及面对长任务序列的困难性[1],本选择第二种框架。

    特征提取 特征提取网络使用嵌入网络。损失函数如下:

    L = L M L + L R (1) \mathcal{L} = \mathcal{L}_{ML} + \mathcal{L}_{R} \tag{1} L=LML+LR(1) 其中, L M L \mathcal{L}_{ML} LML度量损失, L R \mathcal{L}_{R} LR正则化项,用来保持旧知识。 L M L \mathcal{L}_{ML} LML一般是三元损失。度量损失拉近相似实例,推远不相似实例(一定距离 r r r)。

    L M L = max ⁡ ( 0 , d + − d − + r ) (2) \mathcal{L}_{ML} = \max(0, d_{+}-d_{-}+r) \tag{2} LML=max(0,d+d+r)(2) 其中, d + d_{+} d+ d − d_{-} d分别表示anchor x a x_a xa与正例 x p x_p xp、反例 x n x_n xn的欧氏距离, r r r是间隔。

    分类过程

    训练好嵌入网络之后,用NCM(nearest class mean)分类,定义如下:

    y ^ j = arg min ⁡ c ∈ ∪ i C ( i ) d i s ( z j , u c ) (3) \hat{y}_j = \argmin_{c \in \cup_i C^{(i)}} dis(z_j, u_c) \tag{3} y^j=ciC(i)argmindis(zj,uc)(3)

    C ( i ) 表 示 s e s s i o n D ( i ) 及 之 前 s e s s i o n 的 所 有 类 别 ? C^{(i)}表示session D^{(i)}及之前session的所有类别? C(i)sessionD(i)session

    d i s t ( ⋅ , ⋅ ) dist(\cdot, \cdot) dist(,)是一个距离度量(比如欧式距离)。 z j z_j zj是实例 x j x_j xj的嵌入表示。 u c u_c uc是类别 c c c的原型,用类别嵌入均值表示,定义如下:

    u c = 1 n c ∑ j [ y j = c ] ⋅ z j (4) u_c = \frac{1}{n_c} \sum_j [y_j = c] \cdot z_j \tag{4} uc=nc1j[yj=c]zj(4) 其中 [ y j = c ] [y_j = c] [yj=c]是指示函数。

    Processed: 0.016, SQL: 9