Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

CLIPood: Generalizing CLIP to Out-of-Distributions

About

Out-of-distribution (OOD) generalization, where the model needs to handle distribution shifts from training, is a major challenge of machine learning. Contrastive language-image pre-training (CLIP) models have shown impressive zero-shot ability, but the further adaptation of CLIP on downstream tasks undesirably degrades OOD performances. This paper aims at generalizing CLIP to out-of-distribution test data on downstream tasks. We propose CLIPood, a fine-tuning method that can adapt CLIP models to OOD situations where both domain shifts and open classes may occur on the unseen test data. To exploit the semantic relations between classes from the text modality, CLIPood introduces a new training objective, margin metric softmax (MMS), with class adaptive margins for fine-tuning. To incorporate both pre-trained zero-shot model and fine-tuned task-adaptive model, CLIPood leverages a new optimization strategy, Beta moving average (BMA), to maintain a temporal ensemble weighted by Beta distribution. Experiments on diverse datasets with different OOD scenarios show that CLIPood consistently outperforms existing generalization techniques.

Yang Shu, Xingzhuo Guo, Jialong Wu, Ximei Wang, Jianmin Wang, Mingsheng Long• 2023

Related benchmarks

TaskDatasetResultRank
Image Classification11 datasets base-to-new average
Base Average Score83.9
81
Domain GeneralizationDomainBed v1.0 (test)
Average Accuracy71.55
71
Domain GeneralizationDomainBed (OH, TI, VLCS, PACS, DN) (test)
Accuracy (OH)83.31
33
Few-shot classificationImageNet-Sketch (Target)
Accuracy49.3
14
Few-shot classificationImageNet V2 (Target)
Accuracy64.9
14
Few-shot classificationImageNet-R Target
Accuracy0.772
14
Few-shot classificationImageNet (source)
Accuracy71.6
14
Few-shot classificationImageNet-A Target
Accuracy50.4
14
Few-shot classificationImageNet
Base Accuracy77.5
11
Domain GeneralizationDomainNet, TerraIncognita, Office (test)
DomainNet Accuracy0.635
3
Showing 10 of 10 rows

Other info

Follow for update