当前位置:网站首页>C&W(Carlini & Wagner)
C&W(Carlini & Wagner)
2022-07-16 04:59:00 【swpu_jx_1998】
C&W(Carlini & Wagner)
Carlini and Wagner引入了一系列攻击来寻找最小化不同相似性度量的对抗扰动: L 0 , L 2 , L ∞ L_0, L_2, L_{\infin} L0,L2,L∞。核心观点是将类似于BFGS攻击的一般约束优化策略转化为无约束优化公式中经验选择的损失函数:
L C W ( x ′ , t ) = max ( max i ≠ t { Z ( x ′ ) ( i ) } − Z ( x ′ ) ( t ) , − k ) \mathcal{L}_{CW}(x^{\prime},t) = \max(\max_{i\not=t}\{Z(x^{\prime})_{(i)}\} - Z(x^{\prime})_{(t)}, -k) LCW(x′,t)=max(i=tmax{ Z(x′)(i)}−Z(x′)(t),−k)
其中 Z ( x ( i ) ′ ) Z(x^{\prime}_{(i)}) Z(x(i)′) 表示分类器logits向量的第 i i i 个分量, t t t 表示目标标签,而 k k k 表示反映对样本的最小期望置信度的参数。
从概念上讲,这个损失函数最小化了 t t t 类和第二大类之间的logit值的距离。如果 t t t 当前具有最高的logit值,则logit的差值将为负,因此当 t t t和第二类之间的logit差值超过阈值 k k k 时,优化将停止。如果 t t t不具有最高logit值,则最小化 L ( x 0 , t ) L ( x_0 , t ) L(x0,t) 使得和目标类别的logit之间的差距更接近,即,降低最高类别预测置信度和/或增加目标类别置信度。
此外, κ κ κ 参数建立了最佳情况下的停止准则,其中对抗类的logit至少比第二大类的logit要大。因此, κ κ κ 明确地为目标对手编码了最小期望的鲁棒性程度。 L 2 L_2 L2 的 C & W C \& W C&W 攻击公式如下所示:
arg min w ( ∥ x ′ ( w ) − x ∥ 2 + c ⋅ L C W ( x ′ ( w ) , t ) ) x ′ ( w ) = 1 2 ( tanh ( w ) + 1 ) \argmin_w(\|x^{\prime}(w)-x\|_2 + c\cdot \mathcal{L}_{CW}(x^{\prime}(w),t))\\ x^{\prime}(w) = \frac{1}{2}(\tanh(w) + 1) wargmin(∥x′(w)−x∥2+c⋅LCW(x′(w),t))x′(w)=21(tanh(w)+1)
其中 w w w 是样本变量,例如 x ′ = 1 2 ( tanh ( w ) + 1 ) x^{\prime}=\frac{1}{2}(\tanh (w)+1) x′=21(tanh(w)+1),这样可以使得样本 x ′ x^{\prime} x′ 控制在区间 [ 0 , 1 ] [0,1] [0,1] 之间。超参数 c c c 的最小值通过外部优化循环程序来选择。 L 0 & W L_0\&W L0&W攻击比 L 2 L_2 L2变体复杂得多,因为它的相关距离度量是不可微分的。作者提出了一种迭代策略来连续地消除不重要的输入特征,从而可以通过扰动尽可能少的输入特征来实现明模型误分类。在初始化期间,一个允许的集合 S S S被定义为包括 x x x中的所有输入特征。接下来,在每次迭代时,在仅扰动 S S S中的特征的约束下,执行 L 2 L_2 L2攻击。
如果攻击成功,则识别下一个非重要特征 i i i并从 S S S集合中被移除,其中 i ∗ = arg min i g ( i ) ⋅ r ( i ) , g = ∇ x ′ L C W ( x ′ , t ) i^*=\argmin_i g_{(i)} \cdot r_{(i)},g=\nabla_{x^\prime} \mathcal{L}_{C W}\left(x^{\prime}, t\right) i∗=argminig(i)⋅r(i),g=∇x′LCW(x′,t) ,并且有 r = x ′ − x r=x^{\prime}-x r=x′−x。
类似于 L 0 L_0 L0的 C & W C\&W C&W攻击, L ∞ L_{\infty} L∞攻击变体也需要迭代算法,因为 L ∞ L_{\infty} L∞ 度量不是完全可微的。其优化目标如下:
arg min r ( c ⋅ L C W ( x + r , t ) + ∑ i max ( 0 , r ( i ) − η ) ) \argmin_{r}(c \cdot \mathcal{L}_{CW}(x+r,t) + \sum_{i}\max(0,r(i) - \eta)) rargmin(c⋅LCW(x+r,t)+i∑max(0,r(i)−η))
其中参数 κ \kappa κ被初始化为1,如果 r ( i ) < κ r_{(i)}< \kappa r(i)<κ,则每次迭代后参数 κ \kappa κ减少0.9倍,直到没有发现对抗样本。简言之,该策略连续地将对抗扰动的大小限制在连续更小的 κ \kappa κ上。
边栏推荐
- QT使用多线程
- Simulation volume leetcode [general] 1894 Find the student number who needs to add chalk
- MySQL的DML(数据操纵语言)
- 剑指Offer19-正则表达式匹配-字符串-动态规划
- 基于SSH的网上商城
- $attrs is readonly $listeners is readonly error reporting solution
- [gbase] modify the varchar length of the field
- Chinese garbled code in kettle version 8.2
- MySQL的DML(數據操縱語言)
- math_排序不等式的推导
猜你喜欢

Docker installs redis cluster

T100 user defined application instructions (azzi650)

math_排序不等式的推导

Shuttle simulated rocket launch animation

Differences between collections and collections

微信小程序实训|基于云数据库的语文听写工具
![[cityengine] cityengine2019 installation and use and city model construction](/img/d9/6d9c1206af8582d9853443b419231e.png)
[cityengine] cityengine2019 installation and use and city model construction

Workplace essentials | 123 pages Huawei internal project management ppt

The version of NPM does not match that of node. When the NPM result is updated, an error is reported. How can the previous NPM version be returned? Or how to check the NPM version of node adaptation

Lianshengde w801- how to improve the efficiency of multi-channel ADC acquisition
随机推荐
Clear the temporary table and check the memory occupied by the temporary table
Install MySQL 5.7.23 in Linux
Atcoder ABC 232 b~e problem solution
[JMeter] the Chinese display of JMeter response message is garbled
Libevent Library Learning (2)
preg_replace 代码执行漏洞之[BJDCTF2020]ZJCTF,不过如此
T100debug操作记录
xxx.whl is not a supported wheel on this platfo解决办法
Some useful web addresses
[download vscode quickly]
Notes on logical problem solving in English reading
(QT) plug in of QT project
通用分页2.0
8、某网络拓扑如图所示,路由器R1通过接口E1、E2分别连接局域网1、局域网2,通过接口L0连接路由器R2,并通过路由器R2连接域名服务器与互联网。R1的L0接口的IP地址是202.118.2.1/2
npm与node版本不匹配 更新了npm 结果报错node和npm不匹配 怎么退回之前的npm 版本?或者说怎么查看node适配的npm版本
【leetcode刷题】
Interview problem: how to close an order without using a scheduled task?
二叉树,遍历
T100debug operation record
Chinese garbled code in kettle version 8.2