Tian Y., Krishnan D., Isola P. CONTRASTIVE REPRESENTATION DISTILLATION. arXiv preprint arXiv 1910.10699, 2019.

感觉其和的相似度有50%, 不过这篇写得早一点, 所以后者是借鉴了这篇文章? 这篇文章总的来说就是将distillation 和 contrastive learning 结合起来.

主要内容

思想便是, 希望\(f^S(x_i)\)靠近\(f^T(x_i)\), 而\(f^S(x_j)\)远离\(f^T(x_i)\). 定义

\[S:=f^S(x), \quad T:= f^T(x).
\]

假设源于同一样本的联合分布\(P(S,T|C=1)\)为\(P_1(S,T)\), 而源于不同样本的联合分布\(P(S,T|C=0)\)为\(P_0(S)P_0(T)\). 则我们很自然地希望最大化互信息:

\[I(S,T)= \mathbb{E}_{P_1(S,T)} \log \frac{P_1(S,T)}{P_0(S)P_0(T)}.
\]

接下来就是负采样和对比学习的东西了, 假设数据集是如此构造的: 一个特征\(T\), 以及N+1个特征\(\{S,S_1,\ldots, S_N\}\), 其中\(S,T\)构成正样本对(即来源于同一个样本, 其余\(S_i,T\)构成负样本对. 则我们有先验

\[P(C=1)=\frac{1}{N+1}, P(C=0)=\frac{N}{N+1}.
\]

于是便有

\[P(C=1|T,S)=\frac{P_1(T,S)}{P_1(T,S)+NP_0(T)P_0(S)},
\]

\[\begin{array}{ll}
\log P(C=1|T,S)
&= -\log (1+N\frac{P_0(T)P_0(S)}{P_1(T,S)}) \\
& \le -\log N + \log \frac{P_1(T,S)}{P_0(T)P_0(S)}.
\end{array}
\]

两边关于\(P_1(T,S)\)求期望可知

\[I(T,S) \ge \log N + \mathbb{E}_{P_1(T, S)} \log P(C=1|T,S).
\]

但是\(P(C=1|T,S)\)未知, 故作者采用\(h(T,S)\)去拟合, 通过极大似然估计

\[\mathcal{L}_{critic}(h)= \mathbb{E}_{P_1(T,S)} \log h(T,S) + N \mathbb{E}_{P_0(T,S)}\log (1-h(T,S)).
\]

只要\(h\)的拟合能力够强, 最后便能很好的逼近\(P(C=1|T,S)\). 设其最优解为\(h^*\). 但是需要注意的一点是, \(h^*\)跟\(T, S\)有关系, 则其隐式地和\(f^S\)有关系, 而\(f^S\)又需要

\[\max_{f^S} \mathbb{E}_{P_1} \log h^*(T,S),
\]

所以这就成了一个交替迭代的过程. 作者就另辟蹊径, 既然

\[\begin{array}{ll}
I(T,S)
&\ge \log N + \mathbb{E}_{P_1(T,S)} \log h^*(T,S) + N \mathbb{E}_{P_0(T,S)}\log (1-h^*(T,S)) \\
& \ge \log N + \mathbb{E}_{P_1(T,S)} \log h(T,S) + N \mathbb{E}_{P_0(T,S)}\log (1-h(T,S)).
\end{array}
\]

便不妨共同优化\(f^S, h\).

注: 第二个不等式成立, 因为\(h(T,S) \in [0, 1]\), 故第二项非正.

文中取的\(h\)为

\[h(T,S)=\frac{e^{g^T(T)'g^S(S)/\tau}}{e^{g^T(T)'g^S(S)/\tau} + \frac{N}{M}},
\]

其中, \(g\)为一线性变换, \(\tau\)为temperature, \(M\)为整个数据集的大小.

超参数的选择

CIFAR100:

N: 16384

\(\tau\): 0.1

代码

原文代码

CONTRASTIVE REPRESENTATION DISTILLATION的更多相关文章

  1. 论文解读(GRACE)《Deep Graph Contrastive Representation Learning》

    Paper Information 论文标题:Deep Graph Contrastive Representation Learning论文作者:Yanqiao Zhu, Yichen Xu, Fe ...

  2. Awesome Knowledge-Distillation

    Awesome Knowledge-Distillation 2019-11-26 19:02:16 Source: https://github.com/FLHonker/Awesome-Knowl ...

  3. Feature Distillation With Guided Adversarial Contrastive Learning

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

  4. Representation Learning with Contrastive Predictive Coding

    目录 概 主要内容 从具有序的数据讲起 Contrastive Predictive Coding (CPC) 图片构建序 Den Oord A V, Li Y, Vinyals O, et al. ...

  5. 论文解读(MVGRL)Contrastive Multi-View Representation Learning on Graphs

    Paper Information 论文标题:Contrastive Multi-View Representation Learning on Graphs论文作者:Kaveh Hassani .A ...

  6. 论文解读(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 ...

  7. 论文解读(MERIT)《Multi-Scale Contrastive Siamese Networks for Self-Supervised Graph Representation Learning》

    论文信息 论文标题:Multi-Scale Contrastive Siamese Networks for Self-Supervised Graph Representation Learning ...

  8. Noise Contrastive Estimation

    Notes from Notes on Noise Contrastive Estimation and Negative Sampling one sample: \[x_i \to [y_i^0, ...

  9. Notes on Noise Contrastive Estimation and Negative Sampling

    Notes on Noise Contrastive Estimation and Negative Sampling ## 生成负样本 在常见的关系抽取应用中,我们经常需要生成负样本来训练一个好的系 ...

随机推荐

  1. 日常Java 2021/10/26

    HashSet基于HashMap来实现的,是一个不允许有重复元素的集合.HashSet 允许有null 值. HashSet是无序的,即不会记录插入的顺序. HashSet不是线程安全的,如果多个线程 ...

  2. web自动化,selenium环境配置

    1,首先我们需要在python编译器中添加selenium插件,我用的是pycharm 点击下方的Terminal,然后在命令行输入: pip install selenium 也可以在设置里面手动添 ...

  3. A Child's History of England.40

    Excommunication was, next to the Interdict I told you of at the close {end} of the last chapter, the ...

  4. Mysql索引数据结构详解(1)

    慢查询解决:使用索引  索引是帮助Mysql高效获取数据的排好序的数据结构 常见的存储数据结构: 二叉树    二叉树不适合单边增长的数据 红黑树(又称二叉平衡树)    红黑树会自动平衡父节点两边的 ...

  5. [云原生]Docker - 镜像

    目录 Docker镜像 获取镜像 列出本地镜像 创建镜像 方法一:修改已有镜像 方法二:通过Dockerfile构建镜像 方法三:从本地文件系统导入 上传镜像 保存和载入镜像 移除本地镜像 镜像的实现 ...

  6. 零基础学习java------34---------登录案例,域,jsp(不太懂),查询商品列表案例(jstl标签)

    一. 简单登录案例 流程图: 项目结构图 前端代码: <!DOCTYPE html> <html> <head> <meta charset="UT ...

  7. LeetCode1579题——圆圈中最后剩下的数字

    1.题目描述:0,1,,n-1这n个数字排成一个圆圈,从数字0开始,每次从这个圆圈里删除第m个数字.求出这个圆圈里剩下的最后一个数字.例如,0.1.2.3.4这5个数字组成一个圆圈,从数字0开始每次删 ...

  8. API接口设计之token、timestamp、sign 具体架构与实现(APP/小程序,传输安全)

    Java生鲜电商平台-API接口设计之token.timestamp.sign 具体设计与实现 说明:在实际的业务中,难免会跟第三方系统进行数据的交互与传递,那么如何保证数据在传输过程中的安全呢(防窃 ...

  9. linux 挂载本地iso

    mount -t iso9660 -o loop /mnt/temp/rhel-server-6.5-i386-dvd.iso /mnt/cdrom -t :设备类型 iso9660是指CD-ROM光 ...

  10. linux安装redis报错

    问题:You need tcl 8.5 or newer in order to run the Redis test 解决办法: wget http://downloads.sourceforge. ...