Lecuyer M, Atlidakis V, Geambasu R, et al. Certified Robustness to Adversarial Examples with Differential Privacy[C]. ieee symposium on security and privacy, 2019: 656-672.

@article{lecuyer2019certified,

title={Certified Robustness to Adversarial Examples with Differential Privacy},

author={Lecuyer, Mathias and Atlidakis, Vaggelis and Geambasu, Roxana and Hsu, Daniel and Jana, Suman},

pages={656--672},

year={2019}}

基于DP(differential privacy), 通过构造\((\epsilon,\delta)\)-DP机制, 可以得到certified robustness (在满足一定的条件下).

主要内容

Differential Privacy

DP, 差分隐私, 严格来说它是形容一些满足特定条件的随机机制. 它的背景是, 一些数据库, 在处理查询的时候, 虽然可以采用匿名机制, 但是一些别有心思的人可以通过查询获得一些特定的知识来推断出某些人或物具有的特殊的性质. 什么时候这种情况容易出现? 假设所有数据的全集是\(\mathcal{X}\), 而\(x, y\)是由\(\mathcal{X}\)中某些数据构成的数据库, \(A\)是一种处理查询的机制, \(A(x, \xi)\)会返回一次查询的基于\(x\)中返回的结果, 如果机制\(A\)能够保护隐私, 那么它应该使得查询者不容易分辨返回的结果是基于\(x\)还是\(y\). 假设\(S\)是我们通过查询获得的一些输出, 那么随机机制\(A\)符合\((\epsilon,\delta)\)-DP, 当

\[P(A(x)\in S) \le e^{\epsilon} P(A(y) \in S) + \delta,
\]

对于任意的\(\rho(x,y)\le1\), 任意的输出集合\(S\), 任意的\(x, y \subset \mathcal{X}\).

直观的解释就是, 对数据库\(x\)改变某一条数据, 其输出的范围的变化并不明显, 去掉\(\delta\)会更容易理解:

\[\frac{P(A(x)\in S)}{P(A(y)\in S)} \le e^{\epsilon}, \epsilon > 0.
\]

显然\(\frac{P(A(x)\in S)}{P(A(y)\in S)}=1\)的时候, 我们就完全无法分辨改变的那个数据归属, 也即这个数据的存在不会改变整体的一些统计性质, 这意味着这个数据的意义是一般的. 这也就保护了隐私.

需要注意的是, 一般意义上\(\rho\)为hamming距离, 但是论文中的都是一般的p范数(怎么推广不是很清楚).

insensitivity

\[\tag{1}
\forall \alpha \in B_p(L), \quad y_k(x+\alpha) > \max_{i:i\not=k} y_i(x+\alpha).
\]

其中\(y_k\)是网络的第k个输出, 即在\(B_p(L)\)内网络不会改变它的判断.

但是, 现在的问题是, 一般的神经网络在\(L\)不是很大的时候, 就会被干扰导致误判, 所以作者就希望转而寻求下面的insensitivity

\[\forall \alpha \in B_p(L), \quad \mathbb{E}(y_k(x+\alpha)) > \max_{i:i\not=k} \mathbb{E} (y_i(x+\alpha)).
\]

作者发现, DP机制可以完成这一目标.

Lemma1



注意条件\([0, b]\), 所以应当假设神经网络的输出是概率(softmax后)向量.

Proposition1

Proposition 1. (Robustness Condition) Suppose \(A\) satisfies \((\epsilon, \delta)\)-DP with respect to a \(p\)-norm metric. For any input \(x\), if for some \(k \in \mathcal{K}\),

\[\tag{4}
\mathbb{E}(A_k(x)) > e^{2\epsilon} \max_{i:i\not=k} \mathbb{E}(A_i(x)) + (1+e^{\epsilon})\delta,
\]

then the multiclass classification model based on label probability vector \(y(x)=(\mathbb{E}(A_1(x)), \ldots, \mathbb{E}(A_{K}(x)))\) is robust to attacks \(\alpha\) of size \(\|\alpha\|_p \le 1\) on input \(x\).

条件(4)很重要, 这说明加入了DP机制并非就能让所有的样本都鲁棒, 从某种程度上讲, 只有那些“confidence"高的才能够有certified robustness.

