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 堆、栈、队列(遇见再更新)

    目录 Java 栈.队列 栈 常用方法 案例 队列 Java 栈.队列 栈 常用方法 boolean empty() 测试堆栈是否为空 Object peek() 查看堆栈顶部的对象 Object p ...

  2. Oracle decode和case的区别

    case在SQL中有两种写法,先建立一个表create table salgrade(grade int, sal int);insert into salgrade values(1,1000);i ...

  3. maven常用Java配置

    maven国内镜像 ------------------------------------------------------------------------------------------ ...

  4. 最基础前端路由实现,事件popstate使用

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

  5. SpringMVC中@RestController和@Controller的区别

    在使用SpringMVC时,对于Controller中的注解@RestController和@Controller需要我们区分清楚 @RestController注解相当于@ResponseBody和 ...

  6. opencv学习(四)——轨迹栏作为调色板

    轨迹栏作为调色板 在这里,我们将创建一个简单的应用程序,以显示指定的颜色.有一个显示颜色的窗口,以及三个用于指定B.G.R颜色的轨迹栏.滑动轨迹栏,并相应地更改窗口颜色.默认情况下,初始颜色将设置为黑 ...

  7. JavaFile I/O流

    Java 流(Stream).文件(File)和IO Java.io 包几乎包含了所有操作输入.输出需要的类.所有这些流类代表了输入源和输出目标. Java.io 包中的流支持很多种格式,比如:基本类 ...

  8. python使用gitlab-api

    目录 一.简介 二.示例 讲解 配置文件方式存储token 其它返回 三.其它操作 一.简介 公司使用gitlab 来托管代码,日常代码merge request以及其他管理是交给测试,鉴于操作需经常 ...

  9. 搞IT的应届生如何写好简历?

    本人在互联网大厂和外企做过技术面试官,也有过校招和招聘应届毕业生的经验,所以自认为在这个问题上有一定的发言权.   应届毕业生(其实其他求职者也一样)首先要知道,面试官凭什么决定这份简历有面试机会?而 ...

  10. 解决Vulnhub靶机分配不到IP问题

    没法找到他的 ip,可能是网卡配置问题 (之前打开 .ova 文件默认联网方式是桥接,改成NAT) 在开机选择的时候,摁 e 编辑一下 把 ro 改成 rw single init=/bin/bash ...