Share your thoughts, 1 month free Claude Pro on usSee more
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
Domain GeneralizationVLCS
Accuracy85
347
Domain GeneralizationPACS
Accuracy97.3
323
Domain GeneralizationOfficeHome
Accuracy87
294
Domain GeneralizationPACS (test)
Average Accuracy97.8
281
Domain GeneralizationDomainNet
Accuracy63.5
228
Domain GeneralizationOffice-Home (test)
Average Accuracy83.3
187
Domain GeneralizationTerraInc
Accuracy60.4
112
Domain GeneralizationTerraIncognita (test)
Accuracy62.5
96
Image ClassificationAverage of 11 datasets (ImageNet, Caltech101, OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft, SUN397, DTD, EuroSAT, UCF101) Base-to-Novel Generalization
Harmonic Mean (HM)78.9
93
Domain GeneralizationVLCS (test)
Accuracy82.4
91
Showing 10 of 24 rows

Other info

Follow for update