如何令网络为\((\epsilon,\delta)\)-DP

首先来看, 如何让普通的函数\(f\)为\((\epsilon, \delta)\)-DP, 假设

\[\Delta_{p, q} = \Delta_{p,q}^g=\max_{x,x':x
\not =x'} \frac{\|g(x)-g(x')\|_q}{\|x-x'\|_p}
\]

为\(f\)的\(p,q\)-sensitivity.

\[A(x):= f(x) + r, \quad q=1,
\]

是\((\epsilon, 0)\)-DP的, 其中\(\sigma=\sqrt{2} \Delta_{p, 1} L/\epsilon\),

\[r\sim \mathrm{Lap}(0, \sigma):=\frac{\sqrt{2}}{2\sigma} \exp(-\frac{\sqrt{2}|r|}{\sigma}).
\]

证明:

\[\begin{array}{ll}
\frac{P_x(z)}{P_y(z)}
&= \frac{P(A(x)=z)}{P(A(y)=z)} \\
&= \frac{P(r=z-f(x))}{P(r=z-f(y))} \\
&= \frac{\exp(-\frac{\sqrt{2}|z-f(x)|}{\sigma})}{\exp(-\frac{\sqrt{2}|z-f(y)|}{\sigma})} \\
&= \exp(\frac{\sqrt{2}(|z-f(y)|-|z-f(x)|)}{\sigma}) \\
&\le \exp(\frac{\sqrt{2}(|f(x)-f(y)|)}{\sigma}) \\
&= \exp(\frac{\epsilon(|f(x)-f(y)|)}{\Delta_{p,1} L}) \\
&\le \exp(\epsilon).
\end{array}
\]

注意, \(\frac{|f(x)-f(y)|}{L}\le \Delta_{p, 1}\).

还有一种是高斯机制, 即加高斯噪声, 对应\(L_2\)攻击.

\[r \sim \mathcal{N}(0, \sigma^2), \sigma= \sqrt{2\ln(\frac{1.25}{\delta})} \Delta_{p,2} L/\epsilon,
\]

此时\(A(x)\)为\((\epsilon, \delta)\)-DP.

然后由上图可知, 通过在加入噪声,

\[g(x) \rightarrow g(x) + r,
\]
\[Q(x)=h \circ g(x) \rightarrow A(x)= h \circ (g(x) + r).
\]

那么\(g+r\)是DP, \(A\)是DP吗, 答案是的.

\[\begin{array}{ll}
P(h\circ (g(x)+r) \in S) &= P( g(x)+r \in h^{-1}(S)) \\
&\le e^{\epsilon} P(g(y)+r \in h^{-1}(S)) + \delta \\
&= e^{\epsilon} P(h \circ (g(y) +r) \in S) + \delta.
\end{array}
\]

in practice

上面, 我都是基于\(\mathbb{E}\)才会有certified robustness的, 但是神经网络的期望是没法直接算的, 只好用蒙特卡洛采样估计, 即

\[\hat{\mathbb{E}} (A(x)) = \frac{1}{N}\sum_{n=1}^N h \circ (g(x)+r_n).
\]

当然, 这个时候就没法百分百保证robust了, 有

其中\(\hat{\mathbb{E}}^{lb}, \hat{\mathbb{E}}^{ub}\)分别是置信下界和上界, 具体怎么来的回看论文吧, 我没推出来.

也就是符合上面近似条件的样本, 有至少\(\eta\)的概率是robust的.

注: 还有噪声加在哪一层, 文中给出了答复.

certified robustness 的估计大概需要300采样, 普通的预测25次就足够了.

