Probing Text Models for Common Ground with Visual Representations

Gabriel Ilharco, Rowan Zellers, Ali Farhadi, Hannaneh HajishirziarXiv 2020

Introduction

Large-scale language models (LMs) trained on vast text corpora demonstrate remarkable linguistic capabilities. However, a persistent question remains: do these text-only models possess "grounding"—a connection between abstract symbols and the physical, visual world? This research investigates whether models like BERT implicitly learn the visual properties of objects through textual context alone.

Methodology: The Probing Framework

To quantify visual knowledge within LMs, the researchers developed a lightweight probing mechanism. The probe consists of a shallow neural network (a single-layer LSTM followed by a linear projection) designed to map a frozen LM's text representation to a corresponding visual feature space.

The probing framework maps contextual text representations to visual feature vectors to identify matching image patches.

Visual ground truth was established using a pre-trained Faster R-CNN to extract high-dimensional feature vectors from image patches in the MS-COCO and Flickr30k datasets. The probe was trained using InfoNCE loss, a contrastive learning objective that encourages the model to maximize similarity between matching text-image pairs while minimizing it for mismatched pairs.

Key Insights: The Role of Context

A central finding of the study is that context is the primary driver of visual alignment. Contextual models like BERT significantly outperform static embeddings (e.g., GloVe). When surrounding context is removed, BERT's performance drops to baseline levels, suggesting that the model uses sentence structure to refine its internal "mental image" of an object.

Qualitative examples showing how specific context and adjectives allow the model to retrieve more relevant visual patches.

Furthermore, descriptive adjectives (e.g., "black," "sleeping") directly improve retrieval accuracy. The LM effectively leverages these modifiers to narrow the visual search space, demonstrating a nuanced understanding of how linguistic descriptors map to visual attributes.

Results and the "Human Gap"

Quantitatively, BERT-base achieved an Instance Retrieval at 1 (IR@1) of 12%, compared to just 5% for GloVe. For broader category retrieval (e.g., finding any "cat"), BERT reached approximately 88% accuracy.

Despite these successes, a significant "human gap" persists. In head-to-head tests, humans achieved 76% accuracy in matching text to image patches, while the best-performing multimodal model (ViLBERT) reached 53%, and BERT-base reached 43%. Interestingly, text-only models were nearly as effective as those explicitly trained on images, suggesting that text-only pre-training is surprisingly robust at capturing visual common ground.

Conclusion

This research demonstrates that contextual language models encode a wealth of visual information derived solely from text. While they still lag behind human intuition, the alignment between text and vision is inherent in the structure of language. Future work should explore more integrated pre-training methods to bridge the remaining gap between linguistic representations and visual reality.

Summary updated

BibTeX
@misc{ilharco2020probing,
  author = {Gabriel Ilharco and Rowan Zellers and Ali Farhadi and Hannaneh Hajishirzi},
  title = {{Probing Text Models for Common Ground with Visual Representations}},
  year = {2020},
  eprint = {2005.00619},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.00619},
}
Figure