In this work, we propose GLOV, which enables Large Language Models (LLMs) to act as implicit optimizers for Vision-Language Models (VLMs) to enhance downstream vision tasks. GLOV prompts an LLM with the downstream task description, querying it for suitable VLM prompts (e.g., for zero-shot classification with CLIP). These prompts are ranked according to their fitness for the downstream vision task. In each respective optimization step, the ranked prompts are fed as in-context examples (with their accuracies) to equip the LLM with the knowledge of the type of prompts preferred by the downstream VLM. Furthermore, we explicitly guide the LLM's generation at each optimization step by adding an offset vector -- calculated from the embedding differences between previous positive and negative solutions -- to the intermediate layer of the network for the next generation. This offset vector biases the LLM generation toward the type of language the downstream VLM prefers, resulting in enhanced performance on the downstream vision tasks. We comprehensively evaluate our GLOV on two tasks: object recognition and the critical task of enhancing VLM safety. Our GLOV shows performance improvement by up to 15.0% and 57.5% for dual-encoder (e.g., CLIP) and encoder-decoder (e.g., LlaVA) models for object recognition and reduces the attack success rate (ASR) on state-of-the-art VLMs by up to .
View on arXiv@article{mirza2025_2410.06154, title={ GLOV: Guided Large Language Models as Implicit Optimizers for Vision Language Models }, author={ M. Jehanzeb Mirza and Mengjie Zhao and Zhuoyuan Mao and Sivan Doveh and Wei Lin and Paul Gavrikov and Michael Dorkenwald and Shiqi Yang and Saurav Jha and Hiromi Wakaki and Yuki Mitsufuji and Horst Possegger and Rogerio Feris and Leonid Karlinsky and James Glass }, journal={arXiv preprint arXiv:2410.06154}, year={ 2025 } }