Certified Robustness to Adversarial Examples with Differential Privacy的更多相关文章

  1. Deep Learning with Differential Privacy

    原文链接:Deep Learning with Differential Privacy abstract:新的机器学习算法,差分隐私框架下隐私成本的改良分析,使用非凸目标训练深度神经网络. 数学中最 ...

  2. Adversarial Examples for Semantic Segmentation and Object Detection 阅读笔记

    Adversarial Examples for Semantic Segmentation and Object Detection (语义分割和目标检测中的对抗样本) 作者:Cihang Xie, ...

  3. 文本adversarial examples

    对文本对抗性样本的研究极少,近期论文归纳如下: 文本对抗三个难点: text data是离散数据,multimedia data是连续数据,样本空间不一样: 对text data的改动可能导致数据不合 ...

  4. 论文阅读 | Generating Fluent Adversarial Examples for Natural Languages

    Generating Fluent Adversarial Examples for Natural Languages   ACL 2019 为自然语言生成流畅的对抗样本 摘要 有效地构建自然语言处 ...

  5. 《Explaining and harnessing adversarial examples》 论文学习报告

    <Explaining and harnessing adversarial examples> 论文学习报告 组员:裴建新   赖妍菱    周子玉 2020-03-27 1 背景 Sz ...

  6. An Introduction to Differential Privacy

    原文链接:An Introduction to Differential Privacy 差分隐私算法可以允许分析人员执行良性的聚合分析,同时保证个人隐私得到切实的保护.. 背景数据分析中的隐私保护技 ...

  7. Limitations of the Lipschitz constant as a defense against adversarial examples

    目录 概 主要内容 Huster T., Chiang C. J. and Chadha R. Limitations of the lipschitz constant as a defense a ...

  8. Uncovering the Limits of Adversarial Training against Norm-Bounded Adversarial Examples

    Uncovering the Limits of Adversarial Training against Norm-Bounded Adversarial Examples 目录 概 主要内容 实验 ...

  9. Generating Adversarial Examples with Adversarial Networks

    目录 概 主要内容 black-box 拓展 Xiao C, Li B, Zhu J, et al. Generating Adversarial Examples with Adversarial ...

随机推荐

  1. apostrophe

    apostrophe 者,', 0x27, 十进制39,ASCII里的single quote (单引号) 也.one of the 'inverted commas'. 在书写上可以表示所有格.省略 ...

  2. 输入URL展示过程

    一. 输入URL,回车 敲击某个键时,键盘内的处理器会先对键矩阵进行分析,然后将数据发送到计算机 计算机接收到来自键盘的信号,由键盘控制器(一种集成电路)进行处理,发送给操作系统 操作系统会分析,这些 ...

  3. 学习Vue源码前的几项必要储备(一)

    从接下来的一段时间里,Mg要进行阅读源码的工作.再阅读源码前,梳理一下准备工作. 7项重要储备 Flow 基本语法 发布/订阅模式 ES6+ 语法 原型链.闭包 函数柯里化 event loop 1. ...

  4. 【leetcode】36. Valid Sudoku(判断能否是合法的数独puzzle)

    Share Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated accordi ...

  5. Lombok安装及Spring Boot集成Lombok

    文章目录 Lombok有什么用 使用Lombok时需要注意的点 Lombok的安装 spring boot集成Lombok Lombok常用注解 @NonNull @Cleanup @Getter/@ ...

  6. OpenStack之六: plancement服务(端口8778)

    官网地址:https://docs.openstack.org/placement/stein/install/install-rdo.html #:创建placement库,并授权 MariaDB ...

  7. UIButton总结

    UIButton 1. 功能 既能显示文字,又能显示图片(能显示2张图片,背景图片.内容图片) 长按高亮的时候可以切换图片\文字 直接通过addTarget...方法监听点击 2. 状态 normal ...

  8. 删除数据库时报错 ERROR 1010 (HY000): Error dropping database (can't rmdir './cart', errno: 39)

    这是因为在数据目录下有表相关的数据(不是表),此时应该进入存放表的目录下删除与表相关的数据,一般数据存放目录默认为/var/lib/mysql,cd到目录下 执行命令:cd /var/lib/mysq ...

  9. 【Java基础】ExecutorService的使用

    ExecutorService是java中的一个异步执行的框架,通过使用ExecutorService可以方便的创建多线程执行环境. 本文将会详细的讲解ExecutorService的具体使用. 创建 ...

  10. scanf("%c\n",&a)和scanf("%c",&a)区别

    scanf("%c",&a); 当输入字符的时候,我们按下任意字符 + 回车的时候,回车没有被当作为分隔符,而是作为一个转义字符与输入的字符一起保存在缓存区.第一次scan ...