A Unified Contrastive Loss for Self-Training
<|reference_start|>A Unified Contrastive Loss for Self-Training: 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/}.<|reference_end|>
@article{gauffre2024a,
    title={A Unified Contrastive Loss for Self-Training},
    author={Aurelien Gauffre, Julien Horvat, and Massih-Reza Amini},
    journal={Machine Learning and Knowledge Discovery in Databases. Research
  Track and Demo Track. ECML PKDD 2024 vol 14948},
    year={2024},
    doi={10.1007/978-3-031-70371-3_1},
    archivePrefix={arXiv},
    eprint={2409.07292},
    primaryClass={cs.LG cs.CV}
}