[论文解读] Supervised Contrastive Learning
这篇论文提出 SupCon,是对比学习的监督扩展,利用同一类别的所有样本作为正样本,在 ImageNet 上达到最新技术水平,并提高鲁棒性和对超参数的稳定性。
Contrastive learning applied to self-supervised representation learning has seen a resurgence in recent years, leading to state of the art performance in the unsupervised training of deep image models. Modern batch contrastive approaches subsume or significantly outperform traditional contrastive losses such as triplet, max-margin and the N-pairs loss. In this work, we extend the self-supervised batch contrastive approach to the fully-supervised setting, allowing us to effectively leverage label information. Clusters of points belonging to the same class are pulled together in embedding space, while simultaneously pushing apart clusters of samples from different classes. We analyze two possible versions of the supervised contrastive (SupCon) loss, identifying the best-performing formulation of the loss. On ResNet-200, we achieve top-1 accuracy of 81.4% on the ImageNet dataset, which is 0.8% above the best number reported for this architecture. We show consistent outperformance over cross-entropy on other datasets and two ResNet variants. The loss shows benefits for robustness to natural corruptions and is more stable to hyperparameter settings such as optimizers and data augmentations. Our loss function is simple to implement, and reference TensorFlow code is released at https://t.ly/supcon.
研究动机与目标
- 利用标签信息将同一类别的嵌入拉近,同时将不同类别的嵌入推远。
- 将自监督对比损失扩展到完全监督的设置,每个锚点有多个正样本。
- 分析并确定表现最佳的监督对比损失形式。
- 展示在 ImageNet 上的最新结果,以及相较于交叉熵的鲁棒性和稳定性提升。
提出的方法
- 对输入应用数据增强以生成两个视图。
- 使用共享编码器对视图进行编码,在单位球面上获得归一化的表示。
- 通过投影网络投影表示,并对投影进行归一化以用于对比学习。
- 定义并比较两种监督对比损失形式,这两者从同一类别聚合正样本。
- 证明批内外监督损失 L_out^sup 相较于 L_in^sup 在归一化效应和梯度结构上具有优势。
- 以两阶段训练(对比预训练后再进行线性分类器)来评估表示。
实验结果
研究问题
- RQ1监督对比损失是否能在如 ImageNet 这样的大规模数据集上超越交叉熵?
- RQ2将每个锚点的多正样本引入是否能改善同类别样本在嵌入空间中的聚类?
- RQ3不同的监督对比损失形式在性能和训练稳定性方面有何比较?
- RQ4与传统监督损失相比,SupCon 是否对增强、优化器和数据量具有鲁棒性?
- RQ5SupCon 表征在其他数据集和任务上的可迁移性如何?
主要发现
- SupCon 在 ImageNet 上使用 ResNet-200 达到 81.4% 的 top-1 准确率,比该架构的上一代 State of the Art 高出 0.8 个百分点。
- SupCon 在 CIFAR-10、CIFAR-100 及 ImageNet 上,跨架构均优于交叉熵及其他基线。
- SupCon 提高对 ImageNet-C 上自然损坏的鲁棒性,并表现出对超参数和增强的敏感性较低。
- 使用每个锚点的多正样本和大量负样本增强了梯度信号,能够在不进行显式困难负样本挖掘的情况下有效学习。
- 一种内存高效的设置,内存容量 8192、批量大小 256,在 ResNet-50 的 ImageNet 上达到 79.1% top-1,超出无需内存的 6144 批量基线。
- 两阶段训练(对比预训练+线性评估)达到有竞争力的结果,线性阶段只需最少 10 个时期即可完成。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。