{"title":"A Unified Contrastive Loss for Self-Training","authors":"Aurelien Gauffre, Julien Horvat, Massih-Reza Amini","doi":"arxiv-2409.07292","DOIUrl":null,"url":null,"abstract":"Self-training methods have proven to be effective in exploiting abundant\nunlabeled data in semi-supervised learning, particularly when labeled data is\nscarce. While many of these approaches rely on a cross-entropy loss function\n(CE), recent advances have shown that the supervised contrastive loss function\n(SupCon) can be more effective. Additionally, unsupervised contrastive learning\napproaches have also been shown to capture high quality data representations in\nthe unsupervised setting. To benefit from these advantages in a semi-supervised\nsetting, we propose a general framework to enhance self-training methods, which\nreplaces all instances of CE losses with a unique contrastive loss. By using\nclass prototypes, which are a set of class-wise trainable parameters, we\nrecover the probability distributions of the CE setting and show a theoretical\nequivalence with it. Our framework, when applied to popular self-training\nmethods, results in significant performance improvements across three different\ndatasets with a limited number of labeled data. Additionally, we demonstrate\nfurther improvements in convergence speed, transfer ability, and hyperparameter\nstability. The code is available at\n\\url{https://github.com/AurelienGauffre/semisupcon/}.","PeriodicalId":501301,"journal":{"name":"arXiv - CS - Machine Learning","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-09-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Machine Learning","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.07292","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Self-training methods have proven to be effective in exploiting abundant
unlabeled data in semi-supervised learning, particularly when labeled data is
scarce. While many of these approaches rely on a cross-entropy loss function
(CE), recent advances have shown that the supervised contrastive loss function
(SupCon) can be more effective. Additionally, unsupervised contrastive learning
approaches have also been shown to capture high quality data representations in
the unsupervised setting. To benefit from these advantages in a semi-supervised
setting, we propose a general framework to enhance self-training methods, which
replaces all instances of CE losses with a unique contrastive loss. By using
class prototypes, which are a set of class-wise trainable parameters, we
recover the probability distributions of the CE setting and show a theoretical
equivalence with it. Our framework, when applied to popular self-training
methods, results in significant performance improvements across three different
datasets with a limited number of labeled data. Additionally, we demonstrate
further improvements in convergence speed, transfer ability, and hyperparameter
stability. The code is available at
\url{https://github.com/AurelienGauffre/semisupcon/}.
事实证明,在半监督学习中,自我训练方法可以有效利用丰富的无标记数据,尤其是在标记数据稀缺的情况下。虽然这些方法中很多都依赖于交叉熵损失函数(CE),但最近的进展表明,有监督的对比损失函数(SupCon)可能更有效。此外,无监督对比学习方法也被证明可以在无监督环境下捕捉到高质量的数据表示。为了在半监督环境中受益于这些优势,我们提出了一个通用框架来增强自我训练方法,用独特的对比损失来替代所有的 CE 损失实例。通过使用类原型(即一组可训练的类参数),我们覆盖了 CE 设置的概率分布,并展示了与它的理论等价性。当我们的框架应用于流行的自训练方法时,在标注数据数量有限的三个不同数据集上,性能得到了显著提高。此外,我们还证明了收敛速度、转移能力和超参数稳定性的进一步提高。代码可在(url{https://github.com/AurelienGauffre/semisupcon/}.