[Paper Review] Learning to Compose Soft Prompts for Compositional Zero-Shot Learning
We introduce compositional soft prompting (CSP), which learns attribute and object vocabulary tokens to improve CLIP-based compositional zero-shot learning, achieving substantial gains over CLIP and CoOp on standard benchmarks.
We introduce compositional soft prompting (CSP), a parameter-efficient learning technique to improve the zero-shot compositionality of large-scale pretrained vision-language models (VLMs) like CLIP. We develop CSP for compositional zero-shot learning, the task of predicting unseen attribute-object compositions (e.g., old cat and young tiger). VLMs have a flexible text encoder that can represent arbitrary classes as natural language prompts but they often underperform task-specific architectures on the compositional zero-shot benchmark datasets. CSP treats the attributes and objects that define classes as learnable tokens of vocabulary. During training, the vocabulary is tuned to recognize classes that compose tokens in multiple ways (e.g., old cat and white cat). At test time, we recompose the learned attribute-object vocabulary in new combinations to recognize novel classes. We show that CSP outperforms the CLIP on benchmark datasets by an average of 10.9 percentage points on AUC. CSP also outperforms CoOp, a soft prompting method that fine-tunes the prefix context tokens, by an average of 5.8 percentage points on AUC. We perform additional experiments to show that CSP improves generalization to higher-order attribute-attribute-object compositions (e.g., old white cat) and combinations of pretrained attributes and fine-tuned objects. The code is available at https://github.com/BatsResearch/csp.
Motivation & Objective
- Improve zero-shot compositionality of vision-language models by learning to compose attribute-object concepts as adaptable vocabulary tokens.
- Enable recomposition of learned attribute-object prompts for unseen class combinations at test time.
- Maintain parameter efficiency by tuning a small set of vocabulary tokens rather than full model fine-tuning.
Proposed method
- Treat attributes and objects as learnable tokens in the VLM vocabulary.
- Initialize tokens from pretrained CLIP embeddings and train them on multiple attribute-object prompts.
- Construct prompts of the form "A photo of [attribute] [object]" using both fixed prefix context and learnable tokens.
- Compute image-text compatibility via cosine similarity in the VLM embedding space and optimize with cross-entropy loss.
- During inference, recompose the learned attribute/object vocabulary to recognize novel compositions.
- Maintain a small parameter footprint: only (|A|+|O|) × d parameters are trained.
Experimental results
Research questions
- RQ1Can learning composable attribute and object tokens improve zero-shot compositionality in CLIP-based models?
- RQ2How well does CSP generalize to higher-order compositions and mixed pretrained/fine-tuned vocabularies?
- RQ3What are the comparative gains of CSP versus CLIP and soft-prompt baselines on standard datasets?
- RQ4Does training on attribute-object compositions generalize to attribute-attribute-object and unseen attribute scenarios?
Key findings
- CSP improves average AUC accuracy over CLIP by 10.9 percentage points across three benchmarks in closed-world settings.
- CSP improves average AUC accuracy over CoOp by 5.8 percentage points on the same metric.
- In open-world settings, CSP achieves notable gains (e.g., MIT-States, UT-Zappos, C-GQA) and often surpasses task-specific architectures on several datasets.
- CSP generalizes to higher-order compositions (attribute-attribute-object) with improved unseen accuracy relative to CLIP.
- Training with attribute-object compositions enhances CLIP’s performance for attribute classification, attribute-attribute-object, and mixed vocabulary scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.