Pang T., Yang X., Dong Y., Xu K., Su H., Zhu J. Boosting Adversarial Training with Hypersphere Embedding. arXiv preprint arXIv 2002.08619

在最后一层, 对weight和features都进行normalize有助于加强对抗训练.

主要内容

一般的神经网络可以用下式表示:

\[f(x) = \mathbb{S}(W^Tz + b),
\]

其中\(z=z(x;\omega)\)是encoder部分提取的特征, \(W=(W_1, W_2,\ldots, W_L), b\)分别是最后的权重和偏置, \(\mathbb{S}\)表示softmax.

hypersphere embedding (HE):

\[\widetilde{W}_l = \frac{\widetilde{W}_l}{\|W_l\|}, \widetilde{z} = \frac{z}{\|z\|} \\
\widetilde{f}(x) = \mathbb{S}(\widetilde{W}^T\widetilde{z})=\mathbb{S}(\cos\theta).
\]

进一步添加一些margin:

\[\mathcal{L}_{ce}^m (\widetilde{f}(x), y) = -1_y^T \log \mathbb{S}(s\cdot (\cos\theta -m \cdot \mathbb{1}_y)).
\]

为什么要这么做呢? 作者觉得, 生成对抗样本最有效的途径是旋转角度, 即图中的蓝线. 如果你不限制\(z\)或者\(W\), 那么梯度会同时在模的大小的上下功夫, 这并不高效.

代码

原文代码

Boosting Adversarial Training with Hypersphere Embedding的更多相关文章

  1. 论文解读(ARVGA)《Learning Graph Embedding with Adversarial Training Methods》

    论文信息 论文标题:Learning Graph Embedding with Adversarial Training Methods论文作者:Shirui Pan, Ruiqi Hu, Sai-f ...

  2. Adversarial Training

    原于2018年1月在实验室组会上做的分享,今天分享给大家,希望对大家科研有所帮助. 今天给大家分享一下对抗训练(Adversarial Training,AT). 为何要选择这个主题呢? 我们从上图的 ...

  3. 《C-RNN-GAN: Continuous recurrent neural networks with adversarial training》论文笔记

    出处:arXiv: Artificial Intelligence, 2016(一年了还没中吗?) Motivation 使用GAN+RNN来处理continuous sequential data, ...

  4. LTD: Low Temperature Distillation for Robust Adversarial Training

    目录 概 主要内容 Chen E. and Lee C. LTD: Low temperature distillation for robust adversarial training. arXi ...

  5. Understanding and Improving Fast Adversarial Training

    目录 概 主要内容 Random Step的作用 线性性质 gradient alignment 代码 Andriushchenko M. and Flammarion N. Understandin ...

  6. Adversarial Training with Rectified Rejection

    目录 概 主要内容 rejection 实际使用 代码 Pang T., Zhang H., He D., Dong Y., Su H., Chen W., Zhu J., Liu T. Advers ...

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

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

  8. cs231n spring 2017 lecture16 Adversarial Examples and Adversarial Training 听课笔记

    (没太听明白,以后再听) 1. 如何欺骗神经网络? 这部分研究最开始是想探究神经网络到底是如何工作的.结果人们意外的发现,可以只改变原图一点点,人眼根本看不出变化,但是神经网络会给出完全不同的答案.比 ...

  9. Unsupervised Domain Adaptation Via Domain Adversarial Training For Speaker Recognition

    年域适应挑战(DAC)数据集的实验表明,所提出的方法不仅有效解决了数据集不匹配问题,而且还优于上述无监督域自适应方法.        

随机推荐

  1. day13 装饰器与语法糖

    day13 装饰器与语法糖 一.装饰器 1.什么是装饰器 装饰器就是装饰别人的工具,具体是指为被装饰者添加新功能 装饰器->函数 被装饰者->函数 2.为何要用装饰器 装饰器的核心思想:( ...

  2. Oracle中的索引

    1.Oracle 索引简介      在Oracle数据库中,存储的每一行数据都有一个rowID来标识.当Oracle中存储着大量的数据时,意味着有大量的rowID,此时想要快速定位指定的rowID, ...

  3. Camera、音频录制与Vitamio框架

    一.Camera 1.概述 Android框架包含了各种相机哥相机功能的支持,是你可以在应用中捕获图像和视频. 在应用能使用设备上的相机之前,先想一想将来会如何使用此硬件: (1)Camera  应该 ...

  4. fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to github.com port 443: Timed out

    今天使用git push的时候提示"fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to conne ...

  5. gitlab 备份&恢复

    Gitlab 成功运行起来之后,最终的事情就是定期的备份,遇到问题后的还原. 备份配置 默认 Gitlab 的备份文件会创建在/var/opt/gitlab/backups文件夹中,格式为时间戳_日期 ...

  6. VirtualBox 同时添加 NAT 和 Host-Only 网卡出现无法上网的情况

    如果网卡1是 NAT,网卡2是 Host-Only,可以 ping 通 baidu.com. 如果网卡1是 Host-Only,网卡2是 NAT,无法 ping 通 baidu.com. 使用 nmc ...

  7. CF1145F Neat Words 题解

    Content 本题为 CF 愚人节比赛题目. 给定一个长度为 \(n\) 的,仅包含大写字母的字符串,问这个字符串里面的字母是否全部都是由仅有直线的字母组成,或者全部都是由有曲线的字母构成. 数据范 ...

  8. LuoguP7715 「EZEC-10」Shape 题解

    Content 有一个 \(n\times m\) 的网格,网格上的格子被涂成了白色或者黑色. 设两个点 \((x_1,y_1)\) 和 \((x_2,y_2)\),如果以下三个条件均满足: \(1\ ...

  9. java 数据类型:集合接口Collection之常用ArrayList;lambda表达式遍历;iterator遍历;forEachRemaining遍历;增强for遍历;removeIf批量操作集合元素(Predicate);

    java.util.Collection接口 Java的集合主要由两个接口派生出来,一个是Collection一个是Map,本章只记录Collection常用集合 集合只能存储引用类型数据,不能存储基 ...

  10. selecter模块默认使用epoll 实现IO多路复用,展示单线程的并发效果

    import selectors import socket sel = selectors.DefaultSelector() def accept(sock, mask): conn, addr ...