arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.18134cs.CVcs.LG
收藏

$\mathbb{X}$-样本对比损失:利用样本相似性图改进对比学习

$\mathbb{X}$-Sample Contrastive Loss: Improving Contrastive Learning with Sample Similarity Graphs

Meta FAIR;New York Univeristy(纽约大学);Brown University(布朗大学);Genentech(基因泰克);CIFAR(加拿大高级研究院)

Vlad Sobal, Mark Ibrahim, Randall Balestriero, Vivien Cabannes, Diane Bouchacourt, Pietro Astolfi, Kyunghyun Cho, Yann LeCun

AI总结:

针对传统对比损失仅采用二元相似图、忽略样本间跨相似性的不足,提出$\mathbb{X}$-样本对比损失,显式编码样本关联关系,在多数据集视觉任务中性能优于CLIP等基线模型。

摘要:

学习优质表征需要捕捉数据样本之间多样的关联方式。对比损失作为一种匹配相关样本的目标函数,是自监督学习到多模态学习等各类方法的基础。然而,我们可以从更宽泛的视角将对比损失视为对相似图的修改,以此指示样本在嵌入空间中的关联方式。这一视角揭示了对比学习的一个缺陷:其相似图是二元的,因为仅存在一个样本作为相关正样本。至关重要的是,样本之间的跨相似性被忽略了。基于这一观察,我们修正了标准对比损失,以显式编码样本与其他样本的关联方式。我们对这一被称为$\mathbb{X}$-样本对比损失的新目标函数展开实验,基于类别或文本描述中的相似性训练视觉模型。我们的研究涵盖三种数据规模:含100万样本的ImageNet-1k、含300万样本的CC3M以及含1200万样本的CC12M。通过我们的目标函数学习到的表征,在一系列任务上均优于在相同数据上训练的对比自监督模型和视觉语言模型。在CC12M上训练时,我们在ImageNet和ImageNet Real数据集上的表现均优于CLIP $0.6\%$。我们的目标函数在低数据量场景下表现尤为突出,使用CC3M训练时,在ImageNet上较CLIP提升$16.8\%$,在ImageNet Real上较CLIP提升$18.1\%$。最后,我们的目标函数似乎能促使模型学习将物体与其属性、背景分离的表征,在ImageNet9上较CLIP提升$3.3$-$5.6$%。我们希望所提出的方案能为开发更丰富的学习目标、理解基础模型中的样本关系迈出一小步。

英文摘要:

Learning good representations involves capturing the diverse ways in which data samples relate. Contrastive loss - an objective matching related samples - underlies methods from self-supervised to multimodal learning. Contrastive losses, however, can be viewed more broadly as modifying a similarity graph to indicate how samples should relate in the embedding space. This view reveals a shortcoming in contrastive learning: the similarity graph is binary, as only one sample is the related positive sample. Crucially, similarities \textit{across} samples are ignored. Based on this observation, we revise the standard contrastive loss to explicitly encode how a sample relates to others. We experiment with this new objective, called $\mathbb{X}$-Sample Contrastive, to train vision models based on similarities in class or text caption descriptions. Our study spans three scales: ImageNet-1k with 1 million, CC3M with 3 million, and CC12M with 12 million samples. The representations learned via our objective outperform both contrastive self-supervised and vision-language models trained on the same data across a range of tasks. When training on CC12M, we outperform CLIP by $0.6\%$ on both ImageNet and ImageNet Real. Our objective appears to work particularly well in lower-data regimes, with gains over CLIP of $16.8\%$ on ImageNet and $18.1\%$ on ImageNet Real when training with CC3M. Finally, our objective seems to encourage the model to learn representations that separate objects from their attributes and backgrounds, with gains of $3.3$-$5.6$\% over CLIP on ImageNet9. We hope the proposed solution takes a small step towards developing richer learning objectives for understanding sample relations in foundation models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