| 论文名称 | Clean-label Backdoor Attack against Deep Hashing based Retrieval |
|---|---|
| 作者 | Kuofeng Gao (Tsinghua University) |
| 出版社 | arxiv 2021 |
| 在线pdf | |
| 代码 | 无 |
简介:本文提出了首个针对 hashing 模型的 clean-label backdoor attack。生成 targeted adversarial patch 作为 trigger,生成 confusing perturbations 去阻碍模型的学习,让其学到更多 trigger 信息。其中 confusing perturbations 是难以察觉的。作者通过实验验证了该方法的有效性,例如使用40张 poison data 就可以使攻击成功。
背景:
针对 hashing retrieval 的 clean-label backdoor attack
文章的贡献:
deep hashing:
h = F ( x ) = sign ( f θ ( x ) ) \boldsymbol{h}=F(\boldsymbol{x})=\operatorname{sign}\left(f_{\boldsymbol{\theta}}(\boldsymbol{x})\right) h=F(x)=sign(fθ(x))
由于符号函数的梯度的梯度问题,可以使用 t a n h ( . ) tanh(.) tanh(.) 进行代替
F ′ ( x ) = tanh ( f θ ( x ) ) F^{\prime}(\boldsymbol{x})=\tanh \left(f_{\boldsymbol{\theta}}(\boldsymbol{x})\right) F′(x)=tanh(fθ(x))

论文在图片的左下角生成trigger:
injection function():
x ^ = B ( x , p ) = x ⊙ ( 1 − m ) + p ⊙ m \hat{\boldsymbol{x}}=B(\boldsymbol{x}, \boldsymbol{p})=\boldsymbol{x} \odot(\mathbf{1}-\boldsymbol{m})+\boldsymbol{p} \odot \boldsymbol{m} x^=B(x,p)=x⊙(1−m)+p⊙m
参考论文 DHTA 本文作者使用 DHTA 中生成 universal adversarial patch 的方法生成 trigger
min p ∑ ( x i , y i ) ∈ D d H ( F ′ ( B ( x i , p ) ) , h a ) \min _{\boldsymbol{p}} \sum_{\left(\boldsymbol{x}_{i}, \boldsymbol{y}_{i}\right) \in \boldsymbol{D}} d_{H}\left(F^{\prime}\left(B\left(\boldsymbol{x}_{i}, \boldsymbol{p}\right)\right), \boldsymbol{h}_{a}\right) minp∑(xi,yi)∈DdH(F′(B(xi,p)),ha)
D D D: training set
h a h_a ha anchor code
h a h_a ha anchor code 是一串能代表 target 类的哈希码 (由 DHTA 提出)
h a = arg min h ∈ { + 1 , − 1 } K ∑ ( x i , y i ) ∈ D ( t ) d H ( h , F ( x i ) ) \boldsymbol{h}_{a}=\arg \min _{\boldsymbol{h} \in\{+1,-1\}^{K}} \sum_{\left(\boldsymbol{x}_{i}, \boldsymbol{y}_{i}\right) \in \boldsymbol{D}^{(t)}} d_{H}\left(\boldsymbol{h}, F\left(\boldsymbol{x}_{i}\right)\right) ha=argminh∈{+1,−1}K∑(xi,yi)∈D(t)dH(h,F(xi))
p p p trigger
通过优化该目标函数,生成的 trigger ,模型会将其判断为 target 类
所有 poison data 都共用同一个 trigger
为了迫使模型更加关注 trigger ,本文提出了在 posion data 中加入 confusing perturbations
受到文章:(Yang et al. 2018) 的启发,作者发现这些 perturbations 可增大 original query image 之间的距离

如图所示,加入 perturbations 后,原本紧密的 yurt 类变得十分分散。
本文的作者通过在 target 类中加入 perturbations,使得模型在学习带有 trigger 的 target 类信息时,更多地学习到 trigger 信息
**目标函数:**
L
c
(
{
η
i
}
i
=
1
M
)
=
1
M
(
M
−
1
)
∑
i
=
1
M
∑
j
=
1
,
j
≠
i
M
d
H
(
F
′
(
x
i
+
η
i
)
,
F
′
(
x
j
+
η
j
)
)
The overall objective function of generating the confusing perturbations is formulated as
max
{
η
i
}
i
=
1
M
λ
⋅
L
c
(
{
η
i
}
i
M
)
+
(
1
−
λ
)
⋅
1
M
∑
i
=
1
M
L
a
(
η
i
)
\max _{\left\{\boldsymbol{\eta}_{i}\right\}_{i=1}^{M}} \lambda \cdot L_{c}\left(\left\{\boldsymbol{\eta}_{i}\right\}_{i}^{M}\right)+(1-\lambda) \cdot \frac{1}{M} \sum_{i=1}^{M} L_{a}\left(\boldsymbol{\eta}_{i}\right)
max{ηi}i=1Mλ⋅Lc({ηi}iM)+(1−λ)⋅M1∑i=1MLa(ηi)
s.t.
∥
η
i
∥
∞
≤
ϵ
,
i
=
1
,
2
,
…
,
M
\left\|\boldsymbol{\eta}_{i}\right\|_{\infty} \leq \epsilon, i=1,2, \ldots, M
∥ηi∥∞≤ϵ,i=1,2,…,M
Datasets and Target Models.
| 数据集 | train | query | database | class |
|---|---|---|---|---|
| ImageNet | 100*100(from database) | 50*100 | 1300*100 | 100 |
| MS-COCO | 10000 | 5000 | 117218 | 80 |
| Places365 | 9000 | 3600 | 36000 | 36 |
hashing target models 的设置:使用预训练好的分类网络,进行 fine-tune 。再将分类网络最后一层换为 hashing layer 然后微调。
具体网络结构有:
训练过程的具体描述在文章 Appendix B 中
除了最基本的 hashing 模型,文中还对 HashNet 和 DCH 进行了测试
选择了5类作为target label
poisoned images is 60 on all datasets
对比实验的设置:
Tri:加入了trigger
Tri+Noise:加入了trigger和均匀分布的噪声
Tri+Adv:加入了 trigger 和 adversarial perturbations
t-map:We calculate the t-MAP on top 1,000 retrieved images on all datasets.
证明了文中方法的有效性

分别对 HashNet 和 DCH 进行了实验的验证
验证攻击模型在面对防御时的效果
使用不同的模型(VGG,resnet)验证攻击方法的迁移能力
两种实验设置:
从实验结果来看,迁移的能力并不强
证明每个函数的作用
作者在附录做的关于trigger的实验
实验结果:

其中 ϵ \epsilon ϵ为perturbation magnitude, β \beta β 为trigger 的 blend ratio。 β \beta β 控制trigger的隐匿性, β \beta β 值越小,trigger越隐秘。
可以由实验看到,trigger的能见度越小,攻击的效率越差