Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Any-Shift Prompting for Generalization over Distributions

About

Image-language models with prompt learning have shown remarkable advances in numerous downstream vision tasks. Nevertheless, conventional prompt learning methods overfit their training distribution and lose the generalization ability on test distributions. To improve generalization across various distribution shifts, we propose any-shift prompting: a general probabilistic inference framework that considers the relationship between training and test distributions during prompt learning. We explicitly connect training and test distributions in the latent space by constructing training and test prompts in a hierarchical architecture. Within this framework, the test prompt exploits the distribution relationships to guide the generalization of the CLIP image-language model from training to any test distribution. To effectively encode the distribution information and their relationships, we further introduce a transformer inference network with a pseudo-shift training mechanism. The network generates the tailored test prompt with both training and test information in a feedforward pass, avoiding extra training costs at test time. Extensive experiments on twenty-three datasets demonstrate the effectiveness of any-shift prompting on the generalization over various distribution shifts.

Zehao Xiao, Jiayi Shen, Mohammad Mahdi Derakhshani, Shengcai Liao, Cees G. M. Snoek• 2024

Related benchmarks

TaskDatasetResultRank
Image ClassificationImageNet A
Top-1 Acc58.05
654
Image ClassificationImageNet V2
Top-1 Acc67.08
611
Image ClassificationEuroSAT
Accuracy50.25
569
Image ClassificationFlowers102
Accuracy72.3
558
Image ClassificationFood-101
Accuracy86.17
542
Image ClassificationDTD
Accuracy47.35
542
Image ClassificationImageNet-R
Top-1 Acc79.23
529
Image ClassificationUCF101
Top-1 Acc69.52
455
Image ClassificationSUN397
Accuracy67.32
425
Image ClassificationStanfordCars
Accuracy66.9
312
Showing 10 of 35 rows

Other info

Follow for update