MaskCon: Masked Contrastive Learning for Coarse-Labelled Dataset

CVPR 2023  ยท  Chen Feng, Ioannis Patras ยท

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. 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 $\textbf{Mask}$ed $\textbf{Con}$trastive learning~($\textbf{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.

PDF Abstract CVPR 2023 PDF CVPR 2023 Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Learning with coarse labels cifar100 MaskCon Recall@1 65.52 # 1
Recall@2 74.46 # 1
Recall@5 83.64 # 1
Recall@10 89.25 # 1
Learning with coarse labels ImageNet32 MaskCon Recall@1 19.08 # 1
Recall@2 26.21 # 1
Recall@5 38.17 # 1
Recall@10 47.96 # 1
Learning with coarse labels Stanford Cars MaskCon Recall@1 45.53 # 1
Recall@2 58.56 # 1
Recall@5 74.36 # 1
Recall@10 84.36 # 1
Learning with coarse labels Stanford Online Products MaskCon Recall@1 74.05 # 1
Recall@2 78.97 # 1
Recall@5 84.48 # 1
Recall@10 87.96 # 1

Methods