ZIP: An Efficient Zeroth-order Prompt Tuning for Black-box Vision-Language Models

Seonghwan Park, Jaehyeon Jeong, Yongjun Kim, Jaeho Lee, Namhoon Lee

TL;DR

ZIP (Zeroth-order Intrinsic-dimensional Prompt-tuning) is a new framework that makes tuning "black-box" AI models—those hidden behind APIs where you cannot access internal weights—drastically more efficient. By shrinking the optimization space and using a clever gradient-clipping trick based on the problem's "intrinsic dimension," ZIP achieves a 6% boost in accuracy while requiring 48% fewer API calls than previous state-of-the-art methods.

Introduction: The Black-Box Bottleneck

Large-scale vision-language models (VLMs) like CLIP are incredibly powerful, but they are increasingly provided as Software-as-a-Service (SaaS). Because of commercial secrets or security concerns, users often only have "black-box" access: you can send an input and get a result (like a loss value or a prediction), but you cannot see the model's internal parameters or use standard backpropagation to train it.

To adapt these models to specific tasks (like identifying rare flowers or satellite imagery), researchers use Black-Box Prompt Tuning (BBPT). This involves optimizing a small "prompt" added to the input. However, current BBPT methods are "query-hungry." They often require tens of thousands of API calls to find a good prompt because they rely on zeroth-order optimization (estimating gradients by poking the model and seeing how the output changes). In the real world, where every API call costs time and money, this is a major bottleneck.

Methods: Shrinking the Search Space

The authors introduce ZIP, which tackles the query-efficiency problem through two main innovations:

  1. Low-Rank Reparameterization with Feature Sharing: Instead of trying to optimize every single value in a high-dimensional prompt, ZIP projects the problem into a much smaller "intrinsic" space. It uses a Fastfood transform to reduce dimensionality and a low-rank approximation to represent the prompt. To ensure the model doesn't lose too much "expressiveness" by having fewer parameters, they add a Feature Sharing vector that acts as a common base across all parts of the prompt.

  2. Intrinsic-Dimensional Gradient Clipping: Zeroth-order gradient estimates are notoriously noisy. Standard "clipping" (limiting the size of a gradient update) usually requires a human to manually guess a threshold. ZIP introduces a mathematically grounded threshold based on the square root of the number of trainable parameters. This stabilizes training and reduces the variance of the noisy gradient estimates without needing expensive hyperparameter tuning.

Datasets and Evaluation

The researchers put ZIP to the test across a massive suite of benchmarks:

  • 13 Standard Vision-Language Tasks: Including ImageNet (general), OxfordPets (fine-grained), EuroSAT (satellite), and DTD (textures).
  • 4 Out-of-Distribution (OOD) Benchmarks: ImageNetV2, ImageNet-Sketch, ImageNet-A, and ImageNet-R to test how well the model handles stylized or adversarial data.
  • Generalization Tests: They evaluated "base-to-new" generalization (training on some classes and testing on others) and cross-dataset transfer.

Key Insights

  • The "Curse of Dimensionality" is Real: The authors observed a counter-intuitive trend: in black-box settings, adding more parameters to a prompt actually makes performance worse. This is because the search space for zeroth-order optimization grows too large for the optimizer to handle. ZIP’s core "aha moment" is that we must aggressively shrink the search space to its "intrinsic dimension" to succeed.
  • Bridging the Gap: ZIP manages to make zeroth-order optimization (black-box) look almost as fast and stable as first-order optimization (white-box/backprop).
  • Automatic Tuning: The clipping threshold isn't just a random guess; it's based on the theoretical standard deviation of estimated gradients. This means ZIP works "out of the box" across different datasets without needing a researcher to spend days fine-tuning the optimizer settings.

Key Results

Performance overview of ZIP compared to baselines, highlighting query efficiency, training progress, and generalization across datasets.
  • Superior Accuracy: ZIP outperformed existing methods (like BAR, BlackVIP, and BPT-VLM) on 11 out of 13 datasets. On average, it provided a +7.7% accuracy gain over the baseline BAR method.
  • Massive Efficiency: ZIP reached target accuracies 48% faster (using roughly half the queries) than the next best method, demonstrating an ~8x reduction in required queries during early training progress.
  • Extreme Parameter Efficiency: ZIP achieved these results using only 0.4k parameters, whereas some competitors used up to 37.6k.
  • Robustness: In OOD tests (handling sketches or adversarial images), ZIP showed a 13.2% improvement over the previous state-of-the-art (BPT-VLM), proving that its prompts are more "fundamental" and less prone to overfitting.

Limitations and Future Work

While ZIP is a major step forward, the authors note a few areas for growth:

  • Model Scope: The current study focuses primarily on CLIP-style vision-language models. The authors suggest that future work should extend ZIP to large language models (LLMs) and more complex prompting schemes.
  • Query Budget: Even though ZIP is 48% more efficient, it still requires thousands of queries. For extremely expensive APIs, even fewer queries would be ideal.
  • Synergy Analysis: While the paper shows the modules work well together, deeper theoretical analysis of why the low-rank and clipping mechanisms create such a strong synergy is still an open question.

Summary updated

BibTeX
@inproceedings{park2025zip,
  author = {Seonghwan Park and Jaehyeon Jeong and Yongjun Kim and Jaeho Lee and Namhoon Lee},
  title = {{ZIP: An Efficient Zeroth-order Prompt Tuning for Black-box Vision-Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=2OegVbwvY2},
}
Figure