arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.02096cs.CVcs.AI
收藏

基于知识蒸馏的可视化语言模型压缩

Compressing Visual-linguistic Model via Knowledge Distillation

Arizona State University(亚利桑那州立大学);Microsoft Corporation(微软公司)

Zhiyuan Fang, Jianfeng Wang, Xiaowei Hu, Lijuan Wang, Yezhou Yang, Zicheng Liu

摘要:

尽管在视觉语言(VL)表示的预训练方面取得了令人兴奋的进展,但很少有人渴望小型VL模型。在本文中,我们研究知识蒸馏(KD),有效地压缩一个基于transformer的大VL模型到一个小VL模型。主要挑战来自于从教师和学生的不同检测器中提取的区域视觉标记不一致,导致隐藏表示和注意力分布不一致。为了解决这个问题,我们重新训练和适应教师使用相同的区域建议从学生的检测器,而功能是从教师自己的对象检测器。通过对齐的网络输入,适应的教师能够通过中间表示来传递知识。具体来说,我们使用均方误差损失来模仿Transformer块内的注意力分布,并通过与存储在样本队列中的负表示进行对比,提出了一种令牌噪声对比损失来对齐隐藏状态。为此,我们表明,我们提出的蒸馏显着提高性能的小VL模型的图像描述和视觉问答任务。它在COCO字幕上的CIDEr得分达到120.8,比其非蒸馏对应物提高了5.1;在VQA 2.0上的准确度为69.8,比基线提高了0.8。我们广泛的实验和烧蚀证实了VL蒸馏在预训练和微调阶段的有效性。

英文摘要:

Despite exciting progress in pre-training for visual-linguistic (VL) representations, very few aspire to a small VL model. In this paper, we study knowledge distillation (KD) to effectively compress a transformer-based large VL model into a small VL model. The major challenge arises from the inconsistent regional visual tokens extracted from different detectors of Teacher and Student, resulting in the misalignment of hidden representations and attention distributions. To address the problem, we retrain and adapt the Teacher by using the same region proposals from Student's detector while the features are from Teacher's own object detector. With aligned network inputs, the adapted Teacher is capable of transferring the knowledge through the intermediate representations. Specifically, we use the mean square error loss to mimic the attention distribution inside the transformer block and present a token-wise noise contrastive loss to align the hidden state by contrasting with negative representations stored in a sample queue. To this end, we show that our proposed distillation significantly improves the performance of small VL models on image captioning and visual question answering tasks. It reaches 120.8 in CIDEr score on COCO captioning, an improvement of 5.1 over its non-distilled counterpart; and an accuracy of 69.8 on VQA 2.0, a 0.8 gain from the baseline. Our extensive experiments and ablations confirm the effectiveness of VL distillation in both pre-training and fine-tuning stages.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