自监督学习(Self-Supervised Learning) 2018-2020年发展综述

自监督做的啥事?
从 Data本身中,有效率的获取信息,那将比传统的 Manual Labelling 表现更好、学到的信息更丰富并且更能随着问题 Scaling Up。
充分利用image自带的丰富的信息extract useful representations
**
所以对于自监督学习来说,存在三个挑战:

  • 对于大量的无标签数据,如何进行表征学习?
  • 从数据的本身出发,如何设计有效的辅助任务 pretext?
  • 对于自监督学习到的表征,如何来评测它的有效性?


自监督学习(Self-Supervised Learning) - 图2

Before SSL Revolution:Pretext Task

  • [1] **Unsupervised representation learning by predicting image rotations**

论文:https://arxiv.org/pdf/1803.07728.pdf
代码:https://github.com/gidariss/FeatureLearningRotNet

关键词: 2d rotation
将给定的 Image 旋转固定的0, 90, 180, 270 四种角度,让 Network 预测看到的图是原图被转了几度后的结果。

  • [2] **Unsupervised learning of visual representations by solving jigsaw puzzles**

论文:https://arxiv.org/abs/1603.09246

关键词: context-free network (CFN) , Jigsaw Puzzles
Network 必须了解了什么是对象后,才能了解旋转。这也贯策了 SSL 的基本想法:Knowledge Before Task. 具体在一个image上做一个Jigsaw Puzzle Task,任意crop 一个255255的window在一个图上,然后分为33的grid,就是9个box,打乱这9个box的顺序输入CFN,这个CFN就是siamese-ennead CNN,目的是预测这个index of the chosen permutation。


Huge Improvement:Contrastive Learning

  • [3] **Conditional image generation with pixelcnn decoders.**

论文:http://papers.nips.cc/paper/6527-conditional-image-generation-with-pixelcnn-decoders

关键词: conditional image generation , conditional PixelCNN
说到理解数据,最直观的机率模型就是建立Data Likelihood,而在Computer Vision 的领域中,最强大的莫过于 PixelCNN 这种 Pixel-by-Pixel 的建模方法了。引入了一个 conditional pixelCNN去处理图像,可以从diverse classes建模generate image,也可以从image-to-image去生成很多图片根据similar features。

  • [4] **Representation Learning with Contrastive Predictive Coding**

论文:https://arxiv.org/abs/1807.03748
Learn the dataset, not the data points.
理解Contrastive Predictive Coding和NCE Loss

关键词: extract useful representations , probabilistic contrastive loss , Mutual Information , CPC
在label少的时候,unsupervised learning可以帮助我们学到data本身的high-level information,这些information能够对downstream task有很大的帮助。
模型基于看过的Data 提取 Context (也就是 Feature) 并且对未来做预测。并且Loss Function的目标是让 Data 和 Context 的 Mutual Information 越大越好。
具体可以参考 ——-https://www.yuque.com/weijiawu/research/glw1qq

  • [5] **Learning deep representations of fine-grained visual descriptions**.

论文:https://openaccess.thecvf.com/content_cvpr_2016/html/Reed_Learning_Deep_Representations_CVPR_2016_paper.html**
我们把所唯一正确的预测称为Positive Sample; 其它的预测通通为 Negative Samples。文章接下来都使用 Contrastive Loss 来表示这种 Training 方法。

  • [6] **Data-efficient image recognition with contrastive predictive coding**

论文:https://arxiv.org/pdf/1905.09272.pdf
第一个成功在Image Classification实践出 InfoNCE
关键词: representations , Contrastive Predictive Coding , 2–5× less labels , mutual information
第一个成功在Image Classification实践出 InfoNCE 的是 CPC 这篇文章 (基本上是 DeepMind 同一个 team 的作品)。很直观的利用在图片上裁切 Patch的方式,做出 Positive & Negative samples,实现 Contrastive Loss .
CPC 这篇文章,ResNet-50 Linear Protocol 能达到 Top-1 71.5% 的准确率;在 Efficient Classification Protocol上,能比原本 Supervised Learning 的方式省掉至少 50% ~ 80% 的资料(这边是参数更多的 ResNet)。意味着通过SSL Pretrained Model,我能够少一些人工标记一样能达到原本 Supervised Learning 的准确度。
具体可以参考 ——-https://www.yuque.com/weijiawu/research/uc3z1f


What Important?

CPC带来巨大的好处,但什么事情是重要的?难道以后都需要将一张图切很多 Patch 来预测吗?并不尽然。

  • [7] **Contrastive multiview coding**

