arXiv:2505.11293cs.CV2025-05NeurIPS被引 29

通过智能构造批次,让对比学习在小批量下也能高效训练。

Breaking the Batch Barrier (B3) of Contrastive Learning via Smart Batch Mining

  • 用预训练模型构建稀疏相似图,识别可作强负例的样本聚类。
  • 在7B和2B模型上分别提升1.3和2.9点,刷新多模态基准记录。
  • 仅需64小批量即可超越大批次方法,适合资源受限场景。

对比学习(CL)通过拉近语义相似样本、推远不相似样本来训练嵌入模型。其中,批次内的其他样本常作为负例,其质量与规模直接影响模型效果。本文提出B3(Breaking the Batch Barrier),一种新型批次构建策略:先用预训练教师模型对数据集所有样本排序,构建稀疏相似图,再通过社区检测算法识别互为强负例的样本簇,并据此构造富含批次内负例的高质量批次。在包含36项任务的MMEB多模态嵌入基准测试中,该方法在7B和2B模型尺度上分别领先前人最佳结果1.3和2.9点。值得注意的是,使用仅64的小批量即可超越其他需4-16倍大批次的方法。实验还表明,B3在不同领域和任务间具有强泛化能力,即使采用较弱教师模型仍保持优异表现。

原文摘要 · Abstract (English)

Contrastive learning (CL) is a prevalent technique for training embedding models, which pulls semantically similar examples (positives) closer in the representation space while pushing dissimilar ones (negatives) further apart. A key source of negatives are 'in-batch' examples, i.e., positives from other examples in the batch. Effectiveness of such models is hence strongly influenced by the size and quality of training batches. In this work, we propose 'Breaking the Batch Barrier' (B3), a novel batch construction strategy designed to curate high-quality batches for CL. Our approach begins by using a pretrained teacher embedding model to rank all examples in the dataset, from which a sparse similarity graph is constructed. A community detection algorithm is then applied to this graph to identify clusters of examples that serve as strong negatives for one another. The clusters are then used to construct batches that are rich in in-batch negatives. Empirical results on the MMEB multimodal embedding benchmark (36 tasks) demonstrate that our method sets a new state of the art, outperforming previous best methods by +1.3 and +2.9 points at the 7B and 2B model scales, respectively. Notably, models trained with B3 surpass existing state-of-the-art results even with a batch size as small as 64, which is 4-16x smaller than that required by other methods. Moreover, experiments show that B3 generalizes well across domains and tasks, maintaining strong performance even when trained with considerably weaker teachers.

对比学习小批量训练智能采样多模态嵌入

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。