Chen T., Kornblith S., Norouzi M., Hinton G. A Simple Framework for Contrastive Learning of Visual Representations. arXiv: Learning, 2020.

@article{chen2020a,

title={A Simple Framework for Contrastive Learning of Visual Representations},

author={Chen, Ting and Kornblith, Simon and Norouzi, Mohammad and Hinton, Geoffrey E},

journal={arXiv: Learning},

year={2020}}

SimCLR 主要是利用augmentation来生成正负样本对, 虽然没有花里胡哨的结构, 但是通过细致的tricks比之前的方法更为有效.

主要内容

流程

流程是很简单的, 假设有一个batch的样本\(x\), 然后从augmentation\(\mathcal{T}\)中随机选取俩个\(t,t'\), 由此得到两批数据\(\tilde{x}_i=t(x), \tilde{x}_j=t'(x)\), 经过第一个encoder得到特征表示\(h_i,h_j\), 再经由一个非线性变化\(g\)得到\(z_i,z_j\)(注意这一步是和以往方法不同的点), 再由\(z_i, z_j\)生成正负样本对(对应同一个样本的俩个样本构成正样本对, 否则为负样本对).

接下来先介绍一些比较重要的特别的tricks, 再介绍别的.

projection head g

一般方法只有一个encoder \(f(\cdot)\), SimCLR多了一个projection head \(g(\cdot)\), 它把第一次提到的特征再进行一次过滤:

\[z_i = g(h_i)=W^{(2)} \sigma(W^{(1)}h_i),
\]

其中\(\sigma\)为ReLU.

作者说, 这是为了过滤到由augmentation带来的额外的可分性, 让区分特征\(z\)变得更为困难从而学习到更好的特征\(h\).

注: 用于下游任务的特征是\(h\)而非\(z\)!

上表是将特征\(h\)或者\(z\)用于一个二分类任务, 区分输入是否经过了特定的augmentation, 结果显示\(h\)能够更好的分类, 意味着\(h\)比\(z\)含有更多的augmentation的信息.

constractive loss

\[\tag{1}
\ell_{ij}=-\log \frac{\exp(\mathrm{sim}(z_i,z_j)/\tau)}{\sum_{k\not=i} \exp(\mathrm{sim}(z_i,z_k)/\tau)},
\]

其中\(\mathrm{sim}(u,v)=u^Tv/\|u\|\|v\|\).

实验显示这个损失比别的都好用.

augmentation

SimCLR中augmentation是很重要的构造正负样本对的配件, 经过消融实验发现, 最有效的的是crop和color distortion.

另外, 实验还显示, 监督学习比起对比学习来讲, 对augmentation的依赖程度很低, 甚至可以说是不依赖.

other

  1. 大的模型充当encoder效果更好;
  2. 大的batch size 和 更多的 training epoches有助于学习到更好的特征表示;

代码

原文代码

A Simple Framework for Contrastive Learning of Visual Representations的更多相关文章

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

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

  2. A Simple Framework for Contrastive Learning of Visual Representations 阅读笔记

      Motivation 作者们构建了一种用于视觉表示的对比学习简单框架 SimCLR,它不仅优于此前的所有工作,也优于最新的对比自监督学习算法, 而且结构更加简单:这个结构既不需要专门的架构,也不需 ...

  3. 【CV】ICCV2015_Unsupervised Learning of Visual Representations using Videos

    Unsupervised Learning of Visual Representations using Videos Note here: it's a learning note on Prof ...

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

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

  5. 【ML】ICML2015_Unsupervised Learning of Video Representations using LSTMs

    Unsupervised Learning of Video Representations using LSTMs Note here: it's a learning notes on new L ...

  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. Deep Reinforcement Learning for Visual Object Tracking in Videos 论文笔记

    Deep Reinforcement Learning for Visual Object Tracking in Videos 论文笔记 arXiv 摘要:本文提出了一种 DRL 算法进行单目标跟踪 ...

  8. 论文解读(SUGRL)《Simple Unsupervised Graph Representation Learning》

    Paper Information Title:Simple Unsupervised Graph Representation LearningAuthors: Yujie Mo.Liang Pen ...

  9. 论文解读(S^3-CL)《Structural and Semantic Contrastive Learning for Self-supervised Node Representation Learning》

    论文信息 论文标题:Structural and Semantic Contrastive Learning for Self-supervised Node Representation Learn ...

随机推荐

  1. Qt最好用评价最高的是哪个版本?

    来源: http://www.qtcn.org/bbs/read-htm-tid-89455.html /// Qt4:    4.8.7      4.X 系列终结版本 Qt5 :   5.6 LT ...

  2. 3.7 rust 静态块

    Cargo.toml [dependencies] lazy_static = "1.4.0" main.rs #[macro_use] extern crate lazy_sta ...

  3. ReactiveCocoa操作方法-线程\时间

    ReactiveCocoa操作方法-线程 deliverOn: 内容传递切换到制定线程中,副作用在原来线程中,把在创建信号时block中的代码称之为副作用. subscribeOn: 内容传递和副作用 ...

  4. sax方式解析XML学习笔记

    原理:对文档进行顺序扫描,当扫描到文档(document)开始与结束,元素开始与结束.文档结束等地方 通知事件处理函数,由事件处理函数相应动作然后继续同样的扫描,直至文档结束. 优点:消耗资源比较少: ...

  5. maven打包插件详解

    maven-jar-plugin插件的使用及详解 该插件的xml配置及详解如下: <plugin> <groupId>org.apache.maven.plugins</ ...

  6. 6.Vue.js-条件与循环

    条件判断 v-if 条件判断使用 v-if 指令: <div id="app"> <p v-if="seen">现在你看到我了</ ...

  7. IO中同步异步,阻塞与非阻塞 -- 原理篇

    再补一篇高手写的理论分析,便于更深刻理解 转自:http://blog.csdn.net/historyasamirror/article/details/5778378 ============== ...

  8. M语言中的引用(Power Query 之 M 语言)

    名词 查询表 函数 行{}/列[] 单元格 表(Table) 列表(List) 记录(Record) 引用[查询表] =查询表表名 引用[应用的步骤] =步骤名 引用表中的[单元格](深化) =表{行 ...

  9. SQL 注入基础

    SQL注入 SQL注入是服务器端未严格校验客户端发送的数据,而导致服务端SQL语句被恶意修改并成功执行的行为. 本质:把用户输入的数据当作代码执行.任何和数据库产生交互的地方便有可能存在注入. SQL ...

  10. odoo14 继承改写原生模块的视图优先级问题

    需要类似这样的改写方法: 1.更改id名,方便下方引用!!! 2.使用原生模块的"model"!!! 3.添加字段priority!!!(越小越大) 4.form 和 kanban ...