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. Go知识盲区--闭包

    1. 引言 关于闭包的说明,曾在很多篇幅中都有过一些说明,包括Go基础--函数2, go 函数进阶,异常与错误 都有所提到, 但是会发现,好像原理(理论)都懂,但是就是不知道如何使用,或者在看到一些源 ...

  2. 简化版chmod

    我们知道对文件访问权限的修改在Shell下可通过chmod来进行 例如 可以看到v.c文件从无权限到所有者可读可写可执行.群组和其他用户可读可执行 chmod函数原型 int chmod(const ...

  3. ps精修

    1.磨皮方法: a,, 添加高斯模糊后,按住alt键新建图层蒙版,设置前景色为白色,用画笔在脸上雀斑的位置涂抹,注意脸轮廓位置不要涂抹.最后添加曲线提亮 b. 添加蒙尘和划痕后,后面上面的一样

  4. spring jdbc 配置数据源连接数据库

    概述 在XML配置数据源,并将数据源注册到JDBC模板 JDBC模板关联业务增删改查 在XML配置数据源 <?xml version="1.0" encoding=" ...

  5. 超过三张表禁止join

    一. 问题提出 <阿里巴巴JAVA开发手册>里面写超过三张表禁止join,这是为什么? 二.问题分析 对这个结论,你是否有怀疑呢?也不知道是哪位先哲说的不要人云亦云,今天我设计sql,来验 ...

  6. Spring Cloud中使用Eureka

    一.创建00-eurekaserver-8000 (1)创建工程 创建一个Spring Initializr工程,命名为00-eurekaserver-8000,仅导入Eureka Server依赖即 ...

  7. lucene中创建索引库

    package com.hope.lucene;import org.apache.commons.io.FileUtils;import org.apache.lucene.document.Doc ...

  8. spring boot springMVC扩展配置 。WebMvcConfigurer ,WebMvcConfigurerAdapter

    摘要: 在spring boot中 MVC这部分也有默认自动配置,也就是说我们不用做任何配置,那么也是OK的,这个配置类就是 WebMvcAutoConfiguration,但是也时候我们想设置自己的 ...

  9. 关于tensorflow无法使用gpu

    python3.6 无法使用tensorflow gpu 环境名称 test1 在控制台里进入环境 conda activate test1 使用python python 查看gpu能否使用 pri ...

  10. JS如何区分微信浏览器、QQ浏览器和QQ内置浏览器,解决 ios 无法判断是否为qq浏览器环境的问题 !!!

    原理 通过不同移动端的ua弹窗 获取user-agent 参数包含的信息,进行判断浏览器类型 在Android上 QQ内置环境的ua中有关键字 MQQBrowser, 并且后面包含一个[空白符+QQ] ...