[论文笔记]UNDERSTANDING AND ENHANCING THE TRANSFERABILITY OF ADVERSARIAL EXAMPLES(archive)

UNDERSTANDING AND ENHANCING THE TRANSFERABILITY OF ADVERSARIAL EXAMPLES(archive)

  • 文章简介

    在本研究中,作者系统地研究了两类可能影响对抗性例子迁移能力的因素。

    一是研究模型相关因素:network architecture, model capacity, test accuracy。

    二是利用损失函数的局部光滑性设计对抗样本。

    并提出了一个有效的可以提高迁移性的攻击方法:variance-reduced attack,该方法的核心思想就是在计算梯度时同时考虑改点周围的其他点的梯度,最后取平均值作为最终的梯度更新方向。

    • DataSet: Cifar-10, ImageNet
    • 类型: 研究的是black-box场景下的迁移问题
    • Strength: 可以应用于任意基于梯度的方法,其核心是为了移除梯度的不稳定性从而更好地迁移到目标模型
  • Contribution

    • 我们用数值方法探讨了对抗性转移如何依赖于特定于模型的因素。首先,发现对抗性转移是不对称的(即从模型A生成的对抗性例子可以很容易地转移到模型B,并不意味着反过来也是自然的), 这说明基于决策边界相似性的解释是不充分的,因为相似性本身是一个对称量。 第二,在大多数情况下,muti-step攻击似乎比one-step攻击更有效(与Adversarial examples in the physical world矛盾)。最后,针对大模型和小模型,并且在测试集上都有不错的准确度时,由大模型生成的对抗样本具有更差的可迁移性,这说明大模型的鲁棒性更强
    • 研究了loss函数surface的性质,发现损失曲面的局部非光滑性损害了生成的对抗样本的可移植性。
    • 基于前面的研究,提出了一种简单但是相当有效的提高可迁移性的攻击方法,应用locally averaged gradient来生成对抗样本。由于局部平均具有平滑效应,抑制了损耗面的局部振荡
  • HOW MODEL-SPECIFIC FACTORS AFFECT TRANSFERABILITY

    • Architect

      通过IGSM和FGSM的攻击效果对比,我们无法说到底是muti-step攻击效果强还是one-step攻击效果强。

      可以发现对抗攻击在不同模型之前不存在对称性。比如IGSM从densenet121到vgg13_bn和vgg13_bn到densenet121攻击成功率是明显不对称,相差非常大。
    • Model Capacity and Test error

      横轴:测试集的Top-1 error

      纵轴:用于生产对抗样本的模型参数量(model capacity)

      标记值:迁移率

      从图中可以看到,生成的样本攻击性强的模型(标记值越大攻击能力越强)基本集中在左下角。所以说high-accuracy模型具有更强的攻击能力。而对于那些有比较高的Top-1 error或者model capacity大的(参数量多)的模型而言,他们的生成的对抗样本迁移性不强。另一个奇怪的现象就是通过深度网络产生的对抗样本反而具有更差的迁移性,不过值得一提的是,深度网络对对抗样本有更强的鲁棒性。
  • shattered gradients

    Shattered gradients的研究表明,即使模型在训练集上已经训练得很好了,但是模型的梯度仍然是非常noisy的。作者认为这种梯度的noise损害了对抗样本的迁移能力。下图中模型A和B都已经训练得很好了,他们的level sets应该是全局相似的。但是可以发现比如说A他的边界是不稳定的,也就是会出现梯度方向在很小一段距离内会出现震荡,这就破坏了模型的迁移性。但是通过smooth A的landspace,可以在一定程度上更加稳定的梯度方向,从而增加对抗样本的迁移能力。

于是作者提出了一个平滑landspace的方法,其建模过程如下:

最后的梯度方向是期望,也就达到了我们所想要的平滑目标。下图中作者选取 δ = 15 \delta=15 δ=15, 其中 m m m是随机的采样数, G A G_A GA通过取平均值的方法来代替期望(注意:这里对B是不进行平滑的,因为是black-box场景,无法获得目标模型的梯度信息),可以发现随着 m m m的增加,即越来越平滑,对应的余弦相似度也会增加,这说明这种方法是比较有效的。

作者进一步可视化了resnet34和densenet121的决策边界,这幅图还是需要解释一下,因为有点难懂。

横轴:表示resnet34的某一点的梯度方向 G A G_A GA(这是一个单位向量,在 m = 1000 m=1000 m=1000 δ = 15 \delta=15 δ=15条件下的采样平均值),横轴上的值可以理解为往这个方向前进的相对距离。

纵轴:对 G A G_A GA使用施密特正交化后的正交向量 h A h_A hA,同理该轴上的值也可以理解为往 h A h_A hA这个方向前进的相对距离。

