arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.15162cs.CLcs.LG
收藏

图像到文本空间的线性映射

Linearly Mapping from Image to Text Space

Brown University(布朗大学)

Jack Merullo, Louis Castricato, Carsten Eickhoff, Ellie Pavlick

摘要:

纯文本语言模型(LM)在多大程度上学习表示非语言世界的特征是一个悬而未决的问题。先前的工作已经表明,当视觉模型的参数被优化以在语言空间中编码图像时,预训练的LM可以被教导为图像添加字幕。我们测试一个更强的假设:由冻结的纯文本模型和纯视觉模型学习的概念表示足够相似,以至于这可以用线性映射来实现。我们表明,从视觉模型的图像表示,可以作为连续的提示,冻结LM通过训练只有一个单一的线性投影。使用这些来提示LM在字幕和视觉问答任务上实现了与调整图像编码器和文本解码器的模型(例如MAGMA模型)相比具有竞争力的性能。我们比较了三种图像编码器,它们在预训练期间具有越来越多的语言监督:BEIT(无语言信息),NF-ResNET(词汇类别信息)和CLIP(完整的自然语言描述)。我们发现所有三个编码器在将视觉属性信息传递到语言模型(例如,动物是大还是小),但是用语言监督预训练的图像编码器更显著地编码类别信息(例如,区分河马和大象),因此在基准语言和视觉任务上表现得更好。我们的研究结果表明,LM编码概念信息的结构类似于基于视觉的模型,即使是那些只在图像上训练。代码可在这里:https://github.com/jmerullo/limber

英文摘要:

The extent to which text-only language models (LMs) learn to represent features of the non-linguistic world is an open question. Prior work has shown that pretrained LMs can be taught to caption images when a vision model's parameters are optimized to encode images in the language space. We test a stronger hypothesis: that the conceptual representations learned by frozen text-only models and vision-only models are similar enough that this can be achieved with a linear map. We show that the image representations from vision models can be transferred as continuous prompts to frozen LMs by training only a single linear projection. Using these to prompt the LM achieves competitive performance on captioning and visual question answering tasks compared to models that tune both the image encoder and text decoder (such as the MAGMA model). We compare three image encoders with increasing amounts of linguistic supervision seen during pretraining: BEIT (no linguistic information), NF-ResNET (lexical category information), and CLIP (full natural language descriptions). We find that all three encoders perform equally well at transferring visual property information to the language model (e.g., whether an animal is large or small), but that image encoders pretrained with linguistic supervision more saliently encode category information (e.g., distinguishing hippo vs. elephant) and thus perform significantly better on benchmark language-and-vision tasks. Our results indicate that LMs encode conceptual information structurally similarly to vision-based models, even those that are solely trained on images. Code is available here: https://github.com/jmerullo/limber

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

↑