Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Data

Anna Kukleva, Moritz Böhle, Bernt Schiele, Hilde Kuehne, Christian Rupprecht
3/23/2023
cs.CVcs.LG

No official code found. Best implementation: Annusha/temperature_schedules (18 stars, last commit 2023-04-25).

Abstract

Most approaches for self-supervised learning (SSL) are optimised on curated balanced datasets, e.g. ImageNet, despite the fact that natural data usually exhibits long-tail distributions. In this paper, we analyse the behaviour of one of the most popular variants of SSL, i.e. contrastive methods, on long-tail data. In particular, we investigate the role of the temperature parameter $τ$ in the contrastive loss, by analysing the loss through the lens of average distance maximisation, and find that a large $τ$ emphasises group-wise discrimination, whereas a small $τ$ leads to a higher degree of instance discrimination. While $τ$ has thus far been treated exclusively as a constant hyperparameter, in this work, we propose to employ a dynamic $τ$ and show that a simple cosine schedule can yield significant improvements in the learnt representations. Such a schedule results in a constant `task switching' between an emphasis on instance discrimination and group-wise discrimination and thereby ensures that the model learns both group-wise features, as well as instance-specific details. Since frequent classes benefit from the former, while infrequent classes require the latter, we find this method to consistently improve separation between the classes in long-tail data without any additional computational cost.

View on arXivView PDF

Code Implementations(1)

Temperature Schedules for self-supervised contrastive methods on long-tail data (ICLR'23)

182Shell, PythonFeb 28, 20233 years ago
contrastive-learninglong-tailself-supervised-learningtemperature-analysis

Similar Papers

Cite this paper

@article{kukleva2023temperature,
  title  = {Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Data},
  author = {Anna Kukleva and Moritz Böhle and Bernt Schiele and Hilde Kuehne and Christian Rupprecht},
  year   = {2023},
  eprint = {2303.13664},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.13664v1},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.13664.svg)](https://codeofpaper.com/paper/2303.13664)

Discussion