Prompting Large Pre-trained Vision-Language Models For Compositional Concept Learning

Guangyue Xu, Parisa Kordjamshidi, Joyce ChaiarXiv 2022

TL;DR

This paper introduces PromptCompVL, a novel approach that leverages pre-trained vision-language models (VLMs) for compositional zero-shot learning (CZSL). By introducing learnable "soft-prompting" and "soft-embedding" layers, PromptCompVL significantly improves the ability of VLMs to recognize novel combinations of attributes and objects without explicit training examples, achieving state-of-the-art results on the MIT-States dataset.

What Problem Does This Paper Address?

Compositional Zero-Shot Learning (CZSL) is a challenging task that requires models to recognize novel combinations of concepts (e.g., "sliced apple") that were not seen during training, by composing previously learned primitive concepts (e.g., "sliced" and "apple"). The core difficulty lies in the distribution shift between training and testing data, where models tend to overfit to seen compositions. Existing methods often rely on complex embedding spaces and constraints. This paper aims to tackle CZSL by adapting large pre-trained vision-language models (VLMs) using a prompt-based learning framework, specifically addressing the need for models to generalize to unseen attribute-object pairs.

Methods

The proposed method, PromptCompVL, builds upon the CLIP (Contrastive Language-Image Pre-training) model. Instead of relying on CLIP's fixed "hard prompts" (like "a photo of"), PromptCompVL introduces two key learnable components:

  • Soft-Prompting Layer: This layer injects learnable prompt vectors into the VLM's text encoder. These vectors are optimized to reprogram the VLM for the specific CZSL task, enhancing its flexibility.
  • Soft-Embedding Layer: This layer replaces CLIP's original vocabulary embedding layer. It learns embeddings for primitive concepts (attributes and objects) and updates them based on their combinations during training. This is crucial for capturing the compositional nature of the concepts.

By combining these two "soft" learnable components, PromptCompVL aims to improve the VLM's ability to understand and generate representations for novel attribute-object compositions. The training process involves optimizing these soft layers using a contrastive loss based on cosine similarity between image and text representations.

Datasets

The experiments were conducted on two standard CZSL benchmarks:

  • MIT-States: A widely used dataset for compositional learning.
  • UT-Zappos: A domain-specific dataset focusing on shoes.

The paper follows the pair split methodology from Purushwalkam et al. (2019) for these datasets.

Key Insights and Ideas

  • Soft Prompts are Powerful: Injecting learnable "soft prompts" into VLMs is a highly effective way to adapt them for downstream tasks like CZSL, offering significant improvements over fixed prompts.
  • Compositional Embeddings Matter: Learning dynamic embeddings for primitive concepts that adapt based on their combinations is crucial for tackling the compositional challenge in CZSL.
  • Parameter Efficiency: Prompt-based learning, as implemented in PromptCompVL, offers a parameter-efficient way to achieve strong performance, avoiding the need to fine-tune the entire large VLM.
  • CLIP's Potential for Compositionality: This work demonstrates that large VLMs like CLIP, when appropriately prompted, possess significant latent capabilities for compositional reasoning.

Key Results

PromptCompVL achieved state-of-the-art (SOTA) results on the MIT-States dataset for both close and open CZSL settings. It also showed consistent improvements over other CLIP-based methods on MIT-States and in the close setting on UT-Zappos. While it didn't outperform all baselines on UT-Zappos, this is attributed to the dataset's domain specificity, which CLIP might not have seen extensively during its pre-training.

Limitations and Future Work

The authors acknowledge that PromptCompVL was less effective on the domain-specific UT-Zappos dataset compared to broader datasets like MIT-States. This suggests that the pre-training data of VLMs can significantly impact performance on highly specialized domains. Future work could explore methods to better adapt these models to domain-specific CZSL tasks or investigate how to improve the generalization of soft-embedding and soft-prompting strategies across diverse domains. The paper also highlights the potential for further exploration of prompt-based approaches for compositional concept learning.

Summary updated

Abstract

This work explores the zero-shot compositional learning ability of large pre-trained vision-language models(VLMs) within the prompt-based learning framework and propose a model (\textit{PromptCompVL}) to solve the compositonal zero-shot learning (CZSL) problem. \textit{PromptCompVL} makes two design choices: first, it uses a soft-prompting instead of hard-prompting to inject learnable parameters to reprogram VLMs for compositional learning. Second, to address the compositional challenge, it uses the soft-embedding layer to learn primitive concepts in different combinations. By combining both soft-embedding and soft-prompting, \textit{PromptCompVL} achieves state-of-the-art performance on the MIT-States dataset. Furthermore, our proposed model achieves consistent improvement compared to other CLIP-based methods which shows the effectiveness of the proposed prompting strategies for CZSL.
BibTeX
@misc{xu2022prompting,
  author = {Guangyue Xu and Parisa Kordjamshidi and Joyce Chai},
  title = {{Prompting Large Pre-trained Vision-Language Models For Compositional Concept Learning}},
  year = {2022},
  eprint = {2211.05077},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.05077},
}
Figure