arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.12973cs.CVcs.AIcs.CLcs.LG
收藏

语言模型中的冻结Transformer是有效的视觉编码层

Frozen Transformers in Language Models Are Effective Visual Encoder Layers

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Ziqi Pang, Ziyang Xie, Yunze Man, Yu-Xiong Wang

AI总结:

本文提出将预训练大语言模型中的冻结Transformer块直接用作视觉编码层,在多种2D/3D视觉、时序及多模态任务上取得一致提升,并提出信息过滤假说解释其有效性。

摘要:

本文揭示了一个现象:尽管大语言模型(LLMs)仅基于文本数据训练,但在没有语言参与的情况下,它们对于纯视觉任务而言却是出人意料地强大的编码器。更令人感兴趣的是,这可以通过一种简单但此前被忽视的策略实现——采用预训练LLM中的一个冻结Transformer块作为组成编码层,直接处理视觉token。我们的工作拓展了利用LLM进行计算机视觉任务的边界,显著偏离了通常需要多模态视觉-语言设置以及相关语言提示、输入或输出的传统做法。我们证明,我们的方法在一系列多样化的任务上持续提升性能,涵盖纯2D和3D视觉识别任务(例如图像和点云分类)、时序建模任务(例如动作识别)、非语义任务(例如运动预测)以及多模态任务(例如2D/3D视觉问答和图像-文本检索)。这种改进是一种普遍现象,适用于各种类型的LLM(例如LLaMA和OPT)以及不同的LLM Transformer块。我们还提出了信息过滤假说,以解释预训练LLM在视觉编码中的有效性——预训练的LLM Transformer块能够辨别信息丰富的视觉token,并进一步放大其作用。这一假说得到了实证支持:在使用LLM Transformer块训练后,特征激活表现出对相关区域更强的关注。我们希望我们的工作能为利用LLM和加深对其底层机制的理解带来新的视角。代码可在 https://github.com/ziqipang/LM4VisualEncoding 获取。

英文摘要:

This paper reveals that large language models (LLMs), despite being trained solely on textual data, are surprisingly strong encoders for purely visual tasks in the absence of language. Even more intriguingly, this can be achieved by a simple yet previously overlooked strategy -- employing a frozen transformer block from pre-trained LLMs as a constituent encoder layer to directly process visual tokens. Our work pushes the boundaries of leveraging LLMs for computer vision tasks, significantly departing from conventional practices that typically necessitate a multi-modal vision-language setup with associated language prompts, inputs, or outputs. We demonstrate that our approach consistently enhances performance across a diverse range of tasks, encompassing pure 2D and 3D visual recognition tasks (e.g., image and point cloud classification), temporal modeling tasks (e.g., action recognition), non-semantic tasks (e.g., motion forecasting), and multi-modal tasks (e.g., 2D/3D visual question answering and image-text retrieval). Such improvements are a general phenomenon, applicable to various types of LLMs (e.g., LLaMA and OPT) and different LLM transformer blocks. We additionally propose the information filtering hypothesis to explain the effectiveness of pre-trained LLMs in visual encoding -- the pre-trained LLM transformer blocks discern informative visual tokens and further amplify their effect. This hypothesis is empirically supported by the observation that the feature activation, after training with LLM transformer blocks, exhibits a stronger focus on relevant regions. We hope that our work inspires new perspectives on utilizing LLMs and deepening our understanding of their underlying mechanisms. Code is available at https://github.com/ziqipang/LM4VisualEncoding.

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

↑