Connecting the Dots: Collaborative Fine-tuning for Black-Box Vision-Language Models

Zhengbo Wang, Jian Liang, Ran He, Zilei Wang, Tieniu Tan
2/6/2024
cs.LGcs.AIcs.CV

Official code: mrflogs/CraFT (19 stars, MIT, last commit 2024-06-12).

Abstract

With the emergence of pretrained vision-language models (VLMs), considerable efforts have been devoted to fine-tuning them for downstream tasks. Despite the progress made in designing efficient fine-tuning methods, such methods require access to the model's parameters, which can be challenging as model owners often opt to provide their models as a black box to safeguard model ownership. This paper proposes a \textbf{C}ollabo\textbf{ra}tive \textbf{F}ine-\textbf{T}uning (\textbf{CraFT}) approach for fine-tuning black-box VLMs to downstream tasks, where one only has access to the input prompts and the output predictions of the model. CraFT comprises two modules, a prompt generation module for learning text prompts and a prediction refinement module for enhancing output predictions in residual style. Additionally, we introduce an auxiliary prediction-consistent loss to promote consistent optimization across these modules. These modules are optimized by a novel collaborative training algorithm. Extensive experiments on few-shot classification over 15 datasets demonstrate the superiority of CraFT. The results show that CraFT achieves a decent gain of about 12\% with 16-shot datasets and only 8,000 queries. Moreover, CraFT trains faster and uses only about 1/80 of the memory footprint for deployment, while sacrificing only 1.62\% compared to the white-box method. Our code is publicly available at https://github.com/mrflogs/CraFT .

View on arXivView PDF

Code Implementations(1)

mrflogs/CraFTOfficial100%
MIT

Official code for ICML 2024 paper, "Connecting the Dots: Collaborative Fine-tuning for Black-Box Vision-Language Models"

190Shell, PythonMay 28, 20242 years agoMIT

Cite this paper

@article{wang2024connecting,
  title  = {Connecting the Dots: Collaborative Fine-tuning for Black-Box Vision-Language Models},
  author = {Zhengbo Wang and Jian Liang and Ran He and Zilei Wang and Tieniu Tan},
  year   = {2024},
  eprint = {2402.04050},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.04050v2}
}

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/2402.04050.svg)](https://codeofpaper.com/paper/2402.04050)

Discussion