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. 【Penetration】红日靶场(一)

    nmap探查存活主机 nmap -sP 10.10.2.0/24 图片: https://uploader.shimo.im/f/cfuQ653BEvyA42FR.png!thumbnail?acce ...

  2. D3-更改x轴的标签

    记录,上代码

  3. C++ 之杂记

    今天做了一个题,代码不难,但是编译的时候就恼火,老是报错,也不告诉我错哪了.... 之前的代码是这样的,在main函数中调用这个类的构造函数,就一直报错,但是不知道原因,后来加上了const 就好了. ...

  4. gitlab之实战部署

    #:准备Java环境,安装jdk root@ubuntu:~# cd /usr/local/src/ root@ubuntu:/usr/local/src# ls jdk-8u191-linux-x6 ...

  5. github单独下载某一个文件夹

    可以借助svn工具进行下载,实现只下载repo下的指定文件夹内容 背景 需要下载这个文件夹下所有内容https://github.com/rabbitmq/rabbitmq-tutorials/tre ...

  6. 什么是微服务,SpringBoot和SpringCloud的关系和区别

    什么是微服务? 就目前而言对于微服务业界没有一个统一的,标准的定义.但通常而言,微服务是一种架构模式或者说是一种架构风格,它提倡单一应用程序划分为一组小的服务,每个服务在其独立的自己的进程中,服务之间 ...

  7. jQuery - focusin/focusout/focus/blur事件的区别与不同

    focus与blur事件:不支持冒泡 focusin与focusout:支持冒泡 事件触发顺序: 对于同时支持这4个事件的浏览器,事件执行顺序为focusin(聚焦) > focus > ...

  8. jQuery全局进行方法扩展

    <!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>01 ...

  9. jstl中的foreach标签

    <%@ page import="java.util.ArrayList" %><%@ page import="java.util.List" ...

  10. 详解 java 异常

    Throwable 可以用来表示任何可以作为异常抛出的类(注意,是类不是接口),分为两种: Error(注意!error也是可以throw的,但是不建议) 和 Exception. 其中 Error ...