A Unified Contrastive Loss for Self-Training

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Gauffre, Aurelien, Horvat, Julien, Amini, Massih-Reza
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909311758761984
author Gauffre, Aurelien
Horvat, Julien
Amini, Massih-Reza
author_facet Gauffre, Aurelien
Horvat, Julien
Amini, Massih-Reza
contents 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/}.
format Preprint
id arxiv_https___arxiv_org_abs_2409_07292
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Unified Contrastive Loss for Self-Training
Gauffre, Aurelien
Horvat, Julien
Amini, Massih-Reza
Machine Learning
Computer Vision and Pattern Recognition
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/}.
title A Unified Contrastive Loss for Self-Training
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2409.07292