arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.03355cs.LGcs.CLcs.CV
收藏

BatchSampler:为视觉、语言和图中的对比学习采样小批量

BatchSampler: Sampling Mini-Batches for Contrastive Learning in Vision, Language, and Graphs

Tsinghua University(清华大学);Yale University(耶鲁大学)

Zhen Yang, Tinglin Huang, Ming Ding, Yuxiao Dong, Rex Ying, Yukuo Cen, Yangliao Geng, Jie Tang

AI总结:

本文提出通用小批量采样方法 BatchSampler,通过邻近图与重启随机游走构造含真实困难负样本的批次,持续提升视觉、语言和图对比模型性能。

摘要:

批内对比学习是一种先进的自监督方法,它在一个小批量内使语义相似的实例彼此靠近,同时使不相似的实例相互远离。其成功的关键是负样本共享策略,即每个实例都充当小批量内其他实例的负样本。近期研究试图通过在当前小批量内采样困难负样本来提升性能,但这些负样本的质量受限于小批量本身。在本工作中,我们提出通过从输入数据中采样小批量来改进对比学习。我们提出 BatchSampler,用于采样彼此难以区分(即互为困难且真实的负样本)的实例所构成的小批量。为使每个小批量具有更少的假负样本,我们设计了由随机选择实例构成的邻近图。为形成小批量,我们利用邻近图上的重启随机游走来帮助采样难以区分的实例。BatchSampler 是一种简单且通用的技术,可直接插入视觉、语言和图领域现有的对比学习模型。在三种模态数据集上的大量实验表明,BatchSampler 能够持续提升强大对比模型的性能,具体表现为 ImageNet-100 上的 SimCLR、STS(语言)上的 SimCSE,以及图数据集上的 GraphCL 和 MVGRL 均取得显著改进。代码位于 https://github.com/THUDM/BatchSampler。

英文摘要:

In-Batch contrastive learning is a state-of-the-art self-supervised method that brings semantically-similar instances close while pushing dissimilar instances apart within a mini-batch. Its key to success is the negative sharing strategy, in which every instance serves as a negative for the others within the mini-batch. Recent studies aim to improve performance by sampling hard negatives \textit{within the current mini-batch}, whose quality is bounded by the mini-batch itself. In this work, we propose to improve contrastive learning by sampling mini-batches from the input data. We present BatchSampler\footnote{The code is available at \url{https://github.com/THUDM/BatchSampler}} to sample mini-batches of hard-to-distinguish (i.e., hard and true negatives to each other) instances. To make each mini-batch have fewer false negatives, we design the proximity graph of randomly-selected instances. To form the mini-batch, we leverage random walk with restart on the proximity graph to help sample hard-to-distinguish instances. BatchSampler is a simple and general technique that can be directly plugged into existing contrastive learning models in vision, language, and graphs. Extensive experiments on datasets of three modalities show that BatchSampler can consistently improve the performance of powerful contrastive models, as shown by significant improvements of SimCLR on ImageNet-100, SimCSE on STS (language), and GraphCL and MVGRL on graph datasets.

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

↑