Bayesian Prompt Learning for Image-Language Model Generalization
- URL: http://arxiv.org/abs/2210.02390v3
- Date: Sun, 20 Aug 2023 13:08:34 GMT
- Title: Bayesian Prompt Learning for Image-Language Model Generalization
- Authors: Mohammad Mahdi Derakhshani, Enrique Sanchez, Adrian Bulat, Victor
Guilherme Turrisi da Costa, Cees G. M. Snoek, Georgios Tzimiropoulos and
Brais Martinez
- Abstract summary: We use the regularization ability of Bayesian methods to frame prompt learning as a variational inference problem.
Our approach regularizes the prompt space, reduces overfitting to the seen prompts and improves the prompt generalization on unseen prompts.
We demonstrate empirically on 15 benchmarks that Bayesian prompt learning provides an appropriate coverage of the prompt space.
- Score: 64.50204877434878
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Foundational image-language models have generated considerable interest due
to their efficient adaptation to downstream tasks by prompt learning. Prompt
learning treats part of the language model input as trainable while freezing
the rest, and optimizes an Empirical Risk Minimization objective. However,
Empirical Risk Minimization is known to suffer from distributional shifts which
hurt generalizability to prompts unseen during training. By leveraging the
regularization ability of Bayesian methods, we frame prompt learning from the
Bayesian perspective and formulate it as a variational inference problem. Our
approach regularizes the prompt space, reduces overfitting to the seen prompts
and improves the prompt generalization on unseen prompts. Our framework is
implemented by modeling the input prompt space in a probabilistic manner, as an
a priori distribution which makes our proposal compatible with prompt learning
approaches that are unconditional or conditional on the image. We demonstrate
empirically on 15 benchmarks that Bayesian prompt learning provides an
appropriate coverage of the prompt space, prevents learning spurious features,
and exploits transferable invariant features. This results in better
generalization of unseen prompts, even across different datasets and domains.
Code available at: https://github.com/saic-fi/Bayesian-Prompt-Learning
Related papers
- Prompt Diffusion Robustifies Any-Modality Prompt Learning [43.35989471544046]
This paper introduces prompt diffusion, which uses a diffusion model to gradually refine the prompts to obtain a customized prompt for each sample.
For all prompt learning methods tested, adding prompt diffusion yields more robust results for base-to-new generalization, cross-dataset generalization, and domain generalization in classification tasks tested over 15 diverse datasets.
arXiv Detail & Related papers (2024-10-26T12:36:25Z) - Revisiting Prompt Pretraining of Vision-Language Models [13.888505919946578]
We propose a general framework termed Revisiting Prompt Pretraining (RPP)
RPP targets at improving the fitting and generalization ability from two aspects: prompt structure and prompt supervision.
We additionally utilize soft labels derived from zero-shot probability predictions provided by a pretrained Contrastive Language Image Pretraining (CLIP) teacher model.
arXiv Detail & Related papers (2024-09-10T02:36:13Z) - Hard Prompts Made Interpretable: Sparse Entropy Regularization for Prompt Tuning with RL [29.01858866450715]
We present RLPrompt, which aims to find optimal prompt tokens leveraging soft Q-learning.
While the results show promise, we have observed that the prompts frequently appear unnatural, which impedes their interpretability.
We address this limitation by using sparse Tsallis entropy regularization, a principled approach to filtering out unlikely tokens from consideration.
arXiv Detail & Related papers (2024-07-20T03:10:19Z) - RESTORE: Towards Feature Shift for Vision-Language Prompt Learning [33.13407089704543]
We show that prompt tuning along only one branch of CLIP is the reason why the misalignment occurs.
Without proper regularization across the learnable parameters in different modalities, prompt learning violates the original pre-training constraints.
We propose RESTORE, a multi-modal prompt learning method that exerts explicit constraints on cross-modal consistency.
arXiv Detail & Related papers (2024-03-10T08:52:48Z) - Understanding prompt engineering may not require rethinking
generalization [56.38207873589642]
We show that the discrete nature of prompts, combined with a PAC-Bayes prior given by a language model, results in generalization bounds that are remarkably tight by the standards of the literature.
This work provides a possible justification for the widespread practice of prompt engineering.
arXiv Detail & Related papers (2023-10-06T00:52:48Z) - Self-regulating Prompts: Foundational Model Adaptation without
Forgetting [112.66832145320434]
We introduce a self-regularization framework for prompting called PromptSRC.
PromptSRC guides the prompts to optimize for both task-specific and task-agnostic general representations.
arXiv Detail & Related papers (2023-07-13T17:59:35Z) - Fairness-guided Few-shot Prompting for Large Language Models [93.05624064699965]
In-context learning can suffer from high instability due to variations in training examples, example order, and prompt formats.
We introduce a metric to evaluate the predictive bias of a fixed prompt against labels or a given attributes.
We propose a novel search strategy based on the greedy search to identify the near-optimal prompt for improving the performance of in-context learning.
arXiv Detail & Related papers (2023-03-23T12:28:25Z) - Patch-Prompt Aligned Bayesian Prompt Tuning for Vision-Language Models [48.77653835765705]
We introduce a probabilistic resolution to prompt tuning, where the label-specific prompts are generated hierarchically by first sampling a latent vector from an underlying distribution and then employing a lightweight generative model.
We evaluate the effectiveness of our approach on four tasks: few-shot image recognition, base-to-new generalization, dataset transfer learning, and domain shifts.
arXiv Detail & Related papers (2023-03-16T06:09:15Z) - RLPrompt: Optimizing Discrete Text Prompts With Reinforcement Learning [84.75064077323098]
This paper proposes RLPrompt, an efficient discrete prompt optimization approach with reinforcement learning (RL)
RLPrompt is flexibly applicable to different types of LMs, such as masked gibberish (e.g., grammaBERT) and left-to-right models (e.g., GPTs)
Experiments on few-shot classification and unsupervised text style transfer show superior performance over a wide range of existing finetuning or prompting methods.
arXiv Detail & Related papers (2022-05-25T07:50:31Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.