# An Asymmetric Contrastive Loss for Handling Imbalanced Datasets

arXiv: https://arxiv.org/abs/2207.07080 · HTML: https://mlsanity.com/paper/2207.07080/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 20 of its 34 references that are in the map.
- First posted on arXiv 14 Jul 2022.

## Builds on (most cited first, 20 of 20)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [A Simple Framework for Contrastive Learning of Visual Representations](https://mlsanity.com/paper/2002.05709/) (2020)
- [Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms](https://mlsanity.com/paper/1708.07747/) (2017)
- [Supervised Contrastive Learning](https://mlsanity.com/paper/2004.11362/) (2020)
- [Contrastive Multiview Coding](https://mlsanity.com/paper/1906.05849/) (2019)
- [Learning deep representations by mutual information estimation and maximization](https://mlsanity.com/paper/1808.06670/) (2018)
- [Data-Efficient Image Recognition with Contrastive Predictive Coding](https://mlsanity.com/paper/1905.09272/) (2019)
- [Skin Lesion Analysis Toward Melanoma Detection 2018: A Challenge Hosted by the International Skin Imaging Collaboration (ISIC)](https://mlsanity.com/paper/1902.03368/) (2019)
- [Asymmetric Loss For Multi-Label Classification](https://mlsanity.com/paper/2009.14119/) (2020)
- [A unifying mutual information view of metric learning: cross-entropy vs. pairwise losses](https://mlsanity.com/paper/2003.08983/) (2020)
- [Unleashing the Power of Contrastive Self-Supervised Visual Models via Contrast-Regularized Fine-Tuning](https://mlsanity.com/paper/2102.06605/) (2021)
- [Radial-Based Undersampling for Imbalanced Data Classification](https://mlsanity.com/paper/1906.00452/) (2019)
- [LoRAS: An oversampling approach for imbalanced datasets](https://mlsanity.com/paper/1908.08346/) (2019)
- [CUSBoost: Cluster-based Under-sampling with Boosting for Imbalanced Classification](https://mlsanity.com/paper/1712.04356/) (2017)
- [Neural Network Based Undersampling Techniques](https://mlsanity.com/paper/1908.06487/) (2019)
- [SuperCon: Supervised Contrastive Learning for Imbalanced Skin Lesion Classification](https://mlsanity.com/paper/2202.05685/) (2022)
- [GenSample: A Genetic Algorithm for Oversampling in Imbalanced Datasets](https://mlsanity.com/paper/1910.10806/) (2019)
- [VOS: a Method for Variational Oversampling of Imbalanced Data](https://mlsanity.com/paper/1809.02596/) (2018)
- [A Novel Adaptive Minority Oversampling Technique for Improved Classification in Data Imbalanced Scenarios](https://mlsanity.com/paper/2103.13823/) (2021)
- [Multi-granularity Relabeled Under-sampling Algorithm for Imbalanced Data](https://mlsanity.com/paper/2201.03957/) (2022)

## Built on by (most cited first, 3 of 3)

- [Efficient Self-Supervised Learning for Earth Observation via Dynamic Dataset Curation](https://mlsanity.com/paper/2504.06962/) (2025)
- [Zero-Shot Visual Deepfake Detection: Can AI Predict and Prevent Fake Content Before It's Created?](https://mlsanity.com/paper/2509.18461/) (2025)
- [Random Walks in Self-supervised Learning for Triangular Meshes](https://mlsanity.com/paper/2503.00816/) (2025)

## Abstract (arXiv)

Contrastive learning is a representation learning method performed by contrasting a sample to other similar samples so that they are brought closely together, forming clusters in the feature space. The learning process is typically conducted using a two-stage training architecture, and it utilizes the contrastive loss (CL) for its feature learning. Contrastive learning has been shown to be quite successful in handling imbalanced datasets, in which some classes are overrepresented while some others are underrepresented. However, previous studies have not specifically modified CL for imbalanced datasets. In this work, we introduce an asymmetric version of CL, referred to as ACL, in order to directly address the problem of class imbalance. In addition, we propose the asymmetric focal contrastive loss (AFCL) as a further generalization of both ACL and focal contrastive loss (FCL). Results on the FMNIST and ISIC 2018 imbalanced datasets show that AFCL is capable of outperforming CL and FCL in terms of both weighted and unweighted classification accuracies. In the appendix, we provide a full axiomatic treatment on entropy, along with complete proofs.
