Unbiased Supervised Contrastive Learning

Carlo Alberto Barbano, Benoit Dufumier, Enzo Tartaglione, Marco Grangetto, Pietro Gori
11/10/2022
cs.LGcs.CVstat.ML
contrastive-ssl

Official code: EIDOSLAB/unbiased-contrastive-learning (12 stars, Python, MIT, last commit 2023-09-22).

Abstract

Many datasets are biased, namely they contain easy-to-learn features that are highly correlated with the target class only in the dataset but not in the true underlying distribution of the data. For this reason, learning unbiased models from biased data has become a very relevant research topic in the last years.

Show full abstract

In this work, we tackle the problem of learning representations that are robust to biases. We first present a margin-based theoretical framework that allows us to clarify why recent contrastive losses (InfoNCE, SupCon, etc.) can fail when dealing with biased data. Based on that, we derive a novel formulation of the supervised contrastive loss (epsilon-SupInfoNCE), providing more accurate control of the minimal distance between positive and negative samples. Furthermore, thanks to our theoretical framework, we also propose FairKL, a new debiasing regularization loss, that works well even with extremely biased data. We validate the proposed losses on standard vision datasets including CIFAR10, CIFAR100, and ImageNet, and we assess the debiasing capability of FairKL with epsilon-SupInfoNCE, reaching state-of-the-art performance on a number of biased datasets, including real instances of biases in the wild.

View on arXivView PDF

Code Implementations(1)

MIT

Code for the paper "Unbiased Supervised Contrastive Learning" | ICLR 2023 https://openreview.net/forum?id=Ph5cJSfD2XN

121PythonFeb 9, 20233 years agoMIT
contrastive-learningdebiasingdeep-learningfairnessrepresentation-learning

Similar Papers

Cite this paper

@article{barbano2022unbiased,
  title  = {Unbiased Supervised Contrastive Learning},
  author = {Carlo Alberto Barbano and Benoit Dufumier and Enzo Tartaglione and Marco Grangetto and Pietro Gori},
  year   = {2022},
  eprint = {2211.05568},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.05568}
}

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/2211.05568.svg)](https://codeofpaper.com/paper/2211.05568)

Discussion