Skip to main content
QUICK REVIEW

[Paper Review] A Fistful of Words: Learning Transferable Visual Models from Bag-of-Words Supervision

Ajinkya Tejankar, Maziar Sanjabi|arXiv (Cornell University)|Dec 27, 2021
Multimodal Machine Learning ApplicationsComputer Science7 citations
TL;DR

This paper demonstrates that Bag-of-Words (BoW) captions—simplified, word-shuffled versions of natural language captions—can serve as effective supervision for training transferable visual models, achieving zero-shot image classification performance on par with models trained on full captions. By combining BoW supervision with word frequency balancing and self-supervised pseudo-captioning of unaligned images, the method achieves 31.5% top-1 accuracy on ImageNet-1k zero-shot, matching CLIP trained on 15M pairs with only 3M image-caption pairs.

ABSTRACT

Using natural language as a supervision for training visual recognition models holds great promise. Recent works have shown that if such supervision is used in the form of alignment between images and captions in large training datasets, then the resulting aligned models perform well on zero-shot classification as downstream tasks2. In this paper, we focus on teasing out what parts of the language supervision are essential for training zero-shot image classification models. Through extensive and careful experiments, we show that: 1) A simple Bag-of-Words (BoW) caption could be used as a replacement for most of the image captions in the dataset. Surprisingly, we observe that this approach improves the zero-shot classification performance when combined with word balancing. 2) Using a BoW pretrained model, we can obtain more training data by generating pseudo-BoW captions on images that do not have a caption. Models trained on images with real and pseudo-BoW captions achieve stronger zero-shot performance. On ImageNet-1k zero-shot evaluation, our best model, that uses only 3M image-caption pairs, performs on-par with a CLIP model trained on 15M image-caption pairs (31.5% vs 31.3%).

Motivation & Objective

  • To investigate which components of natural language supervision in image-caption pairs are essential for zero-shot visual classification.
  • To determine whether simplified, non-syntactic captions like Bag-of-Words (BoW) can replace full captions without degrading performance.
  • To explore methods for leveraging unaligned images—those without captions—by generating pseudo-BoW captions to expand training data.
  • To improve zero-shot generalization by combining real and pseudo-labeled data using a self-training-like framework.
  • To understand the robustness of vision-language models to linguistic structure and the role of text encoder invariance.

Proposed method

  • Deform full captions into Bag-of-Words (BoW) by shuffling word order, removing words based on position or frequency, or using limited vocabularies.
  • Use unimodal self-supervised pretraining: BYOL for vision encoders and BERT for text encoders to improve robustness to input perturbations.
  • Apply word frequency balancing to reduce overrepresentation of common words in BoW captions, improving model generalization.
  • Generate pseudo-BoW captions for unaligned images by retrieving nearest captions from a contrastive dictionary and filtering top words.
  • Train a final vision-language model on a semi-aligned dataset combining real image-caption pairs and pseudo-labeled unaligned images.
  • Use contrastive loss between image and text embeddings during pretraining to align modalities, similar to CLIP.

Experimental results

Research questions

  • RQ1Can Bag-of-Words (BoW) captions, stripped of syntactic structure, serve as effective supervision for training zero-shot visual recognition models?
  • RQ2Does word frequency balancing in BoW captions improve zero-shot performance compared to unbalanced BoW or full captions?
  • RQ3Can models trained on BoW captions generalize as well as those trained on full captions in zero-shot image classification?
  • RQ4To what extent can unaligned images be leveraged to improve model performance using pseudo-BoW captioning?
  • RQ5How does the architecture of the text encoder contribute to invariance against input deformations like word shuffling?

Key findings

  • Training with BoW captions instead of full captions results in comparable zero-shot performance: 30.1% top-1 accuracy on ImageNet-1k, versus 29.5% for full captions.
  • Applying word frequency balancing to BoW captions improves zero-shot accuracy to 30.1%, outperforming both unbalanced BoW and full captions.
  • A model trained on only 3 million image-caption pairs using BoW supervision achieves 31.5% top-1 accuracy on ImageNet-1k zero-shot, matching CLIP trained on 15 million pairs (31.3%).
  • Pseudo-captioning unaligned images using nearest-neighbor retrieval and BoW filtering improves performance, demonstrating the viability of semi-aligned learning.
  • The use of self-supervised pretraining (BYOL and BERT) enables the model to remain robust to linguistic deformations like word shuffling.
  • Despite promising gains, semi-aligned learning yields limited improvements in some settings, indicating it remains a challenging setup compared to fully supervised or semi-supervised learning.

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.