Skip to main content
QUICK REVIEW

[Paper Review] Proto-CLIP: Vision-Language Prototypical Network for Few-Shot Learning

Jishnu Jaykumar P, Kamalesh Palanisamy|arXiv (Cornell University)|Jul 6, 2023
Domain Adaptation and Few-Shot LearningComputer Science9 citations
TL;DR

Proto-CLIP combines image and text prototypes from a frozen CLIP backbone, learning adapters and memories to align image and text prototypes for improved few-shot classification.

ABSTRACT

We propose a novel framework for few-shot learning by leveraging large-scale vision-language models such as CLIP. Motivated by unimodal prototypical networks for few-shot learning, we introduce Proto-CLIP which utilizes image prototypes and text prototypes for few-shot learning. Specifically, Proto-CLIP adapts the image and text encoder embeddings from CLIP in a joint fashion using few-shot examples. The embeddings from the two encoders are used to compute the respective prototypes of image classes for classification. During adaptation, we propose aligning the image and text prototypes of the corresponding classes. Such alignment is beneficial for few-shot classification due to the reinforced contributions from both types of prototypes. Proto-CLIP has both training-free and fine-tuned variants. We demonstrate the effectiveness of our method by conducting experiments on benchmark datasets for few-shot learning, as well as in the real world for robot perception. The project page is available at https://irvlutd.github.io/Proto-CLIP

Motivation & Objective

  • Motivate few-shot learning by leveraging large vision-language models (CLIP) to recognize novel objects from few examples in robotics and general vision tasks.
  • Propose a joint image-text prototypical framework that adapts CLIP encoders using few-shot data.
  • Improve few-shot classification by aligning image prototypes and text prototypes for each class.
  • Evaluate Proto-CLIP on standard few-shot benchmarks and FewSOL, including real-world robotic perception experiments.

Proposed method

  • Use both CLIP image and text encoders to form class prototypes: image prototypes c_k^x and text prototypes c_k^y computed from adapted embeddings.
  • Adapt CLIP via a learnable image memory, text memory, and an adapter network applied to query images, while keeping CLIP encoders frozen.
  • Compute class-conditioned probabilities as a convex combination of image-based and text-based predictions: P(y=k|x^q,S) = alpha P(y=k|x^q,S_x) + (1-alpha) P(y=k|x^q,S_y).
  • Prototypes are learned as averages over embeddings: c_k^x = (1/M_k) sum φ_Image(x_i^s) and c_k^y = (1/Ṁ_k) sum φ_Text(Prompt_j(y_i^s=k)).
  • Train with a joint loss: L1 for query classification plus L2 and L3 to align image and text prototypes via InfoNCE (contrastive) loss.
  • During training, S (support) and Q (query) sets are typically the same as in CLIP-based few-shot methods, with the image/text encoders frozen and only memories and adapters learned.
Figure 1: Our Proto-CLIP model learns a joint embedding space of images and text, where image prototypes and text prototypes are learned and aligned using support sets for few-shot classification.
Figure 1: Our Proto-CLIP model learns a joint embedding space of images and text, where image prototypes and text prototypes are learned and aligned using support sets for few-shot classification.

Experimental results

Research questions

  • RQ1Can joint adaptation of image and text encoders from CLIP improve few-shot classification compared to unimodal prototypical methods?
  • RQ2Does aligning image and text prototypes under an InfoNCE objective benefit recognition of novel classes in few-shot settings?
  • RQ3How do learnable image/text memories and different adapter designs affect few-shot performance across diverse datasets?
  • RQ4What are the trade-offs between data augmentation on queries and memory-based adaptation for Proto-CLIP?

Key findings

  • Proto-CLIP consistently improves over zero-shot CLIP and several CLIP-based few-shot baselines across multiple datasets, with gains amplified as the number of shots increases.
  • Aligning image and text prototypes via contrastive losses (L2, L3) benefits performance, validating the joint embedding hypothesis.
  • Using learnable image/text memories and adapters enables better adaptation than using CLIP features 그대로, and the choice of adapter (MLP vs convolutional) can depend on the dataset.
  • Backbone choice (e.g., CLIP ViT vs ResNet) influences results, with vision-language backbones generally yielding stronger performance in few-shot regimes.
  • Proto-CLIP variants that apply query augmentations (Q^T) during training often outperform non-augmented counterparts, especially in higher-shot settings.
Figure 2: Overview of our proposed Proto-CLIP model. The CLIP image encoder and text encoder are frozen during training. The image memory, the text memory and the adapter network are learned. Given a class name, $\tau_{i}$ returns the $i^{th}$ out of $\tilde{K}$ predefined text prompts.
Figure 2: Overview of our proposed Proto-CLIP model. The CLIP image encoder and text encoder are frozen during training. The image memory, the text memory and the adapter network are learned. Given a class name, $\tau_{i}$ returns the $i^{th}$ out of $\tilde{K}$ predefined text prompts.

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.