Skip to main content
QUICK REVIEW

[Paper Review] Patch-Prompt Aligned Bayesian Prompt Tuning for Vision-Language Models

Xinyang Liu, Dongsheng Wang|arXiv (Cornell University)|Mar 16, 2023
Multimodal Machine Learning ApplicationsComputer Science5 citations
TL;DR

This paper proposes Patch-Prompt Aligned Bayesian Prompt Tuning (PBPrompt), a method that generates label-specific stochastic prompts via variational inference and optimizes them using optimal transport to align textual tokens with visual patches. The approach improves zero-shot generalization and robustness on 15 datasets, outperforming prior methods in few-shot, cross-dataset, and domain generalization settings by leveraging uncertainty modeling and vision-guided semantic alignment.

ABSTRACT

For downstream applications of vision-language pre-trained models, there has been significant interest in constructing effective prompts. Existing works on prompt engineering, which either require laborious manual designs or optimize the prompt tuning as a point estimation problem, may fail to describe diverse characteristics of categories and limit their applications. We introduce a Bayesian probabilistic resolution to prompt tuning, where the label-specific stochastic prompts are generated hierarchically by first sampling a latent vector from an underlying distribution and then employing a lightweight generative model. Importantly, we semantically regularize the tuning process by minimizing the statistical distance between the visual patches and linguistic prompts, which pushes the stochastic label representations to faithfully capture diverse visual concepts, instead of overfitting the training categories. We evaluate the effectiveness of our approach on four tasks: few-shot image recognition, base-to-new generalization, dataset transfer learning, and domain shifts. Extensive results over 15 datasets show promising transferability and generalization performance of our proposed model, both quantitatively and qualitatively.

Motivation & Objective

  • To address the limitations of deterministic prompt tuning in capturing diverse visual concepts and generalizing to unseen categories.
  • To improve zero-shot and few-shot performance by modeling uncertainty in prompt generation through a Bayesian framework.
  • To regularize prompt learning using visual knowledge by aligning textual prompt tokens with image patches via optimal transport.
  • To enhance generalization under distribution shift by incorporating instance-conditional prompt generation.
  • To provide a flexible, scalable framework for prompt tuning that integrates label semantics and visual features.

Proposed method

  • A variational posterior distribution is learned over the embedding space for each label, enabling stochastic sampling of latent vectors that represent category-specific uncertainty.
  • A lightweight deterministic generator network maps sampled latent vectors to prefix embeddings, producing a distribution of prompts through random inputs.
  • Optimal transport (OT) is used to align the distribution of prompt tokens with the distribution of visual patches from the same class, minimizing the OT cost between modalities.
  • The objective function combines the evidence lower bound (ELBO) with an OT regularization term, optimized via stochastic gradient descent.
  • The framework is extended to a conditional variant (CPBPrompt) that generates instance-conditional prompts using image features, improving generalization.
  • A label-specific prior is introduced to incorporate semantic information into the prior distribution, improving inductive bias.
Figure 1: The core idea that multiple prompts are generated from the label-specific distributions.
Figure 1: The core idea that multiple prompts are generated from the label-specific distributions.

Experimental results

Research questions

  • RQ1Can Bayesian prompt tuning with stochastic prompt generation improve generalization in vision-language models compared to deterministic methods?
  • RQ2Does optimal transport-based alignment between visual patches and textual prompts enhance prompt quality and model robustness?
  • RQ3How does incorporating label semantics into the prior distribution affect prompt learning performance?
  • RQ4Can instance-conditional prompt generation further improve zero-shot and few-shot generalization?
  • RQ5To what extent does the proposed method generalize across datasets and under domain shift?

Key findings

  • PBPrompt achieves a 2.0% average accuracy improvement over CoOp in cross-dataset transfer learning, demonstrating strong transferability across 10 target datasets.
  • On fine-grained datasets like FGVCAircraft, OxfordPets, and Flowers102, PBPrompt shows large performance gaps, indicating strong capability in capturing discriminative features.
  • In domain generalization, PBPrompt achieves the highest accuracy across all target domains (ImageNetV2, ImageNet-Sketch, ImageNet-A, ImageNet-R), outperforming baselines despite a slight drop in the source domain.
  • The ablation study confirms that using a label-specific prior improves performance by up to +3.61% on the 'New' set in Flowers102, validating its effectiveness.
  • OT regularization consistently improves performance across all settings, with gains of +0.63% on H in Caltech101 and +2.81% on H in Flowers102.
  • CPBPrompt outperforms PBPrompt by generating instance-conditional prompts, confirming that image-guided prompt tuning enhances generalization.
Figure 2: Overview of the proposed PBPrompt. PBPrompt generates the stochastic prompts by first sampling a label-specific vector $\bm{r}_{c}$ and then employing a single-layer self-attention network. OT distance is performed between the prefix tokens $\bm{p}_{c}$ and image patches to regularize the
Figure 2: Overview of the proposed PBPrompt. PBPrompt generates the stochastic prompts by first sampling a label-specific vector $\bm{r}_{c}$ and then employing a single-layer self-attention network. OT distance is performed between the prefix tokens $\bm{p}_{c}$ and image patches to regularize the

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.