Kim M., Tack J. & Hwang S. Adversarial Self-Supervised Contrastive Learning. In Advances in Neural Information Processing Systems, 2020.

这篇文章提出了对比学习结合adversarial training的一个思路.

主要内容

对比学习的强大之处在于正负样本对的构造, 一个结合adversarial training的很自然的思路是, 将普通样本与其相对应的对抗样本作为一组正样本对. 令\(x \in \mathcal{X}\)为样本, \(t \in \mathcal{T}\)为一augmentation, 则\((x, t(x))\)便构成了一正样本对, 再假设有一组负样本\(\{x_{neg}\}\), 则

\[\mathcal{L}_{con} (x, t(x), \{x_{neg}\}) = -\log \frac{\exp (z^T z_{pos}/\tau)}{\exp (z^T z_{pos}/\tau)+\sum_{z_{neg}}\exp(z^Tz_{neg}/\tau)},
\]

其中\(z\)是经过标准化的特征, \(\tau\)是temperature. 很自然的, 我们可以通过上面的损失构造\(x\)的对抗样本\(x_{adv}\):

\[x_{adv} := \prod_{B(x;\epsilon)} (x+\alpha \cdot \mathrm{sign} (\nabla_{x_{adv}} \mathcal{L}_{con}(x, x_{adv}, \{x_{neg}\})).
\]

稍有不同的是, 作者实际采用的是利用\(\mathcal{L}_{con}(t(x), t'(x), \{x_{neg}\})\)来构建对抗样本, 最后的用于训练的损失是

\[\mathcal{L}_{RoCL} := \mathcal{L}_{con}(t(x), \{t'(x), t(x)_{adv}\}, \{t(x)_{neg}\}) \\
\mathcal{L}_{total}:= \mathcal{L}_{RoCL} + \lambda \mathcal{L}_{con}(t(x)^{adv},t'(x), \{t(x)_{neg}\}),
\]

多的项即希望对抗样本和其他样本区别开来.

注:

\[\mathcal{L}_{con} (x, \{t(x), t'(x)\}, \{x_{neg}\}) = -\log \frac{\sum_{z_{pos}}\exp (z^T z_{pos}/\tau)}{\sum_{z_{pos}}\exp (z^T z_{pos}/\tau)+\sum_{z_{neg}}\exp(z^Tz_{neg}/\tau)}.
\]

Linear Part

因为自监督只是单纯提取了特征, 一般用于下游的分类任务需要再训练一个线性分类器, 很自然的, 作者选择在训练下游分类器的时候同样使用adversarial training:

\[\arg \min_{\psi} \mathbb{E}_{(x, y) \sim \mathbb{D}} [\max_{\delta \in B(x, \epsilon)} \mathcal{L}_{ce}(\psi, x+\delta,y)] ,
\]

其中\(\psi\)为线性分类器\(l(\cdot)\)的的参数.

另外, 作者还融合的随机光滑的技巧, 即在估计的时候

\[S(x) = \arg \max_{c \in Y} \mathbb{E}_{t \in \mathcal{T}} (l_c(f(t(x)))=c),
\]

一般的随机光滑是对样本随机加噪声, 这里的随机光滑是随机选择augmentation, 这倒是很让人眼前一亮.

代码

原文代码

Adversarial Self-Supervised Contrastive Learning的更多相关文章

  1. 论文解读(ClusterSCL)《ClusterSCL: Cluster-Aware Supervised Contrastive Learning on Graphs》

    论文信息 论文标题:ClusterSCL: Cluster-Aware Supervised Contrastive Learning on Graphs论文作者:Yanling Wang, Jing ...

  2. Robust Pre-Training by Adversarial Contrastive Learning

    目录 概 主要内容 代码 Jiang Z., Chen T., Chen T. & Wang Z. Robust Pre-Training by Adversarial Contrastive ...

  3. Feature Distillation With Guided Adversarial Contrastive Learning

    目录 概 主要内容 reweight 拟合概率 实验的细节 疑问 Bai T., Chen J., Zhao J., Wen B., Jiang X., Kot A. Feature Distilla ...

  4. 谣言检测(GACL)《Rumor Detection on Social Media with Graph Adversarial Contrastive Learning》

    论文信息 论文标题:Rumor Detection on Social Media with Graph AdversarialContrastive Learning论文作者:Tiening Sun ...

  5. ICLR2021对比学习(Contrastive Learning)NLP领域论文进展梳理

    本文首发于微信公众号「对白的算法屋」,来一起学AI叭 大家好,卷王们and懂王们好,我是对白. 本次我挑选了ICLR2021中NLP领域下的六篇文章进行解读,包含了文本生成.自然语言理解.预训练语言模 ...

  6. 论文解读(SimGRACE)《SimGRACE: A Simple Framework for Graph Contrastive Learning without Data Augmentation》

    论文信息 论文标题:SimGRACE: A Simple Framework for Graph Contrastive Learning without Data Augmentation论文作者: ...

  7. 论文解读(gCooL)《Graph Communal Contrastive Learning》

    论文信息 论文标题:Graph Communal Contrastive Learning论文作者:Bolian Li, Baoyu Jing, Hanghang Tong论文来源:2022, WWW ...

  8. 论文解读(PCL)《Prototypical Contrastive Learning of Unsupervised Representations》

    论文标题:Prototypical Contrastive Learning of Unsupervised Representations 论文方向:图像领域,提出原型对比学习,效果远超MoCo和S ...

  9. 论文解读(SimCLR)《A Simple Framework for Contrastive Learning of Visual Representations》

    1 题目 <A Simple Framework for Contrastive Learning of Visual Representations> 作者: Ting Chen, Si ...

随机推荐

  1. Hadoop fs.copyToLocalFile错误

    fs.copyToLocalFile(new Path("/study1/1.txt"), new Path("C:/Users/Administrator/Deskto ...

  2. Sharding-JDBC 实现垂直分库水平分表

    1.需求分析

  3. Linux 设置时区

    一.查看和修改Linux的时区 1. 查看当前时区命令 : "date -R" 2. 修改设置Linux服务器时区方法 A命令 : "tzselect" 方法 ...

  4. java网站架构设计

    涉及到的技术及工具:java,springmvc,ibatis,freemarker,mysql,mongdb,memcached,ehcache,maven. 一个网站不可能说一开始就是要设计一个能 ...

  5. [学习总结]1、View的scrollTo 和 scrollBy 方法使用说明和区别

    参考资料:http://blog.csdn.net/vipzjyno1/article/details/24577023 非常感谢这个兄弟! 先查看这2个方法的源码: scrollTo: 1 /** ...

  6. Spring Cloud使用

    一.创建提供者工程01-provider-8081 (1) 创建工程 创建一个Spring Initializr工程,并命名为01-provider-8081.导入Lombok.Web.JPA及MyS ...

  7. 【Linux】【Services】【KVM】安装与简单配置

    1. 环境: 1.1. OS: Red Hat Enterprise Linux Server release 7.4 (Maipo) 1.2. Kernel: 3.10.0-693.el7.x86_ ...

  8. 11、Redis的配置文件

    Redis的配置文件 一.Redis配置文件简介 Redis是通过配置文件启动的 Redis对大小写字母不敏感 Redis基本上环境搭建都在配置文件 关于Redis配置文件位置是安装时放的位置,关于R ...

  9. shell脚本 用户登录服务器发送钉钉提醒

    一.企业微信配置 1.获取AgentId(AppID).Secret .CropID.部门ID 创建一个企业微信应用获取到AgentId(AppID).Secret 2.获取CropID,点击 &qu ...

  10. pwnable_start (内联汇编)

    第一次写内联汇编的题目,以前见师傅们在exp中写汇编,感觉很厉害,今天碰到了,也记录一下. 下载附件发现是32位程序,什么保护都没开,ida看一下伪代码. 可以说是很简洁了,调用了一个write和re ...