Language Models as Black-Box Optimizers for Vision-Language Models

Samuel Yu, Shihong Liu, Zhiqiu Lin, Deepak Pathak, Deva Ramanan
2/14/2026

No official code found. Best implementation: shihongl1998/LLM-as-a-blackbox-optimizer (70 stars, last commit 2025-03-10).

Abstract

Vision-language models (VLMs) pre-trained on web-scale datasets have demonstrated remarkable capabilities on downstream tasks when fine-tuned with minimal data. However, many VLMs rely on proprietary data and are not open-source, which restricts the use of white-box approaches for fine-tuning. As such, we aim to develop a black-box approach to optimize VLMs through natural language prompts, thereby avoiding the need to access model parameters, feature embeddings, or even output logits. We propose employing chat-based LLMs to search for the best text prompt for VLMs. Specifically, we adopt an automatic “hill-climbing” procedure that converges to an effective prompt by evaluating the performance of current prompts and asking LLMs to refine them based on textual feedback, all within a conversational process without human-in-the-loop. In a challenging 1-shot image classification setup, our simple approach surpasses the white-box continuous prompting method (CoOp) by an average of1.5% across 11 datasets including ImageNet. Our approach also outperforms both human-engineered and LLM-generated prompts. We high-light the advantage of conversational feedback that incor-porates both positive and negative prompts, suggesting that LLMs can utilize the implicit “gradient” direction in textual feedback for a more efficient search. In addition, we find that the text prompts generated through our strategy are not only more interpretable but also transfer well across different VLM architectures in a black-box manner. Lastly, we demonstrate our framework on a state-of-the-art black-box VLM (DALL-E 3) for text-to-image optimization.

View on arXivView PDF

Code Implementations(1)

7010PythonSep 12, 20231 years ago

Cite this paper

@article{yu2026language,
  title  = {Language Models as Black-Box Optimizers for Vision-Language Models},
  author = {Samuel Yu and Shihong Liu and Zhiqiu Lin and Deepak Pathak and Deva Ramanan},
  year   = {2026},
  eprint = {2309.05950},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2309.05950},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.05950.svg)](https://codeofpaper.com/paper/2309.05950)

Discussion