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

语言模型可以看到:在文本生成中插入可视控件

Language Models Can See: Plugging Visual Controls in Text Generation

University of Cambridge(剑桥大学);Tencent AI Lab(腾讯人工智能实验室);University of Trento(特伦托大学);DeepMind(深度思维);The University of Hong Kong(香港大学)

Yixuan Su, Tian Lan, Yahui Liu, Fangyu Liu, Dani Yogatama, Yan Wang, Lingpeng Kong, Nigel Collier

摘要:

生成式语言模型(LM),如GPT-2/3可以提示生成具有显着质量的文本。虽然它们是为文本提示生成而设计的,但如何通过图像等文本以外的方式指导生成过程仍然是一个悬而未决的问题。在这项工作中,我们提出了一个无训练的框架,称为MAGIC(iMAge引导的文本生成与CLIP),用于在生成过程中插入视觉控件,并使LM能够执行多模式任务(例如,图像描述)以零拍摄方式(zero-shot manner)。MAGIC是一个简单而有效的即插即用框架,它直接结合了现成的LM(即,GPT-2)和图像-文本匹配模型(即,CLIP)用于基于图像的文本生成。在解码过程中,MAGIC通过引入CLIP诱导的得分(称为魔术得分)来影响LM的生成,该得分将生成的结果规则化为与给定图像语义相关,同时与先前生成的上下文一致。值得注意的是,所提出的解码方案不涉及任何梯度更新操作,因此在计算上是高效的。在具有挑战性的zero-shot图像描述任务上,MAGIC以近27倍的解码加速比显著优于最先进的方法。MAGIC是一个灵活的框架,理论上与任何包含图像基础的文本生成任务兼容。在实验中,我们展示了它也能够在图像和文本提示下执行视觉接地故事生成。

英文摘要:

Generative language models (LMs) such as GPT-2/3 can be prompted to generate text with remarkable quality. While they are designed for text-prompted generation, it remains an open question how the generation process could be guided by modalities beyond text such as images. In this work, we propose a training-free framework, called MAGIC (iMAge-Guided text generatIon with CLIP), for plugging in visual controls in the generation process and enabling LMs to perform multimodal tasks (e.g., image captioning) in a zero-shot manner. MAGIC is a simple yet efficient plug-and-play framework, which directly combines an off-the-shelf LM (i.e., GPT-2) and an image-text matching model (i.e., CLIP) for image-grounded text generation. During decoding, MAGIC influences the generation of the LM by introducing a CLIP-induced score, called magic score, which regularizes the generated result to be semantically related to a given image while being coherent to the previously generated context. Notably, the proposed decoding scheme does not involve any gradient update operation, therefore being computationally efficient. On the challenging task of zero-shot image captioning, MAGIC outperforms the state-of-the-art method by notable margins with a nearly 27 times decoding speedup. MAGIC is a flexible framework and is theoretically compatible with any text generation tasks that incorporate image grounding. In the experiments, we showcase that it is also capable of performing visually grounded story generation given both an image and a text prompt.

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

↑