Gradient constrained sharpness-aware prompt learning for vision-language models

Liangchen Liu, Nannan Wang, Dawei Zhou, Xinbo Gao, Decheng Liu +2 more
9/14/2023
cs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

This paper targets a novel trade-off problem in generalizable prompt learning for vision-language models (VLM), i.e., improving the performance on unseen classes while maintaining the performance on seen classes. Comparing with existing generalizable methods that neglect the seen classes degradation, the setting of this problem is more strict and fits more closely with practical applications. To solve this problem, we start from the optimization perspective, and leverage the relationship between loss landscape geometry and model generalization ability. By analyzing the loss landscapes of the state-of-the-art method and vanilla Sharpness-aware Minimization (SAM) based method, we conclude that the trade-off performance correlates to both loss value and loss sharpness, while each of them is indispensable. However, we find the optimizing gradient of existing methods cannot maintain high relevance to both loss value and loss sharpness during optimization, which severely affects their trade-off performance. To this end, we propose a novel SAM-based method for prompt learning, denoted as Gradient Constrained Sharpness-aware Context Optimization (GCSCoOp), to dynamically constrain the optimizing gradient, thus achieving above two-fold optimization objective simultaneously. Extensive experiments verify the effectiveness of GCSCoOp in the trade-off problem.

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. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

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

Cite this paper

@article{liu2023gradient,
  title  = {Gradient constrained sharpness-aware prompt learning for vision-language models},
  author = {Liangchen Liu and Nannan Wang and Dawei Zhou and Xinbo Gao and Decheng Liu and Xi Yang and Tongliang Liu},
  year   = {2023},
  eprint = {2309.07866},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.07866v2}
}

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

Discussion