decision-based adversarial attacks_reliable attacks against black-box machine learning models

Decision-based adversarial attacks: Reliable attacks against black-box machine learning models

Decision-based adversarial attacks: Reliable attacks against black-box machine learning models

本文提出了一种boundary-based的攻击方法,本方法不需要模型的梯度信息或score信息,因此可进行白盒和黑盒攻击。本方法还攻破了防御蒸馏(defensive distillation),顺便对一大类通过隐藏梯度的防御方法判了死刑。

1. Introduction

首先比较了目前方法的优缺点:

Motivations

本文提出的原因:

  • score-based方法相比,decision-based攻击方法与真实世界相关性更强(where confidence scores or logits are rarely accessible. );
  • decision-based攻击方法相较于其它防御方法具有更加鲁棒的潜力;
  • transfer-based方法相比,decision-based方法需要的信息更少。

本文的工作及限定:

image-20201031233957106

  • 本文考虑的对抗场景:攻击者目的是要通过对抗样本统计改变模型的边界(目标/无目标),
  • 攻击者可以观察得到模型的最终决策,并且知道至少一个扰动(无论扰动多大)大扰动的的对抗样本。
Contributions
  • 强调了decision-based的攻击方法是非常重要的,且和真实世界更加的紧密相关,对于估量模型的鲁棒性是一个很重的方法;
  • 第一次提出了一种高效的decision-based的方法,可适用于不同复杂机器学习模型和数据集。边界攻击包括:1. 概念上非常简单的;2. 非常灵活的;3. 需要少量的超参调整;4. 可与最好的gradient-based攻击方法相媲美;
  • 提出的Boundary-attack可以打破之前建议的防御方法(防御蒸馏);
  • 展示了本方法在两个黑盒攻击下的实际应用效果。

2. boundary attack

总结:

  • Direct attacks that solely rely on the final decision pf the model;
  • Starts from a large adversarial perturbation and then seeks to reduce the perturbation while staying adversarial.

image-20201101094416057

在游走的时候,落入边界内的都是能正确分类的,然后即使这样在边界上也能找到一个距离original image最近的点。

image-20201101093723874

算法流程:

输入:原始图片+对抗扰动准则,模型的决策

输出:满足条件最小的对抗样本

  • 选择一个对抗样本作为初始点(start from a point that is already adversarial);
  • 然后进行随机游走(random walk),一方面要使得图片仍然是对抗样本;另一方面和原始图片的“distance”不能太远

执行完每一迭代步后:

  • Be an image([0, 255]);
  • don’t change too much;
  • be closer to original.

如何更新下一步的扰动(对抗图片)本质上是在对抗/非对抗边界上进行拒绝采样。

2.1 如何选择初始点

Boundary attack需要起始点就是对抗样本,因此如何选择初始点是个问题。

  • 在无目标攻击中,从一个可行域(是图片,[0, 255])中通过最大化化交叉分布抽样得到原始图片;
  • CV中,因为图片约束在[0,255],因此直接从[0,255]中均匀抽样得到初始点。(拒绝不是对抗样本的图片)
  • 对于目标攻击,直接选择被分类为目标类别的图片。
2.2 Proposal distribution

proposal distribution的选择决定了算法的效率,即如何选择游走方向。最佳的proposal distribution同样应该取决于要攻击的区域或模型,但是对于vision-related的问题,下面简单的分布就能满足要求:

image-20201101094620169

即扰动样本是图片;扰动不能太大;下一次游走的方向应该是要减小和原图片的distance。( d d d是根据模型的输出来决定的,如何决定?)

实际中选择的分布是一种更简单的启发式分布:

  • 首先,从标准高斯分布中抽样: η i k ∼ N ( 0 , 1 ) \eta_i^k \sim \mathcal{N}(0,1) ηikN(0,1),然后再对其进行rescaleclip,使得其满足上面的(1)、(2);
  • 第二步,将扰动 η k \eta^k ηk投影到一个以原始图片为中心的超球上,并满足: d ( o , o ~ k − 1 + η k ) = d ( o , o ~ k − 1 ) d\left(o, \tilde{o}^{k-1}+\eta^{k}\right)=d\left(o, \tilde{o}^{k-1}\right) d(o,o~k1+ηk)=d(o,o~k1),即分类仍然是错误的类别(对抗样本)。
  • 第三步,朝着原始图片移动一小步,使得(1)、(3)式满足。
2.3 Adversarial criterion

即如何判断一个被分类为对抗样本的图片是否是误分类。

一个可能的选择是模型预测的top-k误分类,或是某些置信度分数的top-k阈值中不包括原始的分类标签。

2.4 Hyper-parameter adjustment

image-20201101190629309

Boundary attack有两个相关的参数:

  • 最终的扰动大小 δ \delta δ
  • 朝着原始图片的步长 ϵ \epsilon ϵ

这两个参数都会随着边界的局部几何情况进行动态调整。方法受Trust Region method的启发。

