(Introduction 第二段感觉写得不错,主要讲述了 CV 领域利用 taxonomic hierarchy tree 提升模型性能的历史,包括它的重要性以及当前被忽略的原因)
为了将 class relationships H \mathcal H H 引入损失函数,作者总结了当前主流的三种方法以及相关工作,并分别提出了一种新的 Hierarchical loss 和 Label-embedding method:
其中
λ
(
C
(
l
)
)
=
exp
(
−
α
h
(
C
)
)
\lambda(C^{(l)})= \exp(−αh(C))
λ(C(l))=exp(−αh(C)) 为层次标签树上
C
(
l
+
1
)
→
C
(
l
)
C^{(l+1)}\rightarrow C^{(l)}
C(l+1)→C(l) 的权重,
h
(
C
)
h(C)
h(C) 为
C
C
C 的高度 (根节点高度最低),因此
α
>
0
\alpha>0
α>0 越大,“generic” information 相对于 “fine-grained” information 就越重要,模型也就越倾向于 “make better mistakes” (不过是以牺牲一定的准确率为代价的)。条件概率可由下式得到
其中,
y
A
s
o
f
t
(
C
)
y_A^{soft}(C)
yAsoft(C) 表示类别
A
A
A 和类别
C
C
C 的相关程度,两个类别越接近,
y
A
s
o
f
t
(
C
)
y_A^{soft}(C)
yAsoft(C) 越大
其中,
d
(
A
,
C
)
d(A,C)
d(A,C) 为类别
A
,
C
A,C
A,C 间的距离 (两个类别的最低公共父类别的高度除以树高),
β
>
0
\beta>0
β>0 很大时,软标签与 one-hot label 近似,
β
>
0
\beta>0
β>0 很小时,软标签和均匀分布近似 (Between these extremes, greater probability mass is assigned to classes more closely related to the ground truth, with the magnitude of the difference controlled by
β
β
β.). 这种处理方式的效果应该和用 logit 进行知识蒸馏相类似,在知识蒸馏中软标签是 teacher 提供的,但在这里,软标签是由层次标签提供的
t i e r e d I m a g e N e t tieredImageNet tieredImageNet- H H H (Word-Net hierarchy of nouns) 和 i N a t u r a l i s t iNaturalist iNaturalist- H H H (biological taxonomy) 都是作者基于 ImageNet 和 iNaturalist19 重新构造的数据集

可以看到,Avg. hier. dist. @1 和 Top-1 error 总体上是正相关的 (当准确率很高时,Top-1 预测的类别基本都是正确的,此时 Avg. hier. dist. 也会很小),但 Avg. hier. dist. @
k
k
k (
k
>
1
k>1
k>1) 和 Top-1 error 总体上是负相关的,也就是说,大多数情况下,Making better mistakes 和更高的准确率在一定程度上是冲突的,make better mistakes 能让 Top-
k
k
k 预测里和目标类别相近的类别变多,但却会降低 Top-1 Acc. 作者提出的方法能通过调节超参更好地进行 trade-off,从而在尽量不损失 Top-1 Acc 的情况下降低 Avg. hier. dist. @
k
k
k
其中
d
d
d 为 embed 之间的距离。分类损失为真实类别的负对数似然:
我们想要上述 distortion 尽量小
设
α
k
,
l
=
d
(
π
k
,
π
l
)
/
D
[
k
,
l
]
\alpha_{k,l}=d(\pi_k,\pi_l)/D[k,l]
αk,l=d(πk,πl)/D[k,l],令上式对
s
s
s 的偏导为 0 可得

其中
y
n
,
z
n
y_n,z_n
yn,zn 分别为样本
n
n
n 的预测标签和真实标签

