Certified Adversarial Robustness via Randomized Smoothing
@article{cohen2019certified,
title={Certified Adversarial Robustness via Randomized Smoothing},
author={Cohen, Jeremy and Rosenfeld, Elan and Kolter, J Zico},
pages={1310--1320},
year={2019}}
概
Certified robustness 区别于一般的启发式的防御, 其在样本\(x\)满足一定的条件下(往往是一个类似于置信度的保证), 可以证明在某个范数球(往往是\(\ell_2\), 正如本文)内能够免疫攻击, 即
\]
这些方法给出了一种不同于adversarial training的思路, 虽然到目前为止, 这些方法往往局限于\(\ell_1, \ell_2\)攻击, 在更为常见的\(\ell_{\infty}\)的表现并不是特别好.
主要内容
方法很简单, 训练的时候:
- Given inputs \(x_i\),
- Generate gaussian noise \(\epsilon_i \sim \mathcal{N}(0, \sigma^2)\);
- Use \(x_i+\epsilon_i\) to train.
实际上这个训练过程, 不从后面的理论的角度看, 可以把它和adversarial training做类比, 实际上都是一种在样本点周围试探性的训练过程. 大概这样子会让整个的loss landscape更加光滑?
测试的时候就不同了, 首先需要认为地设定一个采样次数\(n\),
- Given input \(x\)
- Generate \(n\) gaussian noise \(\epsilon_i, i=1, \ldots, n\).
- For each \(x+\epsilon_i\), the neural network will give a prediction label \(c_i\);
- Count the prediction labels and find the most frequent one, denoted by \(c\).
则\(c\)就是最终的预测是输出, 简而言之, 就是在预测的时候需要统计频率, 这个实际上是寻找最大概率点.
定理1
定理1: 假设\(f:\mathbb{R}^d \rightarrow \mathcal{Y}\) 为一个任意的确定性或者随机的函数, \(\epsilon \sim \mathcal{N}(0, \sigma^2I)\). 定义\(g\)为
g(x):= \arg \max_{c \in \mathcal{Y}} \mathbb{P}(f(x+\epsilon)=c).
\]
假设\(c_A \in \mathcal{Y}\)且\(\underline{p_A}, \overline{p_B} \in [0, 1]\)满足
\mathbb{P}(f(x+\epsilon)=c_A) \ge \underline{p_A} \ge \overline{p_B} \ge \max_{c \not = c_{A}} \mathbb{P}(f(x+\epsilon)=c).
\]
则\(g(x+\delta)=c_A\) 对于任意的\(\|\delta\|_2 < R\), 其中
R=\frac{\sigma}{2}(\Phi^{-1}(\underline{p_A})- \Phi^{-1}(\overline{p_B})).
\]
定理1总结来说就是, 当你的\(f(x+\epsilon)=c_A\)的概率比别的类别的概率大得多的时候, 由(1)式所得到的smooth版分类器\(g\)就能够在某个半径内免疫\(\ell_2\)攻击.
但是需要注意的是, 普通的CNN的训练过程可以保证置信度很高但没法保证(2), 所以为了让(2)式成立这才有了上面的一个训练过程, 其中实际上有一个逼近的过程(虽然感觉有一点牵强):

