CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读

#论文笔记#

1. 论文信息

论文名称 CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets
作者 Bingyin Zhao (Clemson University)克莱姆森大学
出版社 AAAI 2022
pdf 在线pdf ​
代码

clean label 的 availability attack,通过 triplet loss 训练 generator,使其生成和 natural poisoned data 特征相似的加毒数据

2. introduction

2.1 背景

  • 机器学模型中攻击的类别 (本文的分类,有些文章的定义和本文不同)

    1. Evasion Attacks(逃逸攻击)

      1. 对抗样本:对抗样本属于一种典型的逃逸攻击。是指攻击者在不改变目标机器学习系统的情况下,通过构造特定输入样本以完成欺骗目标系统的攻击。
    2. Backdoor Attacks(后门攻击):后门攻击是指当且仅当输人为触发样本(trigger)时,模型才会产生特定的隐藏行为;否则,模型工作表现保持正常。

    3. Poisoning Attacks(数据中毒攻击):在训练数据集中注入恶意数据来操纵模型的行为

      1. Availability Attacks(可用性攻击):破坏模型整体的准确性,使模型整体的准确率降低。
      2. Integrity Attacks(完整性攻击):影响特定实例的预测结果
  • 不同攻击方式的目标和能力:
    CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第1张图片
    Availability Attacks 更难做到,因为其需要改变模型的决策边界,而不仅仅是针对特定实例的恶意行为

  • Availability Attacks(可用性攻击)的危害:

    • 使用中毒的数据进训练会浪费训练者的大量时间和资源,并且训练出的模型无法取得好的效果。训练时模型正常,测试时模型异常。
  • 威胁模型

    • 白盒攻击:攻击者可以访问数据集,算法和模型参数
    • 黑盒攻击:只知道训练数据(本文的设置)

2.2 存在的问题

早期的 Availability Attacks:

  • 在样本上加很大的noise生成中毒数据
  • 分配不正确的标签

上述做法容易被检测出来。在 Integrity Attacks 和 backdoor Attacks 已经有了许多关于 clean-label 的研究,但在 Availability Attacks 几乎没有

2.3 文章的贡献

本文的idea和贡献:

  • 作者通过观察现存的分类器发现,尽管深度神经网络已经取得了很好的效果,但是仍然有一些样本被预测错误。作者称这类样本为 natural poisoned data。通过在数据集中加入不同比例的 natural poisoned data 发现,natural poisoned data 占比越高模型的准确率越低。因此作者提出使用 GAN 的方法去生成和 natural poisoned data 相似的图像作为 poison data
  • 相比于以往基于优化的方法,使用 GAN 的模型避免了困难和昂贵的优化步骤
  • 由 natural poisoned data 启发,生成的 poison data 的 clean-label 的以及难以察觉的,对比以往的方法更容易躲过防御机制

