Linearly Mapping from Image to Text Space
Jack Merullo, Louis Castricato, Carsten Eickhoff, Ellie Pavlick
Abstract
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 NFRN50 Tuned : my motorcycle MAGMA (Ours) : my bike MAGMA (Rel.) : a 1973 Honda CB750 NFRN Random: the car on the road BEIT: the bike.' NFRN50: a motorcycle on a motorcycle. CLIP: my motorcycle. Ground Truth: A bicycle is standing next to a bed in a room. NFRN50 Tuned : my bike with a basket. MAGMA (Ours) : my bike MAGMA (Rel.) : a vintage bike vintage bike NFRN Random: a young boy in a blue shirt and a red hat on a bicycle BEIT: the bike. NFRN50: my bicycle with a basket on the front. CLIP: my bike, which is a fixed gear bike. Ground Truth: A man riding a wave on top of a white surfboard. NFRN50 Tuned : a surfer in the water MAGMA (Ours) : a surfer riding a wave. MAGMA (Rel.) : a surfer riding a wave NFRN Random: the view from the top of the mountain BEIT: a surfer riding a wave. NFRN50: a surfer in the water. CLIP: a surfer riding a wave. Ground Truth: A person standing on top of a beach flying a kite. NFRN50 Tuned : a man standing on the beach with a surfboard. MAGMA (Ours) : a kite on a beach. MAGMA (Rel.) : a man running on the beach NFRN Random: the new car in the garage BEIT: a man standing on a rock in the sea. NFRN50: a man surfing on the beach. CLIP: a man flying a kite on the beach. Ground Truth: A lady explains the process of milking a cow. NFRN50 Tuned : a horse and rider at the fair. MAGMA (Ours) : a woman on a stage with kids in the audience. MAGMA (Rel.) : a woman milking a cow in front of a group of children. NFRN Random: the new restaurant. BEIT: the crowd at the event. NFRN50: a crowd of people at a festival CLIP: the dairy cows. Ground Truth: A woman is taking notes in front of her laptop NFRN50 Tuned : the man who was shot and killed in the lobby of the building. MAGMA (Ours) : a student studying. MAGMA (Rel.) : a student working on a paper NFRN Random: the man who was killed in the attack. BEIT: the room where the meeting took place. NFRN50: the room where the meeting took place. CLIP: a student working on his laptop. Ground Truth: A couple of men standing on top of a field together. NFRN50 Tuned : the team before the match MAGMA (Ours) : men playing a game of sport. MAGMA (Rel.) : a men's lacrosse game at the University of New England NFRN Random: the new home of the football team BEIT: football player and football player during a training session. NFRN50: the team before the game. CLIP: the team during a practice session.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b00c79ac-f06b-4de5-89a2-3422bbb879eaCited by top-tier papers67
- Muse: Text-To-Image Generation via Masked Generative TransformersHuiwen Chang, Han Zhang, Jarred Barber, Aaron Maschinot et al.ICML 2023 · 751 citations
- Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language ModelsAsma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon et al.ICML 2024 · 197 citations
- Grounding Language Models to Images for Multimodal Inputs and OutputsJing Yu Koh, Ruslan Salakhutdinov, Daniel FriedICML 2023 · 160 citations
- Interpreting CLIP with Sparse Linear Concept Embeddings (SpLiCE)Usha Bhalla, Alex Oesterling, Suraj Srinivas, Flávio P. Calmon et al.NeurIPS 2024 · 146 citations
- AntGPT: Can Large Language Models Help Long-term Action Anticipation from Videos?Qi Zhao, Shijie Wang, Ce Zhang, Changcheng Fu et al.ICLR 2024 · 93 citations
Builds on19
- 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
- Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech et al.NeurIPS 2022 · 6,707 citations
- BEiT: BERT Pre-Training of Image TransformersHangbo Bao, Li Dong, Songhao Piao, Furu WeiICLR 2022 · 3,632 citations
- Multimodal Few-Shot Learning with Frozen Language ModelsMaria Tsimpoukelli, Jacob Menick, Serkan Cabi, S. M. Ali Eslami et al.NeurIPS 2021 · 1,020 citations
Related papers
- Bridging Vision and Language Spaces with Assignment PredictionJungin Park, Jiyoung Lee, Kwanghoon SohnICLR 2024 · 15 citations
- Frozen Transformers in Language Models Are Effective Visual Encoder LayersZiqi Pang, Ziyang Xie, Yunze Man, Yu-Xiong WangICLR 2024 · 54 citations
- How Much Can CLIP Benefit Vision-and-Language Tasks?Sheng Shen, Liunian Harold Li, Hao Tan, Mohit Bansal et al.ICLR 2022 · 503 citations
- CLIP Models are Few-Shot Learners: Empirical Studies on VQA and Visual EntailmentHaoyu Song, Li Dong, Weinan Zhang, Ting Liu et al.ACL 2022
- ASIF: Coupled Data Turns Unimodal Models to Multimodal without TrainingAntonio Norelli, Marco Fumero, Valentino Maiorca, Luca Moschella et al.NeurIPS 2023 · 57 citations
