抑制图文匹配中梯度消失的选择性硬否定挖掘
Selectively Hard Negative Mining for Alleviating Gradient Vanishing in Image-Text Matching
摘要:
近年来,一系列的图文匹配方法取得了令人瞩目的成绩。然而,我们观察到,大多数现有的ITM模型在训练开始时都存在梯度消失的问题,这使得这些模型容易陷入局部极小值。大多数ITM模型采用三重态损失,硬负挖掘(HN)作为优化目标。我们发现,优化ITM模型只使用硬负样本很容易导致梯度消失。在本文中,我们推导出在训练过程中梯度为零的条件。当正对相似性和负对相似性之间的差接近0时,图像和文本编码器上的梯度都将接近0。为了缓解梯度消失问题,我们提出了一种选择性硬负挖掘(SelHN)策略,该策略根据梯度消失条件选择是否挖掘硬负样本。SelHN可以即插即用应用于现有的ITM模型,以提供更好的训练行为。为了进一步确保梯度的反向传播,我们使用SelHN构建了一个剩余视觉语义嵌入模型,表示为RVSE++。在两个ITM基准上进行的大量实验证明了RVSE++的实力,实现了最先进的性能。
英文摘要:
Recently, a series of Image-Text Matching (ITM) methods achieve impressive performance. However, we observe that most existing ITM models suffer from gradients vanishing at the beginning of training, which makes these models prone to falling into local minima. Most ITM models adopt triplet loss with Hard Negative mining (HN) as the optimization objective. We find that optimizing an ITM model using only the hard negative samples can easily lead to gradient vanishing. In this paper, we derive the condition under which the gradient vanishes during training. When the difference between the positive pair similarity and the negative pair similarity is close to 0, the gradients on both the image and text encoders will approach 0. To alleviate the gradient vanishing problem, we propose a Selectively Hard Negative Mining (SelHN) strategy, which chooses whether to mine hard negative samples according to the gradient vanishing condition. SelHN can be plug-and-play applied to existing ITM models to give them better training behavior. To further ensure the back-propagation of gradients, we construct a Residual Visual Semantic Embedding model with SelHN, denoted as RVSE++. Extensive experiments on two ITM benchmarks demonstrate the strength of RVSE++, achieving state-of-the-art performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。