Skip to main content
QUICK REVIEW

[Paper Review] Linearly Mapping from Image to Text Space

Jack Merullo, Louis Castricato|arXiv (Cornell University)|Sep 30, 2022
Multimodal Machine Learning ApplicationsComputer Science25 citations
TL;DR

The paper shows that a single linear projection can map image representations into a frozen language model’s input space to generate captions and answer questions, achieving competitive vision-language performance without tuning the LM or image encoder.performance depends on the linguistic supervision of the image encoder during pretraining.

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

Motivation & Objective

  • Test whether frozen text-only LMs can describe images when fed with linearly mapped image representations (soft prompts).
  • Investigate how different image encoders with varying linguistic supervision transfer visual concepts to the LM.
  • Compare LiMBeR with jointly-tuned multimodal baselines to assess the necessity of end-to-end tuning.

Proposed method

  • Train a single linear projection P from image encoder representations to the LM input space to create image prompts.
  • Freeze both the image encoder E and the language model LM while training P on an image captioning objective.
  • Evaluate transfer by prompting the LM to generate captions and answer questions on VL tasks without LM or encoder fine-tuning.
  • Test multiple encoders with different pretraining linguistic supervision: CLIP RN50x16, NF-ResNet50, BEIT-Large (and variants).
  • Use Conceptual Captions 3M for training; compare to baselines including MAGMA and NFRN50 variants.

Experimental results

Research questions

  • RQ1Can a linear mapping between image encoders and a frozen LM support accurate image captioning and VQA without updating LM or encoder weights?
  • RQ2How does the amount of linguistic supervision in the image encoder pretraining affect transfer to the LM?
  • RQ3Is the representational similarity between vision and language spaces sufficient for effective zero-shot transfer across encoders?
  • RQ4What errors and limitations arise when transferring visual information through linear prompts from different encoders?

Key findings

  • A linear projection can transfer visual information to a frozen LM to generate captions and answer questions with competitive performance.
  • Performance correlates with the linguistic supervision of the image encoder; CLIP and NF-ResNet50 outperform BEIT on many VL tasks, though BEIT still transfers coarse perceptual information.
  • Finetuning the image encoder or LM is not consistently beneficial compared to training only the linear projection (LiMBeR baseline).
  • Linguistically supervised encoders enable transfer of lexical category concepts, while vision-only encoders mainly convey coarse perceptual information.
  • BEIT prompts tend to produce vaguer captions and struggle with precise lexical categorization but still convey perceptual similarity to the LM.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.