必需强调的是,无论是 G ^ A \hat{G}_A G^A还是 h ^ A \hat{h}_A h^A都是对应于resnet34而言的

图上的每一个点可以理解为经过下面公式扰动后从高维空间映射到2维空间(这个2维空间其实是 G ^ A \hat{G}_A G^A h ^ A \hat{h}_A h^A张成的平面)的投影图,其中图上点的颜色代表在原高维空间中对应的类别:
c l i p ( x + u G ^ A + v h ^ A , 0 , 255 ) clip(x+u\hat{G}_A+v\hat{h}_A, 0, 255) clip(x+uG^A+vh^A,0,255)
可以发现对于resnet34,无论是 G ^ A \hat{G}_A G^A方向还是 h ^ A \hat{h}_A h^A方向,稍微移动一段距离就可以产生误分类。而densenet121在 h ^ A \hat{h}_A h^A方向鲁棒性更强, G ^ A \hat{G}_A G^A方向倒是不够鲁棒。这个结果也进一步地证明了local average gradient确实提取到了 g A g_A gA中的可迁移部分。(这里我的理解是,在 G ^ A \hat{G}_A G^A方向,两者的鲁棒性比较接近,这说明该在该方向上若我对原图 x x x进行轻微的扰动,能够在souce model上产生误分类,在targeted model上也能产生误分类的效果,这就说明了我们的方法确实提取到了能够满足迁移性的方向)

  • Method:

其中 G t G_t Gt是用一个mini-batch来近似 E ξ ∼ N ( 0 , δ 2 I ) [ ▽ J ( x + ξ ) ] \mathbb{E}_{\xi \sim \mathcal{N(0, \delta^2I)}}[\triangledown J(x+\xi)] EξN(0,δ2I)[J(x+ξ)],然后通过迭代的方法进行更新。

  • 性能
    从表中可以看出,variance-reduced gradient能够提高对抗样本的迁移能力。然而该方法从lenet迁移到resnet-20和densenet效果不是很明显。作者认为是lenet并不是一个比较强的模型,学到的信息有限。我觉得可能是因为模型不是特别深,所以他的决策边界并没有非常显著的震荡性,从而平滑效果有限。

    [Note]: 原文中还进行targeted、untargeted以及emsemble等对比分析,皆能表明本文的方法优越,这里就不在赘述。
    • test accuracy(Cifar-10):
      • lenet: 76.9%
      • resnet-20: 92.4%
      • densenet: 94.2%

此外,该方法可以整合到任意基于梯度的方法中去。其中m是代表的是momentum方法

通过对对抗样本进行Transform,来评价其鲁棒性(即进行Transform后还能成功攻击的能力),结果如下

可以发现本文提出的方法加入后,其鲁棒性总体上是增强的(图中应该是笔误应该是vr才对?)


如果觉得我有地方讲的不好的或者有错误的欢迎给我留言,谢谢大家阅读(点个赞我可是会很开心的哦)~

Good day! The cost of university tuition fees has been a topic of concern among students and parents alike. Some argue that the fees are too high, limiting access to higher education, while others believe that the cost is justified by the quality of education and facilities provided. In this article, we will examine the different perspectives surrounding university tuition fees and explore the impact they have on students. Firstly, it is important to acknowledge that higher education is a valuable investment. Research has shown that individuals with a university degree earn significantly more over their lifetime compared to those without. This is because university education equips students with new skills, knowledge and networks, enhancing their employability and career prospects. However, the rising cost of tuition fees is making it increasingly difficult for students from lower-income families to pursue a degree. This is because tuition fees may not only be a financial burden but can also discourage students psychologically and create extra stress. Furthermore, many students are forced to accumulate significant debt in order to pay for their education. This debt can leave them struggling financially for years after graduation, burdening them with the responsibility to pay back the borrowed amount. In some cases, students are forced to delay important milestones, such as buying a house or starting a family, due to this financial burden. In addition to the financial impact, the high cost of tuition fees can also have a psychological impact on students. It can create a sense of pressure to succeed academically in order to justify the cost of their education, potentially leading to burnout, stress and anxiety. It can also lead to a sense of resentment towards the university and the feeling that students are being taken advantage of. In conclusion, university tuition fees are a complicated issue with both positive and negative effects. While it is important to acknowledge the value of higher education, we must also address the rising cost of tuition fees and the impact it has on students. Whether it is by increasing government funding for education, providing more scholarships, or reducing operational costs, solutions must be found to ensure that access to higher education is available to all, regardless of their financial background. I hope this article was informative and useful to you. Good luck with your studies!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值