arXiv:2505.17844cs.CV2025-05

用哈希技术高效找难负样本,提升对比学习速度与效果

Locality-Sensitive Hashing for Efficient Hard Negative Sampling in Contrastive Learning

  • 通过局部敏感哈希将特征向量转为二进制,加速近邻搜索
  • 在多个文本与视觉数据集上性能相当或更优,计算量大幅降低
  • 适合大规模高维数据的对比学习,尤其对显卡加速友好

对比学习是一种表示学习范式,通过将数据映射到特征空间,并以类相似性为基础构建锚点与正负样本对来优化特征表示。难负样本(与锚点在特征空间中接近但属于不同类别)能显著提升学习性能。然而,在大规模、高维数据集中高效寻找高质量的难负样本仍具计算挑战。本文提出一种面向GPU的局部敏感哈希(LSH)方案,将实值特征向量量化为二进制表示,实现近似最近邻搜索。我们分析了其理论性质,并在多个文本和视觉数据集上进行了评估。结果表明,该方法在保持或超越现有硬负样本挖掘策略性能的同时,显著降低了计算开销。

原文摘要 · Abstract (English)

Contrastive learning is a representational learning paradigm in which a neural network maps data elements to feature vectors. It improves the feature space by forming lots with an anchor and examples that are either positive or negative based on class similarity. Hard negative examples, which are close to the anchor in the feature space but from a different class, improve learning performance. Finding such examples of high quality efficiently in large, high-dimensional datasets is computationally challenging. In this paper, we propose a GPU-friendly Locality-Sensitive Hashing (LSH) scheme that quantizes real-valued feature vectors into binary representations for approximate nearest neighbor search. We investigate its theoretical properties and evaluate it on several datasets from textual and visual domain. Our approach achieves comparable or better performance while requiring significantly less computation than existing hard negative mining strategies.

对比学习哈希搜索负样本挖掘

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