Skip to main content
QUICK REVIEW

[论文解读] LoopITR: Combining Dual and Cross Encoder Architectures for Image-Text Retrieval

Jie Lei, Xinlei Chen|arXiv (Cornell University)|Mar 10, 2022
Image Retrieval and Classification Techniques被引用 6
一句话总结

LoopITR 提出了一种统一架构,通过循环蒸馏机制联合训练双编码器和交叉编码器以实现图文检索:双编码器为交叉编码器提供难负样本,而交叉编码器的优化预测结果则反向蒸馏以改进双编码器。这种联合训练在 Flickr30K 和 COCO 数据集上实现了当前最优的双编码器性能,且额外开销极小。

ABSTRACT

Dual encoders and cross encoders have been widely used for image-text retrieval. Between the two, the dual encoder encodes the image and text independently followed by a dot product, while the cross encoder jointly feeds image and text as the input and performs dense multi-modal fusion. These two architectures are typically modeled separately without interaction. In this work, we propose LoopITR, which combines them in the same network for joint learning. Specifically, we let the dual encoder provide hard negatives to the cross encoder, and use the more discriminative cross encoder to distill its predictions back to the dual encoder. Both steps are efficiently performed together in the same model. Our work centers on empirical analyses of this combined architecture, putting the main focus on the design of the distillation objective. Our experimental results highlight the benefits of training the two encoders in the same network, and demonstrate that distillation can be quite effective with just a few hard negative examples. Experiments on two standard datasets (Flickr30K and COCO) show our approach achieves state-of-the-art dual encoder performance when compared with approaches using a similar amount of data.

研究动机与目标

  • 解决分别训练双编码器和交叉编码器所带来的局限性,该局限性阻碍了二者之间的性能互益。
  • 设计一种有效的蒸馏目标,将更具表达能力的交叉编码器的知识迁移至高效但表达能力较弱的双编码器。
  • 探究仅使用少量难负样本的蒸馏是否能显著提升双编码器的性能。
  • 评估蒸馏时机(预训练阶段 vs. 微调阶段)对检索性能的影响。
  • 比较不同教师模型(在线、离线、动量)在图文检索场景下的蒸馏表现。

提出的方法

  • 模型在单一网络中集成双编码器与交叉编码器,通过共享图像和文本编码器以提升效率。
  • 从双编码器的对比损失得分中在批次内挖掘难负样本,并用于训练交叉编码器。
  • 采用温度缩放的软标签损失,将交叉编码器的匹配得分蒸馏至双编码器的 logits。
  • 蒸馏目标同时利用图像和文本负样本构建更具信息量的教师分布,从而提升泛化能力。
  • 采用在线教师机制,无需额外的预训练或模型存储,显著降低内存与计算成本。
  • 在预训练和微调两个阶段均应用蒸馏,以最大化性能增益。

实验结果

研究问题

  • RQ1通过循环架构联合训练双编码器与交叉编码器,是否能相比孤立训练显著提升检索性能?
  • RQ2当仅使用少量难负样本时,从交叉编码器向双编码器进行知识蒸馏的效果如何?
  • RQ3在图文检索任务中,教师模型的选择(在线、离线、动量)是否显著影响蒸馏性能?
  • RQ4在预训练阶段、微调阶段或两者均应用蒸馏,哪种方式更有效?
  • RQ5在相似数据与计算预算下,一个采用在线蒸馏的统一模型能否超越现有最优的双编码器?

主要发现

  • 在使用交叉编码器重排序的情况下,LoopITR 在 Flickr30K 和 COCO 数据集上分别实现了 89.6 和 94.5 的 R@1,达到当前最优的双编码器性能。
  • 仅使用四个难负样本(两个图像和两个文本)的蒸馏,已足以显著提升双编码器性能。
  • 在线教师模型表现最佳,且无需额外模型存储或训练,显著降低了内存与计算成本。
  • 在预训练和微调两个阶段均应用蒸馏可获得最高性能增益,优于单阶段蒸馏。
  • 在蒸馏目标中同时使用图像和文本负样本,相比仅使用单一模态,能生成更鲁棒、更具信息量的软标签。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。