一个点更新到下一个点的过程可分为两步,首先是在以原始图片为中心的超球上走一步,保证下一步得到的图片仍然是对抗样本,然后再朝着原始样本走一步。这两个步长都需要动态调整:

  • 首先是orthogonal step,这一步是在以原始图片为中心的超球上游走,是为了确定下一步游走的方向,以及这一步需要足够小。如上图所示,如果是对抗样本的概念大于50%,则增大步长;反之则减小步长。
  • 如果仍然是对抗样本,则再朝着原始图片走一小步。

3. Comparison with other attacks

首先对攻击成功率的评估指标定义两个一个metric
S A ( M ) = median ⁡ i ( 1 N ∥ η A , M ( o i ) ∥ 2 2 ) \mathcal{S}_{A}(M)=\operatorname{median}_{i}\left(\frac{1}{N}\left\|\boldsymbol{\eta}_{A, M}\left(\boldsymbol{o}_{i}\right)\right\|_{2}^{2}\right) SA(M)=mediani(N1ηA,M(oi)22)
式中, η A , M ( o i ) ∈ R N \eta_{A, M}\left(\boldsymbol{o}_{i}\right) \in \mathbb{R}^{N} ηA,M(oi)RN,表示的是攻击方法 A A A在模型 M M M下第 i i i-th样本上的扰动。 S A \mathcal S_A SA是最终的得分,定义为攻击方法 A A A下所有样本的 L 2 L_2 L2距离。

如下所示,gradient-basedTransfer-basedScore-based和本文提出的Boundary-based方法可分别进行目标/目标共攻击,本文仅比较gradient-based的三种方法,即FGSMDeepFoolC&W方法。

image-20201101203029482

3.1 Untargeted attack

image-20201101195729230

不同数据集得到的对抗样本和扰动

image-20201101195805111

上面的评价指标

image-20201101200005384

Boundary attack攻击作用过程示意,图片上面是需要调用模型的次数,下面是与原始图片的MSE

这样看来也有generative properties??

image-20201101202008142

  • 不同的初始图片,在扰动大小相同的情况下,最后得到的扰动情况也是相同的,即本方法的稳定性。
  • 与基于梯度方法相比,本方法不需要模型的详细信息,但是代价就是需要更多的迭代步才能收敛;
  • 不需要backward求解计算(不需要梯度)。
3.2 Targeted attack

image-20201101202555794

image-20201101203300710

4. The Importance of decision-based attacks to evaluate model robustness

Attack Defensive Distillation

image-20201101204530788

image-20201101204555754

  • 蒸馏模型对基于梯度的方法能有效防御(FGSM),但是对于Boundary Attack的方法无效(Defensive Distillation仍然是”隐藏“了梯度);
  • 对于本文提出的Boundary Attack可以攻破防御蒸馏,同时扰动变化的不大。一方面说明蒸馏防御并不能有效的提高模型的鲁棒性;另一方面也说明了Gradient Masking这一大类方法的失效。

5. Attacks on real-world applications

In many real-world machine learning applications the attacker has no access to the architecture or the training data but can only observe the final decision.

image-20201101205338559

攻击基于Clarifai的两个模型:一个是识别品牌的模型;一个是识别名人的模型。

6. Discussion & Outlook

  • 提出了Boundary Attack方法:decision-based black-box attack;
  • Pros:
    • 提出的方法可进行黑盒攻击,实用性很强,在真是物理世界中更有意义;
    • 不需要梯度等信息(没有模型的backward),因此基于”隐藏“梯度策略类方法并不能防御住本方法的攻击.
  • Cons:
    • 需要多次调用模型来达到收敛(forward);
    • 可能陷入局部极小值。

ion-based black-box attack;

  • Pros:
    • 提出的方法可进行黑盒攻击,实用性很强,在真是物理世界中更有意义;
    • 不需要梯度等信息(没有模型的backward),因此基于”隐藏“梯度策略类方法并不能防御住本方法的攻击.
  • Cons:
    • 需要多次调用模型来达到收敛(forward);
    • 可能陷入局部极小值。
  • 3
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Adversarial attacks are a major concern in the field of deep learning as they can cause misclassification and undermine the reliability of deep learning models. In recent years, researchers have proposed several techniques to improve the robustness of deep learning models against adversarial attacks. Here are some of the approaches: 1. Adversarial training: This involves generating adversarial examples during training and using them to augment the training data. This helps the model learn to be more robust to adversarial attacks. 2. Defensive distillation: This is a technique that involves training a second model to mimic the behavior of the original model. The second model is then used to make predictions, making it more difficult for an adversary to generate adversarial examples that can fool the model. 3. Feature squeezing: This involves converting the input data to a lower dimensionality, making it more difficult for an adversary to generate adversarial examples. 4. Gradient masking: This involves adding noise to the gradients during training to prevent an adversary from estimating the gradients accurately and generating adversarial examples. 5. Adversarial detection: This involves training a separate model to detect adversarial examples and reject them before they can be used to fool the main model. 6. Model compression: This involves reducing the complexity of the model, making it more difficult for an adversary to generate adversarial examples. In conclusion, improving the robustness of deep learning models against adversarial attacks is an active area of research. Researchers are continually developing new techniques and approaches to make deep learning models more resistant to adversarial attacks.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值