3 个月前

监督对比学习

监督对比学习

摘要

近年来,对比学习(contrastive learning)在自监督表示学习中的应用重新兴起,推动了深度图像模型在无监督训练条件下达到当前最优性能。现代批量对比学习方法在性能上已超越或显著优于传统的对比损失函数,如三元组损失(triplet loss)、最大间隔损失(max-margin loss)以及N元组损失(N-pairs loss)。在本研究中,我们将自监督的批量对比学习方法拓展至全监督设置,从而有效利用标签信息:在嵌入空间中,同一类别的样本点簇被拉近,而不同类别之间的样本点簇则被相互推开。我们分析了监督对比损失(Supervised Contrastive, SupCon)的两种可能形式,识别出表现最佳的损失函数形式。在ResNet-200架构上,我们在ImageNet数据集上实现了81.4%的Top-1准确率,较此前报道的该架构最佳结果高出0.8%。此外,在其他多个数据集及两种ResNet变体上,该损失函数均持续优于交叉熵损失。实验表明,该损失函数在应对自然退化(natural corruptions)时具有更强的鲁棒性,并对超参数设置(如优化器选择、数据增强策略)表现出更高的稳定性。该损失函数实现简单,相关TensorFlow参考代码已公开发布于 https://t.ly/supcon。

代码仓库

hannaiiyanggit/unicon
pytorch
GitHub 中提及
alexk1704/scclv2
tf
GitHub 中提及
XG293/SupConLoss
pytorch
GitHub 中提及
HobbitLong/SupContrast
官方
pytorch
GitHub 中提及
renato145/ContrastiveLoss
pytorch
GitHub 中提及
guerbet-ai/wsp-contrastive
pytorch
GitHub 中提及
davidczy/supcon_gamma
pytorch
GitHub 中提及
forcesh/SupContrast
pytorch
GitHub 中提及
ilyassmoummad/ProtoCLR
pytorch
GitHub 中提及
caesarea38/doclangid
pytorch
GitHub 中提及
hooman650/supcl-seq
pytorch
GitHub 中提及
vk1996/contrastive_learning
tf
GitHub 中提及
salarim/Semi-Supervised-CL
pytorch
GitHub 中提及
ZIZUN/CPFT
pytorch
GitHub 中提及
sidtandon2014/fw-shapley
pytorch
GitHub 中提及
flyingsheepbin/pet-biometrics
pytorch
GitHub 中提及
Liut2016/ecg-supcontrast
pytorch
GitHub 中提及
PaperCodeReview/SupCL-TF
tf
GitHub 中提及
uiuctml/HypStructure
pytorch
GitHub 中提及

基准测试

基准方法指标
class-incremental-learning-on-cifar100SCR
10-stage average accuracy: 65.98
image-classification-on-imagenetResNet-200 (Supervised Contrastive)
Hardware Burden:
Operations per network pass:
Top 1 Accuracy: 80.8%

用 AI 构建 AI

从想法到上线——通过免费 AI 协同编程、开箱即用的环境和市场最优价格的 GPU 加速您的 AI 开发

AI 协同编程
即用型 GPU
最优价格
立即开始

Hyper Newsletters

订阅我们的最新资讯
我们会在北京时间 每周一的上午九点 向您的邮箱投递本周内的最新更新
邮件发送服务由 MailChimp 提供
监督对比学习 | 论文 | HyperAI超神经