arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.00409cs.CV
收藏

通过动态视觉提示(Dynamic Visual Prompting)使预训练语言模型适配视觉-语言任务

Adapting Pre-trained Language Models to Vision-Language Tasks via Dynamic Visual Prompting

Xiamen University(厦门大学);NetEase Inc.(网易公司)

Shubin Huang, Qiong Wu, Yiyi Zhou, Weijie Chen, Rongsheng Zhang, Xiaoshuai Sun, Rongrong Ji

AI总结:

针对预训练语言模型用于视觉-语言任务需额外融合网络、内存开销大的问题,提出动态视觉提示方法DVP,通过交叉注意力生成紧凑视觉提示、强化学习寻优放置位置,结合适配器实现高效适配,在多个基准上验证了性能与效率优势。

摘要:

预训练语言模型(PLMs)在多媒体研究中发挥着越来越重要的作用。在视觉-语言(VL)任务中,它们通常充当语言编码器,且仍需要额外的融合网络来进行视觉-语言推理,这导致了过高的内存开销。在本文中,我们聚焦于探索将预训练语言模型作为视觉-语言推理任务的独立模型使用。受近期流行的提示调优(prompt tuning)启发,我们首先证明,经过处理的视觉特征也可以投影到预训练语言模型的语义空间中,并作为提示标记(prompt tokens)来弥合单模态学习与多模态学习之间的差距。然而,该方案在视觉信息和模型推理方面存在明显的冗余,且提示标记的放置位置也会极大地影响最终性能。基于这些观察,我们进一步提出了一种适用于预训练语言模型的新型迁移学习方法,称为动态视觉提示(Dynamic Visual Prompting,DVP)。具体而言,DVP首先部署一个交叉注意力模块,以获取与文本相关的紧凑视觉提示标记,从而大幅缩短预训练语言模型的输入长度。为了获得最优放置位置,我们还为DVP配备了一种基于强化学习的搜索算法,该算法能够通过极短的搜索过程,自动将DVP与预训练语言模型融合以适配不同的视觉-语言任务。此外,我们还将DVP与近期流行的适配器(adapter)方法结合进行实验,以在适配视觉-语言任务时保留预训练语言模型的大部分参数不变,帮助预训练语言模型在单模态任务与多模态任务之间实现快速切换。我们将DVP应用于两种具有代表性的预训练语言模型,即BERT和T5,并在包括VQA2.0、GQA和SNLIVE在内的一组视觉-语言推理基准上开展了大量实验。实验结果不仅展现了DVP在效率和性能上的优势,也证实了其在使预训练语言模型适配视觉-语言任务方面的优越性。

英文摘要:

Pre-trained language models (PLMs) have played an increasing role in multimedia research. In terms of vision-language (VL) tasks, they often serve as a language encoder and still require an additional fusion network for VL reasoning, resulting in excessive memory overhead. In this paper, we focus on exploring PLMs as a stand-alone model for VL reasoning tasks. Inspired by the recently popular prompt tuning, we first prove that the processed visual features can be also projected onto the semantic space of PLMs and act as prompt tokens to bridge the gap between single- and multi-modal learning. However, this solution exhibits obvious redundancy in visual information and model inference, and the placement of prompt tokens also greatly affects the final performance. Based on these observations, we further propose a novel transfer learning approach for PLMs, termed Dynamic Visual Prompting (DVP). Concretely, DVP first deploys a cross-attention module to obtain text-related and compact visual prompt tokens, thereby greatly reducing the input length of PLMs. To obtain the optimal placement, we also equip DVP with a reinforcement-learning based search algorithm, which can automatically merge DVP with PLMs for different VL tasks via a very short search process. In addition, we also experiment DVP with the recently popular adapter approach to keep the most parameters of PLMs intact when adapting to VL tasks, helping PLMs achieve a quick shift between single- and multi-modal tasks. We apply DVP to two representative PLMs, namely BERT and T5, and conduct extensive experiments on a set of VL reasoning benchmarks including VQA2.0, GQA and SNLIVE. The experimental results not only show the advantage of DVP on efficiency and performance, but also confirm its superiority in adapting pre-trained language models to VL tasks.

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

↑