测试过程中统计频率的行为也得到了解释, 实际上就是为了估计最大概率. 最后, 在作者的代码中, 或者说算法中, 测试的predict可能有点麻烦, 实际上这是作者引入了假设检验, 意图大概是为了有些时候没法判断到底哪个对干脆就不判断来保证安全(测试的时候感觉是没有必要的). 当然了, 在certify accuracy的估计中, \(\alpha\)就是相当有必要了.
代码
Certified Adversarial Robustness via Randomized Smoothing的更多相关文章
- Improving Adversarial Robustness via Channel-Wise Activation Suppressing
目录 概 主要内容 代码 Bai Y., Zeng Y., Jiang Y., Xia S., Ma X., Wang Y. Improving adversarial robustness via ...
- Improving Adversarial Robustness Using Proxy Distributions
目录 概 主要内容 proxy distribution 如何利用构造的数据 Sehwag V., Mahloujifar S., Handina T., Dai S., Xiang C., Chia ...
- Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
目录 概 主要内容 Auto-PGD Momentum Step Size 损失函数 AutoAttack Croce F. & Hein M. Reliable evaluation of ...
- Second Order Optimization for Adversarial Robustness and Interpretability
目录 概 主要内容 (4)式的求解 超参数 Tsiligkaridis T., Roberts J. Second Order Optimization for Adversarial Robustn ...
- IMPROVING ADVERSARIAL ROBUSTNESS REQUIRES REVISITING MISCLASSIFIED EXAMPLES
目录 概 主要内容 符号 MART Wang Y, Zou D, Yi J, et al. Improving Adversarial Robustness Requires Revisiting M ...
- Inherent Adversarial Robustness of Deep Spiking Neural Networks: Effects of Discrete Input Encoding and Non-Linear Activations
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! arXiv:2003.10399v2 [cs.CV] 23 Jul 2020 ECCV 2020 1 https://github.com ...
- Adversarial Detection methods
目录 Kernel Density (KD) Local Intrinsic Dimensionality (LID) Gaussian Discriminant Analysis (GDA) Gau ...
- Glossary Collection
目录 直接修饰用 间接强调用 (多为副词) 过渡用 特别的名词 动词 词组 各种介词 句子 摘要 引言 总结 正文 实验 直接修饰用 Word 含义 例句 近义词 nuanced adj. 微妙的:具 ...
- Competing in a data science contest without reading the data
Competing in a data science contest without reading the data Machine learning competitions have beco ...
随机推荐
- GPU随机采样速度比较
技术背景 随机采样问题,不仅仅只是一个统计学/离散数学上的概念,其实在工业领域也都有非常重要的应用价值/潜在应用价值,具体应用场景我们这里就不做赘述.本文重点在于在不同平台上的采样速率,至于另外一个重 ...
- Sharding-JDBC 实现水平分库分表
1.需求分析
- spring cloud config center Git SSH configuration
Git SSH configuration using properties By default, the JGit library used by Spring Cloud Config Serv ...
- SpringMVC中@RestController和@Controller的区别
在使用SpringMVC时,对于Controller中的注解@RestController和@Controller需要我们区分清楚 @RestController注解相当于@ResponseBody和 ...
- 通过DT10获取程序执行过程中的实时覆盖率
DT10是新一代的动态测试工具,可以长时间跟踪记录目标程序执行情况,获取目标程序动态执行数据,帮助进行难于重现的Bug错误分析,覆盖率检测,性能测试,变量跟踪等等功能. 系统测试覆盖率,通常是用于判断 ...
- 使用OPC与PLC通讯 一
总结自己在opc与自控开发的经验.首先介绍OPC DA模式下的OPC各种操作. 在使用opc时需要引用到 OPCDAAuto.dll 这个类库. 在项目引用后需要注册这个类库,否则程序跑起来会报错,& ...
- Jenkins动态选择分支/tag
目录 一.简介 二.配置 三.配置tag 四.其它方法 五.List Git Branches插件 一.简介 一般选择分支构建,Git Parameter插件即可.这里是应用pipline的同时,可以 ...
- mysql深度优化与理解(迄今为止读到最优秀的mysql博客)
转载:https://www.cnblogs.com/shenzikun1314/p/6396105.html 本篇深入了解查询优化和服务器的内部机制,了解MySql如何执行特定查询,从中也可以知道如 ...
- 转: 再谈select, iocp, epoll,kqueue及各种I/O复用机制
首先,介绍几种常见的I/O模型及其区别,如下: blocking I/O nonblocking I/O I/O multiplexing (select and poll) signal drive ...
- 筛选Table.SelectRows-文本与数值(Power Query 之 M 语言)
数据源: 包含文本与数值的任意数据 目标: 对文本和数值进行筛选 M公式: = Table.SelectRows( 表, 筛选条件) 筛选条件: 等于:each [指定列] = "指定值&q ...