Abstract
This paper introduces a novel "human-free" framework for optimizing Vision-Language Models (VLMs) by leveraging Large Language Models (LLMs) as black-box optimizers. By iteratively refining natural language prompts through performance feedback—incorporating both high-performing "positive" and low-performing "negative" examples—the method achieves state-of-the-art results in low-shot classification and image generation tasks without requiring access to model gradients or internal weights.
Introduction
Fine-tuning large Vision-Language Models like CLIP or DALL-E typically requires "white-box" access to internal weights for gradient-based optimization. However, many powerful modern models are proprietary and accessible only via APIs. While manual prompt engineering can improve performance, it is a slow, trial-and-error process. This work addresses the challenge of optimizing these models using only natural language inputs and outputs, emulating the iterative workflow of a human prompt engineer at a systematic scale.
Methodology: The Hill-Climbing Loop
The core of the approach is an automatic "hill-climbing" procedure that treats a chat-based LLM (such as ChatGPT) as the optimizer. The process begins with a pool of candidate prompts sampled from a large text corpus. These prompts are evaluated on a small "few-shot" dataset to determine their accuracy.
Instead of simply asking the LLM to generate a better prompt, the system provides it with two distinct lists: the top-k (positive) prompts and the bottom-k (negative) prompts. The LLM is then tasked with analyzing the patterns in these lists to suggest a new, improved prompt. For generative tasks, a multimodal LLM (like GPT-4V) provides textual feedback on generated images to further refine the instructions.
Key Insights: Implicit Gradients in Language
A striking finding of this research is that providing "negative" prompts—those that performed poorly—significantly boosts optimization. The LLM uses the contrast between successful and unsuccessful prompts to understand the "gradient" or direction in which the prompt should evolve.
Furthermore, because the optimized prompts remain in natural language, they are highly interpretable and transferable. Unlike "soft prompting" methods that create unintelligible learned vectors, this method produces readable templates (e.g., "An image of a {} with a blurred background"). These templates often transfer well between different architectures, such as from ResNet-based to ViT-based CLIP models.
Experimental Results
The authors evaluated their approach across 11 standard classification datasets, including ImageNet and Oxford Pets, as well as generative reasoning benchmarks like Winoground.
- Classification: In a 1-shot setup, this black-box approach outperformed CoOp (a leading white-box method) by an average of 1.5% across all datasets.
- Human-Level Performance: Automated prompts surpassed both manual human engineering and simple LLM-generated prompts that lacked the iterative feedback loop.
- Generative Improvements: For DALL-E 3, the framework successfully corrected complex spatial and relational errors, improving faithfulness to user queries by nearly 1 point on a 5-point Likert scale.
Conclusion and Future Work
Constraining optimization to natural language acts as a powerful regularizer, preventing the overfitting often seen in white-box methods during low-shot training. While the method incurs API costs and still faces challenges with complex spatial reasoning (e.g., exact counting), it represents a significant step toward automated, interpretable model tuning. Future directions include using multimodal LLMs to provide even more granular, pixel-level feedback for refinement.
Summary updated