GalLoP: Learning Global and Local Prompts for Vision-Language Models

Marc Lafon, Elias Ramzi, Clément Rambour, Nicolas Audebert, Nicolas Thome
2/14/2026

No official code found. Best implementation: MarcLafon/gallop (52 stars, MIT, last commit 2025-07-10).

Abstract

Prompt learning has been widely adopted to efficiently adapt vision-language models (VLMs), e.g. CLIP, for few-shot image classification. Despite their success, most prompt learning methods trade-off between classification accuracy and robustness, e.g. in domain generalization or out-of-distribution (OOD) detection. In this work, we introduce Global-Local Prompts (GalLoP), a new prompt learning method that learns multiple diverse prompts leveraging both global and local visual features. The training of the local prompts relies on local features with an enhanced vision-text alignment. To focus only on pertinent features, this local alignment is coupled with a sparsity strategy in the selection of the local features. We enforce diversity on the set of prompts using a new ``prompt dropout'' technique and a multiscale strategy on the local prompts. GalLoP outperforms previous prompt learning methods on accuracy on eleven datasets in different few shots settings and with various backbones. Furthermore, GalLoP shows strong robustness performances in both domain generalization and OOD detection, even outperforming dedicated OOD detection methods. Code and instructions to reproduce our results: https://github.com/MarcLafon/gallop.

View on arXivView PDF

Code Implementations(1)

MarcLafon/gallopCommunity100%
MIT

Adaptation of vision-language models (CLIP) to downstream tasks using local and global prompts.

523Shell, PythonSep 27, 20241 years agoMIT

Similar Papers

Cite this paper

@article{lafon2026gallop,
  title  = {GalLoP: Learning Global and Local Prompts for Vision-Language Models},
  author = {Marc Lafon and Elias Ramzi and Clément Rambour and Nicolas Audebert and Nicolas Thome},
  year   = {2026},
  eprint = {2407.01400},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.01400},
  journal = {ECCV 2024 2024}
}

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

Discussion