Supervised Contrastive Learning

被引:0
|
作者
Khosla, Prannay [1 ]
Teterwak, Piotr [1 ,2 ]
Wang, Chen [1 ,3 ]
Sarna, Aaron [1 ]
Tian, Yonglong [1 ,4 ]
Isola, Phillip [1 ,4 ]
Maschinot, Aaron [1 ]
Liu, Ce [1 ]
Krishnan, Dilip [1 ]
机构
[1] Google Res, Cambridge, MA 02138 USA
[2] Boston Univ, Boston, MA 02215 USA
[3] Snap Inc, Santa Monica, CA USA
[4] MIT, Cambridge, MA 02139 USA
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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 (1).
引用
收藏
页数:13
相关论文
共 50 条
  • [1] Supervised contrastive learning for recommendation
    Yang, Chun
    Zou, Jianxiao
    Wu, JianHua
    Xu, Hongbing
    Fan, Shicai
    [J]. KNOWLEDGE-BASED SYSTEMS, 2022, 258
  • [2] Adversarial supervised contrastive learning
    Li, Zhuorong
    Yu, Daiwei
    Wu, Minghui
    Jin, Canghong
    Yu, Hongchuan
    [J]. MACHINE LEARNING, 2023, 112 (06) : 2105 - 2130
  • [3] Adversarial supervised contrastive learning
    Zhuorong Li
    Daiwei Yu
    Minghui Wu
    Canghong Jin
    Hongchuan Yu
    [J]. Machine Learning, 2023, 112 : 2105 - 2130
  • [4] Supervised Spatially Contrastive Learning
    Nakashima, Kodai
    Kataoka, Hirokatsu
    Iwata, Kenji
    Suzuki, Ryota
    Satoh, Yutaka
    [J]. Seimitsu Kogaku Kaishi/Journal of the Japan Society for Precision Engineering, 2022, 88 (01): : 66 - 71
  • [5] Weakly Supervised Contrastive Learning
    Zheng, Mingkai
    Wang, Fei
    You, Shan
    Qian, Chen
    Zhang, Changshui
    Wang, Xiaogang
    Xu, Chang
    [J]. 2021 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV 2021), 2021, : 10022 - 10031
  • [6] Supervised Contrastive Learning for Afect Modelling
    Pinitas, Kosmas
    Makantasis, Konstantinos
    Liapis, Antonios
    Yannakakis, Georgios N.
    [J]. PROCEEDINGS OF THE 2022 INTERNATIONAL CONFERENCE ON MULTIMODAL INTERACTION, ICMI 2022, 2022, : 531 - 539
  • [7] Supervised Contrastive Learning for Product Classification
    Azizi, Sahel
    Fang, Uno
    Adibi, Sasan
    Li, Jianxin
    [J]. ADVANCED DATA MINING AND APPLICATIONS, ADMA 2021, PT II, 2022, 13088 : 341 - 355
  • [8] Contrastive Learning for Supervised Graph Matching
    Ratnayaka, Gathika
    Wang, Qing
    Li, Yang
    [J]. UNCERTAINTY IN ARTIFICIAL INTELLIGENCE, 2023, 216 : 1718 - 1729
  • [9] Contrastive Similarity Matching for Supervised Learning
    Qin, Shanshan
    Mudur, Nayantara
    Pehlevan, Cengiz
    [J]. NEURAL COMPUTATION, 2021, 33 (05) : 1300 - 1328
  • [10] Supervised Contrastive Learning for Product Matching
    Peeters, Ralph
    Bizer, Christian
    [J]. COMPANION PROCEEDINGS OF THE WEB CONFERENCE 2022, WWW 2022 COMPANION, 2022, : 248 - 251