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

Open-Vocabulary Calibration for Fine-tuned CLIP

About

Vision-language models (VLMs) have emerged as formidable tools, showing their strong capability in handling various open-vocabulary tasks in image recognition, text-driven visual content generation, and visual chatbots, to name a few. In recent years, considerable efforts and resources have been devoted to adaptation methods for improving downstream performance of VLMs, particularly on parameter-efficient fine-tuning methods like prompt learning. However, a crucial aspect that has been largely overlooked is the confidence calibration problem in fine-tuned VLMs, which could greatly reduce reliability when deploying such models in the real world. This paper bridges the gap by systematically investigating the confidence calibration problem in the context of prompt learning and reveals that existing calibration methods are insufficient to address the problem, especially in the open-vocabulary setting. To solve the problem, we present a simple and effective approach called Distance-Aware Calibration (DAC), which is based on scaling the temperature using as guidance the distance between predicted text labels and base classes. The experiments with 7 distinct prompt learning methods applied across 11 diverse downstream datasets demonstrate the effectiveness of DAC, which achieves high efficacy without sacrificing the inference speed. Our code is available at https://github.com/ml-stat-Sustech/CLIP_Calibration.

Shuoyuan Wang, Jindong Wang, Guoqing Wang, Bob Zhang, Kaiyang Zhou, Hongxin Wei• 2024

Related benchmarks

TaskDatasetResultRank
Fine-grained Image ClassificationDTD (novel classes)
ECE3.49
36
Fine-grained Image ClassificationFGVCAircraft (novel classes)
ECE7.4
36
Image ClassificationFood101 novel classes
ECE0.7
29
Fine grained classificationEuroSAT (novel classes)
Expected Calibration Error3.33
28
Fine grained classificationSUN397 novel classes
ECE0.79
28
Fine-grained Image ClassificationUCF101 novel classes
Expected Calibration Error2.42
28
Fine-grained Image ClassificationOxfordPets novel classes
ECE2.43
28
Fine-grained Image ClassificationStanfordCars novel classes
ECE2.21
28
Fine-grained Image ClassificationCaltech101 novel classes
ECE1.58
28
Fine-grained Image ClassificationFlowers102 (novel classes)
ECE5.03
28
Showing 10 of 19 rows

Other info

Follow for update