Learning Generalizable Prompt for CLIP with Class Similarity Knowledge

Sehun Jung, Hyang-won Lee
2/17/2025
cs.AIcs.CVcs.LG

No confident code implementation found for this paper.

Abstract

In vision-language models (VLMs), prompt tuning has shown its effectiveness in adapting models to downstream tasks. However, learned prompts struggle to generalize to unseen classes, as they tend to overfit to the classes that are targeted during prompt tuning. Examining failure cases, we observed that learned prompts disrupt the semantics of unseen classes, generating text embeddings with incorrect semantic relationships among classes. To address this, we propose Similarity Alignment Regularization (SAR), which regularizes learnable prompts to preserve the semantic relationships among classes captured by hand-crafted prompts. Specifically, we first obtain novel classes related to base classes using ChatGPT-4o and utilize them as potential unseen classes during prompt tuning. Then, by targeting both base and novel classes, SAR aligns the similarity relationships among text embeddings generated by learnable prompts with the similarity relationships from hand-crafted prompts. Extensive experiments applying SAR to existing prompt tuning methods demonstrate its effectiveness in improving generalization to unseen classes.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jung2025learning,
  title  = {Learning Generalizable Prompt for CLIP with Class Similarity Knowledge},
  author = {Sehun Jung and Hyang-won Lee},
  year   = {2025},
  eprint = {2502.11969},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11969v1}
}

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

Discussion