Frozen Transformers in Language Models Are Effective Visual Encoder Layers
Ziqi Pang, Ziyang Xie, Yunze Man, Yu-Xiong Wang
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
14 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene Understanding cites Emerging Properties in Self-Supervised Vision Transformers
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene Understanding cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene Understanding cites BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene Understanding cites Language Models are Few-Shot Learners
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene Understanding cites Learning Transferable Visual Models From Natural Language Supervision
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- Mobility-LLM: Learning Visiting Intentions and Travel Preference from Human Mobility Data with Large Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-training cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-training cites BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
- Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-training cites Learning Transferable Visual Models From Natural Language Supervision
- BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models cites Language Models are Few-Shot Learners
- Prior Knowledge Integration via LLM Encoding and Pseudo Event Regulation for Video Moment Retrieval cites BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
- Prior Knowledge Integration via LLM Encoding and Pseudo Event Regulation for Video Moment Retrieval cites Learning Transferable Visual Models From Natural Language Supervision
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Transferable Visual Models From Natural Language Supervision cites Language Models are Few-Shot Learners
- Learning Modality Knowledge Alignment for Cross-Modality Transfer cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Modality Knowledge Alignment for Cross-Modality Transfer cites Language Models are Few-Shot Learners
- Learning Modality Knowledge Alignment for Cross-Modality Transfer cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers14
- Mobility-LLM: Learning Visiting Intentions and Travel Preference from Human Mobility Data with Large Language ModelsLetian Gong, Yan Lin, Xinyue Zhang, Yiwen Lu et al.NeurIPS 2024 · 59 citations
- Lexicon3D: Probing Visual Foundation Models for Complex 3D Scene UnderstandingYunze Man, Shuhong Zheng, Zhipeng Bao, Martial Hebert et al.NeurIPS 2024 · 56 citations
- Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-trainingJunlin Han, Shengbang Tong, David Fan, Yufan Ren et al.ICLR 2026 · 25 citations
- Prior Knowledge Integration via LLM Encoding and Pseudo Event Regulation for Video Moment RetrievalYiyang Jiang, Wengyu Zhang, Xulu Zhang, Xiaoyong Wei et al.ACM MM 2024 · 21 citations
- Learning Modality Knowledge Alignment for Cross-Modality TransferWenxuan Ma, Shuang Li, Lincan Cai, Jingxuan KangICML 2024 · 10 citations
Builds on37
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
- BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language ModelsJunnan Li, Dongxu Li, Silvio Savarese, Steven C. H. HoiICML 2023 · 7,873 citations
Related papers
- Bridging Vision and Language Spaces with Assignment PredictionJungin Park, Jiyoung Lee, Kwanghoon SohnICLR 2024 · 15 citations
- Multi-modal Auto-regressive Modeling via Visual TokensTianshuo Peng, Zuchao Li, Lefei Zhang, Hai Zhao et al.ACM MM 2024 · 1 citation
- Linearly Mapping from Image to Text SpaceJack Merullo, Louis Castricato, Carsten Eickhoff, Ellie PavlickICLR 2023 · 25 citations
- Implicit Multimodal Alignment: On the Generalization of Frozen LLMs to Multimodal InputsMustafa Shukor, Matthieu CordNeurIPS 2024 · 27 citations
- Seeing to Generalize: How Visual Data Corrects Binding ShortcutsNicolas Buzeta, Felipe del Rio, Cristian Hinostroza, Denis Parra et al.ICML 2026 · 1 citation
