MaskCon: Masked Contrastive Learning for Coarse-Labelled Dataset

Chen Feng, I. Patras
3/1/2023
35 citations
contrastive-ssl

Official code: MrChenFeng/MaskCon_CVPR2023 (35 stars, Python, MIT, PyTorch, last commit 2025-03-22).

Abstract

Deep learning has achieved great success in recent years with the aid of advanced neural network structures and large-scale human-annotated datasets. However, it is often costly and difficult to accurately and efficiently annotate large-scale datasets, especially for some specialized domains where fine-grained labels are required.

Show full abstract

In this setting, coarse labels are much easier to acquire as they do not require expert knowledge. In this work, we propose a contrastive learning method, called masked contrastive learning (MaskCon) to address the under-explored problem setting, where we learn with a coarse-labelled dataset in order to address a finer labelling problem. More specifically, within the contrastive learning framework, for each sample our method generates soft-labels with the aid of coarse labels against other samples and another augmented view of the sample in question. By contrast to self-supervised contrastive learning where only the sample's augmentations are considered hard positives, and in supervised contrastive learning where only samples with the same coarse labels are considered hard positives, we propose soft labels based on sample distances, that are masked by the coarse labels. This allows us to utilize both inter-sample relations and coarse labels. We demonstrate that our method can obtain as special cases many existing state-of-the-art works and that it provides tighter bounds on the generalization error. Experimentally, our method achieves significant improvement over the current state-of-the-art in various datasets, including CIFAR10, CIFAR100, ImageNet-1K, Standford Online Products and Stanford Cars196 datasets. Code and annotations are available at https://github.com/MrChenFeng/MaskCon_CVPR2023.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

MaskCon: Masked Contrastive Learning for Coarse-Labeled Dataset (CVPR2023)

356PythonMar 13, 20231 years agoMIT
coarse-to-finedatasetdeep-learningfine-grained-classificationimage-retrieval+4 more

Similar Papers

Cite this paper

@article{feng2023maskcon,
  title  = {MaskCon: Masked Contrastive Learning for Coarse-Labelled Dataset},
  author = {Chen Feng and I. Patras},
  year   = {2023},
  eprint = {2303.12756},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.12756},
  journal = {CVPR 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.12756.svg)](https://codeofpaper.com/paper/2303.12756)

Discussion