[Paper Review] Improving Zero-Shot Generalization for CLIP with Synthesized Prompts
SHIP adds a CLIP-based VAE generator that creates synthesized features for label-only classes from class names, enabling fine-tuning of CLIP with both real and synthetic data to improve base-to-new generalization, cross-dataset transfer, and generalized zero-shot learning.
With the growing interest in pretrained vision-language models like CLIP, recent research has focused on adapting these models to downstream tasks. Despite achieving promising results, most existing methods require labeled data for all classes, which may not hold in real-world applications due to the long tail and Zipf's law. For example, some classes may lack labeled data entirely, such as emerging concepts. To address this problem, we propose a plug-and-play generative approach called extbf{S}ynt extbf{H}es extbf{I}zed extbf{P}rompts~( extbf{SHIP}) to improve existing fine-tuning methods. Specifically, we follow variational autoencoders to introduce a generator that reconstructs the visual features by inputting the synthesized prompts and the corresponding class names to the textual encoder of CLIP. In this manner, we easily obtain the synthesized features for the remaining label-only classes. Thereafter, we fine-tune CLIP with off-the-shelf methods by combining labeled and synthesized features. Extensive experiments on base-to-new generalization, cross-dataset transfer learning, and generalized zero-shot learning demonstrate the superiority of our approach. The code is available at \url{https://github.com/mrflogs/SHIP}.
Motivation & Objective
- Address data scarcity for long-tail and emerging concepts in CLIP-based vision-language models.
- Enable CLIP fine-tuning to perform well on both seen (base) and unseen (new) classes without requiring data for all classes.
- Introduce a plug-and-play generator that synthesizes features for label-only classes from class names.
Proposed method
- Use a variational autoencoder (VAE) framework to train a generator that reconstructs CLIP features from synthesized prompts and class names.
- Introduce a CLIP-based generator with a lightweight MLP that produces a local bias added to global learnable prompts.
- Feed the generated prompts and class names into the frozen CLIP text encoder to obtain synthesized features.
- Train the VAE encoder on CLIP visual features and optimize with a reconstruction loss and KL divergence.
- Fine-tune CLIP with off-the-shelf methods (e.g., CoOp, CLIP-Adapter, Tip-Adapter) using a mix of real base features and synthesized new-class features.
- Prompts consist of global learnable prompts plus an instance-specific local bias; prompts are used to generate features through the frozen text encoder.
Experimental results
Research questions
- RQ1Can SHIP synthesize meaningful features for unseen classes using only class names?
- RQ2Does augmenting CLIP fine-tuning with synthesized features improve performance on base and new classes across diverse datasets?
- RQ3How does SHIP compare to existing fine-tuning methods in base-to-new generalization, cross-dataset transfer, and generalized zero-shot learning?
- RQ4What are the effects of generator type (VAE-based with CLIP-based generator) and prompt design on performance?
- RQ5Is the CLIP-based generator more effective than training a generator from scratch or using GAN-based frameworks in few-shot settings?
Key findings
- SHIP-enhanced methods (e.g., CoOp + SHIP, CLIP-Adapter + SHIP, Tip-Adapter + SHIP) show improvements on new classes and harmonic mean compared to baselines in base-to-new generalization.
- In cross-dataset transfer, CoOp + SHIP yields average improvements across multiple target datasets, with gains ranging modestly over baselines.
- For generalized zero-shot learning, CoOp + SHIP substantially improves unseen-class performance and harmonic mean relative to CoOp alone.
- Ablation studies show the CLIP-based generator outperforms scratch-trained generators and that VAEs outperform GANs in this few-shot setting.
- Global prompts with identical local bias provide the best performance among prompt configurations, highlighting the importance of global context in prompts.
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.