(2) 下面的实验证明模型对
λ
\lambda
λ 不是特别敏感,并且在 Distortion-Based Penalization 中添加所有类别 (包括叶结点类别的父类) 的约束有助于提高模型性能
Final Decision – Reject
AnonReviewer1 – (Rating: 4: Ok but not good enough - rejection)
AnonReviewer2 – (Rating: 4: Ok but not good enough - rejection)
AnonReviewer3 – (Rating: 6: Marginally above acceptance threshold)
AnonReviewer4 – (Rating: 4: Ok but not good enough - rejection)
其中,
K
K
K 为类别数,
C
C
C 为 symmetric class-relationship matrix,
C
i
,
j
C_{i,j}
Ci,j 代表 the height of the lowest common ancestor
L
C
A
(
y
i
,
y
j
)
LCA(y_i, y_j )
LCA(yi,yj) between classes
i
i
i and
j
j
j (
C
i
,
j
C_{i,j}
Ci,j 越小,则类别越相似). The height of a node is defined as the number of edges between the given node and the furthest leaf.
Proof


并且作者也发现,A better ranking of classes often comes with a significant trade-off with top-1 accuracy. 而 CRM 能在较少损失 top-1 performance 的情况下显著降低 average hierarchical distance@
k
k
k





其中
p
H
(
y
^
i
H
=
c
∣
x
i
;
W
H
)
=
g
c
H
(
f
ϕ
(
x
i
)
)
p^H(\hat y_i^H=c\mid x_i;W^H)=g^H_c(f_\phi(x_i))
pH(y^iH=c∣xi;WH)=gcH(fϕ(xi)) 为模型输出的样本属于类别
c
c
c 的概率,
y
^
i
h
\hat y_i^h
y^ih 为模型输出的样本
i
i
i 在
h
h
h 类别层级上的概率分布,
h
h
h 类别层级对应的类别集合为
C
h
\mathcal C^h
Ch
其中
A
A
A 为粗粒度层级
h
−
1
h-1
h−1 上的一个父类,
{
A
k
}
\{A_k\}
{Ak} (
1
≤
k
≤
∣
A
∣
1\leq k\leq |A|
1≤k≤∣A∣) 为细粒度层级
h
h
h 上
A
A
A 的子类
其中
p
i
h
p_i^h
pih 为粗粒度分类器预测结果,
p
^
i
h
\hat p_i^h
p^ih 为软标签,
m
−
1
2
(
p
i
h
+
p
^
i
h
)
m-\frac{1}{2}(p_i^h+\hat p_i^h)
m−21(pih+p^ih)
其中
H
=
[
k
,
H
−
1
]
\mathcal H=[k,H-1]
H=[k,H−1],
k
∈
[
1
,
H
−
1
]
k\in[1,H-1]
k∈[1,H−1] (i.e. Margin Loss 只在粗粒度层级上进行),
B
h
=
{
(
i
,
j
)
∣
y
i
h
≠
y
j
h
}
\mathcal B^h=\{(i,j)\mid y_i^h\neq y_j^h\}
Bh={(i,j)∣yih=yjh} 为层级
h
h
h 上标签不同的样本,
p
i
h
p^h_i
pih 为模型输出的层级
h
h
h 上样本
i
i
i 的类别概率分布
其中
C
h
\mathcal C^h
Ch 为层级
h
h
h 的类别集合,
w
c
h
w_c^h
wch 为粗粒度类别
c
c
c 对应的 normalized weight vector (i.e.,
∥
w
c
h
∥
2
=
1
\|w_c^h\|_2=1
∥wch∥2=1),
w
^
c
h
=
w
~
c
h
−
1
/
∥
w
~
c
h
−
1
∥
2
\hat w_c^{h}=\tilde w_c^{h-1}/\|\tilde w_c^{h-1}\|_2
w^ch=w~ch−1/∥w~ch−1∥2,
w
~
c
h
−
1
=
∑
k
∈
subclass
(
c
)
w
k
h
\tilde w_c^{h-1}=\sum_{k\in\text{subclass}(c)}w_{k}^h
w~ch−1=∑k∈subclass(c)wkh 为
c
c
c 的子类权重向量之和






