针对密集描述检索中负样本相似度问题,提出自适应相似性边界方法提升性能。
Which Negatives Matter? Ask Your Text Encoder: Adaptive Similarity Margins for Dense-Caption Retrieval

- 利用文本编码器自身判断负样本相似度,动态调整每条负样本的相似性边界。
- 在四个基准上提升R@1达2.5至4.0,训练速度比GOAL快2.4倍、比StructXLIP快5.4倍。
- 无需额外数据或参数,仅用原始数据即可达到全量训练效果的90%以上。
密集描述检索近年通过引入分割、边缘图、LLM过滤描述和跨模态模块,在对比微调中取得进展。然而,这些方法大多沿用相同的InfoNCE目标函数,其优化在强预训练初始化下会过早饱和:在80%的批次中,损失值在首轮内降至10^-3以下,47%的测量中梯度数值为零。我们发现此现象与密集描述基准中大量近似重复描述密切相关——多数易分负样本已被分离后,少数高度相似负样本仍难区分。为此,我们提出HN-CLIP,利用文本编码器自身的文本-文本几何结构构建每个负样本的自适应相似性边界。具体而言,添加一个独立的描述相似性矩阵到负样本对数上,无需挖掘、合成或重采样负样本,即为更相似的描述分配更大边界。该目标仅需一个描述相似性矩阵和掩码对数加法,无辅助数据、额外参数、离线预处理或推理开销。在四个密集描述检索基准上的实验证明,HN-CLIP相较最强基线提升R@1达2.5至4.0,且训练速度分别比GOAL快2.4倍、比StructXLIP快5.4倍。此外,该目标在所有六种测试微调框架上均提升表现,并仅用20%训练数据即可达到全量数据基线的最强水平。
原文摘要 · Abstract (English)
Dense-caption retrieval has recently been improved by introducing segmentation, edge maps, LLM-filtered captions, and cross-modal modules into contrastive fine-tuning. However, these methods largely inherit the same InfoNCE objective, whose optimization can prematurely saturate under a strong pre-trained initialization: on dense captions, the loss falls below 10^-3 on 80% of batches within the first epoch, while its gradient becomes numerically zero in 47% of measurements. We find that this behavior is closely related to the large number of near-duplicate captions in dense-caption benchmarks, where a few highly similar negatives remain unresolved after the easy majority has already been separated. As a remedy, we introduce HN-CLIP, which uses the text encoder's own text-text geometry to construct per-negative adaptive similarity margins. Specifically, a detached caption-similarity matrix is added to the negative logits, assigning larger margins to more similar captions without mining, synthesizing, or resampling negatives. The resulting objective requires only one caption-similarity matrix and a masked logit addition during training, with no auxiliary data, additional parameters, offline preprocessing, or inference-time overhead. Extensive experiments on four dense-caption retrieval benchmarks show that HN-CLIP improves over the strongest competitors by +2.5 to +4.0 R@1 while training 2.4x faster than GOAL and 5.4x faster than StructXLIP. Moreover, the proposed objective improves all six tested fine-tuning frameworks on the in-domain benchmarks and reaches the strongest full-data baseline with only 20% of the training data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。