频域中的后门攻击论文笔记

文章一:Rethinking the Backdoor Attacks’ Triggers: A Frequency Perspective

文章贡献:

  • 在频域上对现有的 backdoor trigger 进行分析,发现常见 trigger 存在 high-frequency artifacts 的问题。
  • 对这些 artifacts 进行了详细的分析
  • 展示了在频域空间中检测 trigger 的有效性
  • 提出了一种方法,生成不具有 high-frequency artifacts 的 trigger ,并且对其的可检测性进行了分析

Frequency Artifacts

作者通过 type-II 2D-DCT 变换,将图片从空域转换到频域。

在这里插入图片描述

Analyzing Causes of High-Frequency Artifacts

  • Local Patching

    By the linearity of DCT, adding a trigger to an image is equivalent to adding the trigger’s frequency spectrum to the image’s spectrum.

  • Large-Size or Global Patching

    相邻像素之间相关性降低,触发器携带的高频信息

  • GAN-Generated Backdoor Data

    GAN中使用的上采样导致 high-frequency artifacts (引用文章

Frequency-Based Backdoor Data Detection

关于使用频域信息进行防御,未阅读。

Creating Smooth Triggers

  • 问题定义:

    min ⁡ δ Σ i L ( x i + δ , y tar  ; θ p ) + λ Ω ( δ ; g ) \min _{\delta} \Sigma_{i} L\left(x_{i}+\delta, y_{\text {tar }} ; \theta_{p}\right)+\lambda \Omega(\delta ; g) minδΣiL(xi+δ,ytar ;θp)+λΩ(δ;g),
    s.t. x i + δ ⏟ i = 1 , … , N ∈ [ 0 , 1 ] n \quad \underbrace{x_{i}+\delta}_{i=1, \ldots, N} \in[0,1]^{n} i=1,,N xi+δ[0,1]n,

    We adopt Ω ( ⋅ ; g ) \Omega(\cdot ; g) Ω(;g) from SmoothFool

    θ p = argmin ⁡ θ ( Σ i L ( x i , y i ; θ ) + Σ j L ( x j + δ , y t a r ; θ ) ) \theta_{p}=\operatorname{argmin}_{\theta}\left(\Sigma_{i} L\left(x_{i}, y_{i} ; \theta\right)+\Sigma_{j} L\left(x_{j}+\delta, y_{t a r} ; \theta\right)\right) θp=argminθ(ΣiL(xi,yi;θ)+ΣjL(xj+δ,ytar;θ))

    关于 trigger 的生成,文中采用了:每一次迭代后,将扰动通过低通滤波器再更新触发器。 (pdf)

  • 因此生成 trigger 的公式变为:

    min ⁡ r Σ i L ( x i p o i , y t a r ; θ p o i ) \min _{r} \Sigma_{i} L\left(x_{i}^{p o i}, y_{t a r} ; \theta_{p o i}\right) minrΣiL(xipoi,ytar;θpoi),
    s.t. r = δ ∗ g r=\delta * g r=δg,
    x i p o i = M ( x i + λ r ) ⏟ i = 1 , … , N \underbrace{x_{i}^{p o i}=M\left(x_{i}+\lambda r\right)}_{i=1, \ldots, N} i=1,,N xipoi=M(xi+λr),

    • 其中 r r r 为扰动与低通滤波器卷积后的结果。
    • M M M 代表标准化的过程,让 posion image 限制到 [0, 1]
    • 标准化可以更好地保持像素间的比例
  • 生成 trigger 的可视化

在这里插入图片描述

由图所示,High-Frequency Artifacts 减少了。

但是生成的 trigger 有点发绿,看起来效果一般般

文章二:Backdoor Attack through Frequency Domain

  • Backdoor Attack through Frequency Domain

在这里插入图片描述

五个步骤:

  1. color channel transform from RGB to YUV
  2. discrete cosine transform from spatial domain to frequency domain
  3. trigger generation in the frequency domain
  4. inverse discrete cosine transform from frequency domain to spatial domain
  5. color channel transform from YUV to RGB

FFT:

幅度谱(amplitude spectrum)与相位谱(phase spectrum)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值