Linearly Mapping from Image to Text Space

Jack Merullo, Louis Castricato, Carsten Eickhoff, Ellie Pavlick

Overview

A long-standing debate in artificial intelligence is whether language models (LMs) trained exclusively on text can truly "understand" the physical world. Critics often argue that without "grounding"—interacting with the real, non-linguistic world—LMs are merely statistical parrots.

Previous work has shown that LMs can be taught to describe images by fine-tuning both a vision model and a language model together. However, researchers from Brown University have explored a much deeper hypothesis: Are the internal conceptual representations of a text-only LM and a vision-only model already structurally similar?

If these representation spaces are functionally equivalent, complex, non-linear neural networks shouldn't be necessary to connect them. A simple linear projection—a "straight line" translation—should be enough to let the LM "see" what the vision model is "looking at."

Methodology: The LiMBeR Approach

To test this hypothesis, the authors introduce LiMBeR (Linearly Mapping Between Representation spaces). The experimental setup is elegantly simple:

LiMBeR Architecture
  1. Freeze the Models: The researchers take a pretrained image encoder and a 6-billion parameter language model (GPT-J) and freeze their weights so they cannot change.
  2. The Linear Bridge: They insert a single linear projection layer between the two models. This layer’s only job is to take the high-dimensional vector from the image encoder and map it into the LM’s embedding space as a sequence of "soft prompts" (continuous vectors that the LM treats like words).
  3. Training: They train only that single linear layer on an image captioning task using the Conceptual Captions 3M (CC3M) dataset.

To understand what makes a good "visual-to-text" translation, the study compares three types of image encoders with varying degrees of linguistic exposure during pretraining:

  • BEIT: A pure vision model with zero exposure to language.
  • NF-ResNet: Trained on ImageNet, meaning it knows lexical categories (e.g., "this is a dog") but not full sentences.
  • CLIP: Pretrained specifically to align images with natural language descriptions.

Key Insights and Discoveries

Qualitative Results for Captioning and VQA
  • Structural Alignment: The fact that a linear map works at all is a significant breakthrough. It suggests that LMs and vision models organize concepts (like "dog" or "beach") in similar relative positions within their internal spaces, even when trained on completely different data modalities.
  • The "Linguistic Supervision" Gradient: The more language the vision model saw during its own training, the better it performed with LiMBeR. CLIP performed the best, but even the category-based NF-ResNet performed competitively with much more complex, jointly-tuned models like MAGMA.
  • BEIT’s "Vague" Vision: The vision-only model (BEIT) struggled to name specific objects (lexical categories) but was excellent at transferring "coarse visual properties." For example, it might not explicitly call a squirrel a "squirrel," but it would accurately describe it as a "small furry animal."
  • Taxonomic Mistakes: When the models made mistakes, they weren't random. If the LM misidentified an animal, it almost always chose one that was taxonomically similar (e.g., calling a dolphin a "whale" or a squirrel a "rabbit").

Quantitative Results

  • Competitive Performance: Despite its architectural simplicity, the CLIP-based LiMBeR achieved a 54.9 CIDEr score on MSCOCO captioning. In some configurations, it actually outperformed the more complex MAGMA model, which tunes significantly more parameters.
  • Zero-Shot VQA: The models could answer questions about images they hadn't seen during the linear layer training. CLIP-based LiMBeR achieved 40.34% accuracy on 4-shot Visual Question Answering (VQA2), nearly matching models specifically designed for multimodal tasks.
  • Property Transfer: In an analysis using the Animals With Attributes 2 (AWA2) dataset, even the vision-only BEIT model showed high "Wu-Palmer Similarity" (a measure of how close concepts are in a hierarchy). Its mistakes shared roughly 62% of the same physical properties as the correct animal, proving the LM was receiving meaningful visual information even without explicit labels.

Limitations and Future Work

The authors acknowledge a few hurdles in the current approach:

  • LM Runoff: Sometimes the language model gets "carried away." If it correctly identifies a "beach," its internal linguistic associations might cause it to hallucinate a "sandcastle" even if one isn't present in the image.
  • Prompt Length: Due to computational limits, the researchers didn't perfectly control for the number of "soft prompt" tokens across different encoders, which might slightly skew comparisons.
  • The Mechanism of Category Formation: While the paper proves that language helps vision models form better categories for LMs to use, exactly how language shapes these visual spaces remains a fertile ground for future research.

Ultimately, this paper provides a compelling argument that our "text-only" models might be much more grounded in the physical world than previously thought—we just needed the right linear lens to see it.

Summary updated

BibTeX
@inproceedings{merullo2023linearly,
  author = {Jack Merullo and Louis Castricato and Carsten Eickhoff and Ellie Pavlick},
  title = {{Linearly Mapping from Image to Text Space}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=8tYRqb05pVn},
}
Figure