Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks
概
本文提出一种distillation model, 能够免疫大部分的adversarial attacks, 具有良好的鲁棒性, 同时容易训练.
主要内容

| 符号 | 说明 |
|---|---|
| \(F(\cdot)\) | 神经网络, 且\(F(X)=\mathrm{softmax^*}(Z(X))\). |
| \(X \in \mathcal{X}\) | 样本 |
| \(Y\) | 样本对应的标签 |
| \(F^d\) | distilled network |
| \(T\) | temperature |
注: 这里的\(\mathrm{softmax}^*(z)_i:=\frac{e^{z_i/T}}{\sum_j e^{e_j/T}}, i= 0,\ldots, N-1\);
注: \(F^d\)与\(F\)网络结构一样;
算法
Input: \(T\),训练数据\((X,Y)\).
- 在训练数据\((X, Y)\)上训练得到\(F\);
- 得到新的训练数据\((X, F(X))\);
- 利用\((X, F(X))\)训练\(F^d\);
- 修改\(F^d\)的最后一层\(T=1\).
Output: \(F^d\).
为什么这个算法是有效的呢?
- 训练\(F^d\)用的标签是概率向量\(F(X)\), 拿数字举例, 如果写的草一点\(7\)和\(1\)是很相近的, 但如果训练的标签是\((0,0,0,0,0,0,1,0,0,0)\)的话反而不符合实际, 会导致不稳定;
- 当\(T\)比较大的时候(训练):
\]
会比较小, 其中\(g(X)=\sum_{l=0}^{N-1} e^{z_l(X)/T}\).
3. 在测试的时候, 我们令\(T=1\), 假设\(X\)在原先情况下\(z_1/T\)最大, \(z_2/T\)次大, 则
\]
则
\]
其中\(\mathcal{G}\)为\(z_2-z_1\)在\(X\)处的负梯度.
一些有趣的指标
鲁棒性定义
\]
其中\(\mu\)为样本的分布
\]
可采用下式来实际估计
\]
合格的抗干扰机制
- 对原有结构有较少的影响;
- 网络对干净数据因具有相当的正确率;
- 较好的训练速度;
- 对\(\| \delta X\|\)较小的情况能够免疫干扰.
原文还有一个理论分析, 但我认为不重要, 略过.
import torch.nn as nn
class Tsoftmax(nn.Module):
def __init__(self, T=100):
super(Tsoftmax, self).__init__()
self.T = T
def forward(self, x):
if self.train():
return nn.functional.softmax(x / self.T)
else:
return nn.functional.softmax(x)
Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks的更多相关文章
- Adversarial Defense by Restricting the Hidden Space of Deep Neural Networks
目录 概 主要内容 Mustafa A., Khan S., Hayat M., Goecke R., Shen J., Shao L., Adversarial Defense by Restric ...
- Exploring Adversarial Attack in Spiking Neural Networks with Spike-Compatible Gradient
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! arXiv:2001.01587v1 [cs.NE] 1 Jan 2020 Abstract 脉冲神经网络(SNN)被广泛应用于神经形态设 ...
- 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 ...
- A New Defense Against Adversarial Images: Turning a Weakness into a Strength
目录 概 主要内容 准则1 准则2 总策略 Hu S, Yu T, Guo C, et al. A New Defense Against Adversarial Images: Turning a ...
- Universal adversarial perturbations
目录 概 主要内容 算法 实验部分 实验1 实验2 实验3 代码 Moosavidezfooli S, Fawzi A, Fawzi O, et al. Universal Adversarial P ...
- 《C-RNN-GAN: Continuous recurrent neural networks with adversarial training》论文笔记
出处:arXiv: Artificial Intelligence, 2016(一年了还没中吗?) Motivation 使用GAN+RNN来处理continuous sequential data, ...
- [论文阅读笔记] Adversarial Learning on Heterogeneous Information Networks
[论文阅读笔记] Adversarial Learning on Heterogeneous Information Networks 本文结构 解决问题 主要贡献 算法原理 参考文献 (1) 解决问 ...
- 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 ...
- (转)Awesome Knowledge Distillation
Awesome Knowledge Distillation 2018-07-19 10:38:40 Reference:https://github.com/dkozlov/awesome-kno ...
随机推荐
- Android系统编程入门系列之硬件交互——多媒体麦克风
在多媒体摄像头及相关硬件文章中,对摄像头的使用方式需要区分应用程序的目标版本以使用不同的代码流程,而与之相比,麦克风硬件的使用就简单多了. 麦克风及相关硬件 麦克风硬件在移动设备上作为音频的采集设备, ...
- 日常Java 2021/10/3
方法: 用System.out.println()来解释,println()是一个方法,System是系统类,out 是标准输出对象. 也就是调用系统类中的对象中的方法. 注重方法:可以是程序简洁,有 ...
- 大数据学习day25------spark08-----1. 读取数据库的形式创建DataFrame 2. Parquet格式的数据源 3. Orc格式的数据源 4.spark_sql整合hive 5.在IDEA中编写spark程序(用来操作hive) 6. SQL风格和DSL风格以及RDD的形式计算连续登陆三天的用户
1. 读取数据库的形式创建DataFrame DataFrameFromJDBC object DataFrameFromJDBC { def main(args: Array[String]): U ...
- Windows zip版本安装MySQL
Windows --MySQL zip版本安装记录: step1. 官网download zip包:http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5. ...
- Element-ui 中对表单进行验证
Element-ui 中对表单(Form)绑定的对象中的对象属性进行校验 如果是直接绑定属性,是可以的,但是绑定对象中的属性就需要特别处理,需要在rules中添加双引号 " "或者 ...
- 【编程思想】【设计模式】【结构模式Structural】组合模式composite
Python版 https://github.com/faif/python-patterns/blob/master/structural/composite.py #!/usr/bin/env p ...
- Zookeeper的选举算法和脑裂问题
ZK介绍 ZK = zookeeper ZK是微服务解决方案中拥有服务注册发现最为核心的环境,是微服务的基石.作为服务注册发现模块,并不是只有ZK一种产品,目前得到行业认可的还有:Eureka.Con ...
- SQL查询:并集、差集、交集
新建两个表进行测试: test_a ID name 1 曹操 2 郭嘉 3 孙权 4 周瑜 test_b ID name 1 刘备 2 关羽 3 张飞 4 孙权 5 周瑜 1.UNION形成并集 UN ...
- 【Java多线程】线程池-ThreadPoolExecutor
ThreadPoolExecutor提供了四个构造方法: 我们以最后一个构造方法(参数最多的那个),对其参数进行解释: public ThreadPoolExecutor(int corePoolSi ...
- C++STL标准库学习笔记(二)二分查找
二.STL中的二分查找算法 1.binary_search 2.lower_bound 3.upper_bound 记得#include<algorithm>! 前言: 在这个笔记中,我把 ...