How to Make Cross Encoder a Good Teacher for Efficient Image-Text Retrieval?

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Chen, Yuxin, Ma, Zongyang, Zhang, Ziqi, Qi, Zhongang, Yuan, Chunfeng, Li, Bing, Pu, Junfu, Shan, Ying, Qi, Xiaojuan, Hu, Weiming
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910521380306944
author Chen, Yuxin
Ma, Zongyang
Zhang, Ziqi
Qi, Zhongang
Yuan, Chunfeng
Li, Bing
Pu, Junfu
Shan, Ying
Qi, Xiaojuan
Hu, Weiming
author_facet Chen, Yuxin
Ma, Zongyang
Zhang, Ziqi
Qi, Zhongang
Yuan, Chunfeng
Li, Bing
Pu, Junfu
Shan, Ying
Qi, Xiaojuan
Hu, Weiming
contents Dominant dual-encoder models enable efficient image-text retrieval but suffer from limited accuracy while the cross-encoder models offer higher accuracy at the expense of efficiency. Distilling cross-modality matching knowledge from cross-encoder to dual-encoder provides a natural approach to harness their strengths. Thus we investigate the following valuable question: how to make cross-encoder a good teacher for dual-encoder? Our findings are threefold:(1) Cross-modal similarity score distribution of cross-encoder is more concentrated while the result of dual-encoder is nearly normal making vanilla logit distillation less effective. However ranking distillation remains practical as it is not affected by the score distribution.(2) Only the relative order between hard negatives conveys valid knowledge while the order information between easy negatives has little significance.(3) Maintaining the coordination between distillation loss and dual-encoder training loss is beneficial for knowledge transfer. Based on these findings we propose a novel Contrastive Partial Ranking Distillation (CPRD) method which implements the objective of mimicking relative order between hard negative samples with contrastive learning. This approach coordinates with the training of the dual-encoder effectively transferring valid knowledge from the cross-encoder to the dual-encoder. Extensive experiments on image-text retrieval and ranking tasks show that our method surpasses other distillation methods and significantly improves the accuracy of dual-encoder.
format Preprint
id arxiv_https___arxiv_org_abs_2407_07479
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle How to Make Cross Encoder a Good Teacher for Efficient Image-Text Retrieval?
Chen, Yuxin
Ma, Zongyang
Zhang, Ziqi
Qi, Zhongang
Yuan, Chunfeng
Li, Bing
Pu, Junfu
Shan, Ying
Qi, Xiaojuan
Hu, Weiming
Computer Vision and Pattern Recognition
Dominant dual-encoder models enable efficient image-text retrieval but suffer from limited accuracy while the cross-encoder models offer higher accuracy at the expense of efficiency. Distilling cross-modality matching knowledge from cross-encoder to dual-encoder provides a natural approach to harness their strengths. Thus we investigate the following valuable question: how to make cross-encoder a good teacher for dual-encoder? Our findings are threefold:(1) Cross-modal similarity score distribution of cross-encoder is more concentrated while the result of dual-encoder is nearly normal making vanilla logit distillation less effective. However ranking distillation remains practical as it is not affected by the score distribution.(2) Only the relative order between hard negatives conveys valid knowledge while the order information between easy negatives has little significance.(3) Maintaining the coordination between distillation loss and dual-encoder training loss is beneficial for knowledge transfer. Based on these findings we propose a novel Contrastive Partial Ranking Distillation (CPRD) method which implements the objective of mimicking relative order between hard negative samples with contrastive learning. This approach coordinates with the training of the dual-encoder effectively transferring valid knowledge from the cross-encoder to the dual-encoder. Extensive experiments on image-text retrieval and ranking tasks show that our method surpasses other distillation methods and significantly improves the accuracy of dual-encoder.
title How to Make Cross Encoder a Good Teacher for Efficient Image-Text Retrieval?
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2407.07479