论文:https://arxiv.org/abs/1906.05849
代码:https://github.com/HobbitLong/CMC/
关键词: multiview contrastive learning , mutual information , sensory channels , view-invariant representations
在CMC 这边文章中表明了,使用不同场景 (View Point, Depth, Color Space) 来计算 Contrastive Loss 能达到非常好的效果,因此 Contrastive 本身 (也就是辨认 Positive & Negative Sample 之间的 Consistency) 才是关键。
另外Google做了大规模的定性实验,找出了几个对 Visual Representation 最有影响的因子,因为篇幅关系就节录下列重点: 1.Pretext Task不一定能在 Downstream Task 上達到好的效果. 2.ResNet的 skip-connection能防止 feature quality 下降. 3.增大Model Size 和增加 Embedding Dimension 能有效提升 Performance
具体可以参考 ——-https://www.yuque.com/weijiawu/research/gtperf

  • [8] **Revisiting self-supervised visual representation learning**

论文:https://openaccess.thecvf.com/content_CVPR_2019/html/Kolesnikov_Revisiting_Self-Supervised_Visual_Representation_Learning_CVPR_2019_paper.html

关键词:

  • [9] **MoCo:Momentum Contrast**

论文:https://arxiv.org/abs/1911.05722
代码: https://github.com/facebookresearch/moco
关键词: dynamic dictionary , visual representation learning , contrastive learning
MoCo完全专注在 Contrastive Loss 上,将这个问题想象成有一个很大的 Dictionary ,Network 的目的就是一个 Encoder 要将图片 Encode 成唯一的一把 Key ,此时要如何做到让Key Space Large and Consistent 是最重要的。
首先借鉴了另一篇SSL 的文章Memory Bank ,建一个 Bank 来存下所有的 Key (或称为 Feature) 。此方法相对把所有图塞进 Batch少用很多内存,但对于很大的 Dataset 依旧难以 Scale Up。MoCo改善了 Bank,用一个 Dynamic Queue 来取代,但是单纯这样做的话是行不通的,因为每次个 Key 会受到 Network 改变太多,Contrastive Loss 无法收敛。因此 MoCo将种子 feature extractor 拆成两个独立的 Network:Encoder 和 Momentum Encoder。

  • [10] **SimCLR:Simple Framework for Contrastive Learning**

论文:https://arxiv.org/abs/2002.05709
代码: https://github.com/google-research/simclr
关键词: Data Augmentation ,Contrastive Learning , Non-Linear Map
文章更专注在Contrastive Loss ,并且发现几点重要因素,包括先前已知的 Batch Size, Embedding Size (与 Normalization)。另外两点相当有意思,一点是Data Augmentation 对 Contrastive Learning 的重要性; 一点是利用一个 Non-Linear Map来避免 Feature 的 Information Loss。SimCLR做了大量的Augmentation ,并且是 Augmentation 的组合。
**


[1] Gidaris, Spyros, Praveer Singh, and Nikos Komodakis. “
Unsupervised representation learning by predicting image rotations.arXiv preprint arXiv:1803.07728 (2018).
[2] Noroozi, Mehdi, and Paolo Favaro. “
Unsupervised learning of visual representations by solving jigsaw puzzles.” European Conference on Computer Vision. Springer, Cham, 2016.
[3] Van den Oord, Aaron, et al. “
Conditional image generation with pixelcnn decoders.Advances in neural information processing systems. 2016.
[4] Oord, Aaron van den, Yazhe Li, and Oriol Vinyals. “
Representation learning with contrastive predictive coding.” arXiv preprint arXiv:1807.03748 (2018).
[5] Reed, Scott, et al. “
Learning deep representations of fine-grained visual descriptions.” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016.
[6] Hénaff, Olivier J., et al. “
Data-efficient image recognition with contrastive predictive coding.” arXiv preprint arXiv:1905.09272 (2019).
[7] Tian, Yonglong, Dilip Krishnan, and Phillip Isola. “
Contrastive multiview coding.” arXiv preprint arXiv:1906.05849 (2019).
[8] Kolesnikov, Alexander, Xiaohua Zhai, and Lucas Beyer. “
Revisiting self-supervised visual representation learning.Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2019.
[9] He, Kaiming, et al. “
Momentum contrast for unsupervised visual representation learning.Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020.
[10] Chen, Ting, et al. “
A simple framework for contrastive learning of visual representations**.” arXiv preprint arXiv:2002.05709 (2020).