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.
翻译:深度学习近年来借助先进的神经网络结构和大规模人工标注数据集取得了巨大成功。然而,准确高效地标注大规模数据集往往成本高昂且困难重重,尤其在需要细粒度标签的专业领域。在此背景下,粗标签因无需专业知识而更易获取。本文提出一种名为**掩码对比学习**(**MaskCon**)的对比学习方法,以解决一个尚未充分探索的问题场景:即利用粗标签数据集来应对更精细的标签问题。具体而言,在对比学习框架中,对于每个样本,我们的方法借助粗标签生成针对其他样本及该样本另一增强视图的软标签。与仅将样本增强视为硬正例的自监督对比学习,以及仅将具有相同粗标签的样本视为硬正例的有监督对比学习不同,我们提出基于样本距离且经粗标签掩码的软标签。这使我们能同时利用样本间关系与粗标签。我们证明,本方法可作为多项现有前沿工作的特例,并提供更紧的泛化误差界。实验方面,我们的方法在CIFAR10、CIFAR100、ImageNet-1K、Stanford Online Products及Stanford Cars196等多个数据集上均显著超越当前最优方法。代码与标注数据见https://github.com/MrChenFeng/MaskCon_CVPR2023。