Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

IPO: Interpretable Prompt Optimization for Vision-Language Models

About

Pre-trained vision-language models like CLIP have remarkably adapted to various downstream tasks. Nonetheless, their performance heavily depends on the specificity of the input text prompts, which requires skillful prompt template engineering. Instead, current approaches to prompt optimization learn the prompts through gradient descent, where the prompts are treated as adjustable parameters. However, these methods tend to lead to overfitting of the base classes seen during training and produce prompts that are no longer understandable by humans. This paper introduces a simple but interpretable prompt optimizer (IPO), that utilizes large language models (LLMs) to generate textual prompts dynamically. We introduce a Prompt Optimization Prompt that not only guides LLMs in creating effective prompts but also stores past prompts with their performance metrics, providing rich in-context information. Additionally, we incorporate a large multimodal model (LMM) to condition on visual content by generating image descriptions, which enhance the interaction between textual and visual modalities. This allows for thae creation of dataset-specific prompts that improve generalization performance, while maintaining human comprehension. Extensive testing across 11 datasets reveals that IPO not only improves the accuracy of existing gradient-descent-based prompt learning methods but also considerably enhances the interpretability of the generated prompts. By leveraging the strengths of LLMs, our approach ensures that the prompts remain human-understandable, thereby facilitating better transparency and oversight for vision-language models.

Yingjun Du, Wenfang Sun, Cees G. M. Snoek• 2024

Related benchmarks

TaskDatasetResultRank
Image ClassificationFlowers102
Accuracy72.75
478
Image ClassificationDTD
Accuracy47.01
419
Image ClassificationUCF101
Top-1 Acc69.23
404
Image ClassificationFood101
Accuracy86.75
309
Image ClassificationAircraft
Accuracy25.14
302
Image ClassificationStanfordCars
Accuracy66.1
266
Image ClassificationSUN397
Accuracy67.97
246
Image ClassificationCaltech101
Accuracy94.34
162
Image ClassificationSUN397
Accuracy (Base)81.25
131
Image ClassificationOxfordPets
Base Accuracy95.21
117
Showing 10 of 27 rows

Other info

Code

Follow for update