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/10

    多态就是同一个行为具有多个不同表现形式的能力 多态就是同一个接口,使用不同的实例而执行不同操作 多态的优点 1.消除类型之间的耦合关系 2.可替换性 3.可扩充性 4.接口性 5.灵活性 6.简化性 ...

  2. k8s配置中心-configmap,Secret密码

    目录 k8s配置中心-configmap,Secret 创建ConfigMap 使用ConfigMap subPath参数 Secret 官方文档 编写secret清单 使用secret 在 Pod ...

  3. STM32 CAN用队列缓冲接收的例子

    [1]CAN接收用队列缓冲的例子: 发单帧没有问题,多帧或者连续发两帧就有问题.

  4. C逗号表达式

    c语言提供一种特殊的运算符,逗号运算符,优先级别最低,它将两个及其以上的式子联接起来,从左往右逐个计算表达式,整个表达式的值为最后一个表达式的值.如:(3+5,6+8)称为逗号表达式,其求解过程先表达 ...

  5. 自定义控件CustomAlertView

    [记录][完整代码最下] 效果如下: 可行性分析: 由于系统自带的UIAlertView样式简单,只有两种样式,想要理想的样式就要自定义控件了 文件名取为:CustomAlertView 创建文件如下 ...

  6. Type difference of character literals in C and C++

    Every literal (constant) in C/C++ will have a type information associated with it. In both C and C++ ...

  7. 【Linux】【Services】【SaaS】Docker+kubernetes(5. 安装和配置ETCD集群)

    1. 简介: 1.1. ETCD是kubernetes和openstack都用到的组件,需要首先装好 1.2. 官方网站:https://coreos.com/etcd/ 1.3. ETCD的作用: ...

  8. Centos 的常用命令总结

    设置静态IP和DNS vim /etc/sysconfig/network-scripts/ifcfg-[网卡名称] 修改 BOOTPROTO=static 添加 IPADDR=192.168.1.1 ...

  9. 使用 IntelliJ IDEA 远程调试 Tomcat

    一.本地 Remote Server 配置 添加一个Remote Server 如下图所示 1. 复制JVM配置参数,第二步有用 2. 填入远程tomcat主机的IP地址和想开启的调试端口(自定义) ...

  10. 2.VUEJS-安装

    Vue.js 安装 1.独立版本 我们可以在 Vue.js 的官网上直接下载 vue.min.js 并用 <script> 标签引入. 2.使用 CDN 方法 以下推荐国外比较稳定的两个 ...