3. method

  • 优化目标:

    arg ⁡ max ⁡ D p ∑ ( x , y ) ∼ D ^ L ( x , y , θ p ) \underset{\mathcal{D}_{p}}{\arg \max } \sum_{(x, y) \sim \hat{\mathcal{D}}} \mathcal{L}\left(x, y, \theta_{p}\right) Dpargmax(x,y)D^L(x,y,θp)

    s.t. θ p ∈ arg ⁡ min ⁡ θ p ∈ Θ ∑ ( x , y ) ∼ D t r ∪ D p L ( x , y , θ ) \theta_{p} \in \underset{\theta_{p} \in \Theta}{\arg \min } \sum_{(x, y) \sim \mathcal{D}_{t r} \cup \mathcal{D}_{p}} \mathcal{L}(x, y, \theta) θpθpΘargmin(x,y)DtrDpL(x,y,θ),

    • D t r D_{t r} Dtr is the training data
    • D p D_{p} Dp is the crafted poisoned data
    • D ^ \hat{D} D^ is the untainted test dataset
    • 使用 poison data 训练出模型,该模型在测试数据上无法取得好的效果
  • 本文的方法:

    • 目标:使用 GAN 去生成一些图片。“Our objective is to generate images with similar characteristics as “natural poisoned data”, particularly those locate in the overlapped area of multiple categories in the representation space.”

    • CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第2张图片

    • phase I

      在干净的训练数据上训练一个 conditional GAN (条件生成网络 CGAN),目标是为了使 GAN 模型可以通过 label 信息来产生一些训练数据。训练 GAN 的过程中包括了 G G G D D D D D D 为鉴别器,用于区分真伪图像。

      min ⁡ G max ⁡ D V ( D , G ) = L ( D ) + L ( G )  s.t.  L ( D ) = E x ∼ p x ( x ) [ log ⁡ D ( x ∣ y ) ] L ( G ) = E z ∼ p z ( z ) [ log ⁡ ( 1 − D ( G ( z ∣ y ) ) ) ] \begin{array}{rl}\min _{\mathcal{G}} \max _{\mathcal{D}} & \mathcal{V}(\mathcal{D}, \mathcal{G})=\mathcal{L}(\mathcal{D})+\mathcal{L}(\mathcal{G}) \\ \text { s.t. } & \mathcal{L}(\mathcal{D})=E_{\mathbf{x} \sim p_{x}(\mathbf{x})}[\log \mathcal{D}(\mathbf{x} \mid \mathbf{y})] \\ & \mathcal{L}(\mathcal{G})=E_{\mathbf{z} \sim p_{z}(\mathbf{z})}[\log (1-\mathcal{D}(\mathcal{G}(\mathbf{z} \mid \mathbf{y})))]\end{array} minGmaxD s.t. V(D,G)=L(D)+L(G)L(D)=Expx(x)[logD(xy)]L(G)=Ezpz(z)[log(1D(G(zy)))]

      生成器的结构采用 BigGAN 的结构

    • phase II

      • 目的:指导 phase I 训练好的生成器去学习 poisoned data 的分布。

      • 首先在训练数据上训练一个分类器 C C C,使用该分类器的特征作为 Embedding R R R
        在这里插入图片描述

      • 构建 triplet loss 训练生成器

        • 目的:希望生成器生成的图像位于表示空间中的 “overlapped area”,同时 have features of both positive and negative

        • 损失函数:

          ∣ d 1 − d 2 ∣ < α  s.t.  d 1 = ∥ R ( x ) − R n e g ∥ 2 , d 2 = ∥ R ( x ) − R pos  ∥ 2 \begin{aligned}\left|d_{1}-d_{2}\right| &<\alpha \\ \text { s.t. } d_{1} &=\left\|\mathcal{R}(\mathbf{x})-R_{n e g}\right\|_{2}, \\ d_{2} &=\left\|\mathcal{R}(\mathbf{x})-R_{\text {pos }}\right\|_{2} \end{aligned} d1d2 s.t. d1d2<α=R(x)Rneg2,=R(x)Rpos 2

          • 常见的 triplet loss 一般为 L = max ⁡ ( d ( a , p ) − d ( a , n ) + margin ⁡ , 0 ) L=\max (d(a, p)-d(a, n)+\operatorname{margin}, 0) L=max(d(a,p)d(a,n)+margin,0),优化的目标是 d ( a , p ) + margin ⁡ < d ( a , n ) d(a, p)+\operatorname{margin}d(a,p)+margin<d(a,n)
          • 这里的 triplet loss 目标是使 d ( a , n ) − d ( a , p ) < margin ⁡ d(a, n) - d(a, p) < \operatorname{margin} d(a,n)d(a,p)<margin,目的是让 anchor 能位于 positive 和 negative 之间
        • positive 和 negative 的选择

          • positive:分类器 C C C 预测正确的 image
          • negative:分类器 C C C 预测错误最多的哪一类中的 image
          • 具体的选取步骤
            CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第3张图片 * loss function L ( G , R ) = 1 N ∑ i N ( ∣ d 1 − d 2 ∣ − α ) \mathcal{L}(\mathcal{G}, \mathcal{R})=\frac{1}{N} \sum_{i}^{N}\left(\left|d_{1}-d_{2}\right|-\alpha\right) L(G,R)=N1iN(d1d2α) min ⁡ G , R max ⁡ D V ( D , G ) + L ( G , R ) \min _{\mathcal{G}, \mathcal{R}} \max _{\mathcal{D}} \mathcal{V}(\mathcal{D}, \mathcal{G})+\mathcal{L}(\mathcal{G}, \mathcal{R}) minG,RmaxDV(D,G)+L(G,R)

          同时优化 GAN 的损失和 triplet loss

    • 算法的具体流程

      流程图太长,具体看论文中的流程图 “Algorithm 1: Poisoned Data Generation”

    • 两段训练的意义

      1. 通过解耦的两段训练过程,减少阶段二对阶段一的影响,让生成器生成高质量的图片
      2. 通过使用 GAN 的能力可以在不知道受害者分类器的情况下生成无限量的数据集
      3. 第二阶段训练所需要的迭代次数要比第一阶段的少得多。可以将第二阶段方法应用在其他训练好的生成模型上,增加生成有毒数据的效率

4. experiments

数据集一
CIFAR-10

数据集二
ImageNet

cifar10 上的实验效果

  • 将全部数据换为 posion data 准确率平均下降了 55.22% 左右
    CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第4张图片

  • 比起方法 Metapoison,CLPA 攻击后的模型的准确率下降幅度更大CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第5张图片

  • 视觉质量CLPA: Clean-Label Poisoning Availability Attacks Using Generative Adversarial Nets 论文阅读_第6张图片

你可能感兴趣的:(AI安全,论文阅读)