Contrast-Aware Calibration for Fine-Tuned CLIP: Leveraging Image-Text Alignment

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lv, Song-Lin, Chen, Yu-Yang, Zhou, Zhi, Li, Yu-Feng, Guo, Lan-Zhe
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929698675621888
author Lv, Song-Lin
Chen, Yu-Yang
Zhou, Zhi
Li, Yu-Feng
Guo, Lan-Zhe
author_facet Lv, Song-Lin
Chen, Yu-Yang
Zhou, Zhi
Li, Yu-Feng
Guo, Lan-Zhe
contents Vision-language models (VLMs), such as CLIP, have demonstrated exceptional generalization capabilities and can quickly adapt to downstream tasks through prompt fine-tuning. Unfortunately, in classification tasks involving non-training classes, known as open-vocabulary setting, fine-tuned VLMs often overfit to train classes, resulting in a misalignment between confidence scores and actual accuracy on unseen classes, which significantly undermines their reliability in real-world deployments. Existing confidence calibration methods typically require training parameters or analyzing features from the training dataset, restricting their ability to generalize unseen classes without corresponding train data. Moreover, VLM-specific calibration methods rely solely on text features from train classes as calibration indicators, which inherently limits their ability to calibrate train classes. To address these challenges, we propose an effective multimodal calibration method Contrast-Aware Calibration (CAC). Building on the original CLIP's zero-shot adaptability and the conclusion from empirical analysis that poor intra-class and inter-class discriminative ability on unseen classes is the root cause, we calculate calibration weights based on the contrastive difference between the original and fine-tuned CLIP. This method not only adapts to calibrating unseen classes but also overcomes the limitations of previous VLM calibration methods that could not calibrate train classes. In experiments involving 11 datasets with 5 fine-tuning methods, CAC consistently achieved the best calibration effect on both train and unseen classes without sacrificing accuracy and inference speed.
format Preprint
id arxiv_https___arxiv_org_abs_2501_19060
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Contrast-Aware Calibration for Fine-Tuned CLIP: Leveraging Image-Text Alignment
Lv, Song-Lin
Chen, Yu-Yang
Zhou, Zhi
Li, Yu-Feng
Guo, Lan-Zhe
Computer Vision and Pattern Recognition
Machine Learning
Vision-language models (VLMs), such as CLIP, have demonstrated exceptional generalization capabilities and can quickly adapt to downstream tasks through prompt fine-tuning. Unfortunately, in classification tasks involving non-training classes, known as open-vocabulary setting, fine-tuned VLMs often overfit to train classes, resulting in a misalignment between confidence scores and actual accuracy on unseen classes, which significantly undermines their reliability in real-world deployments. Existing confidence calibration methods typically require training parameters or analyzing features from the training dataset, restricting their ability to generalize unseen classes without corresponding train data. Moreover, VLM-specific calibration methods rely solely on text features from train classes as calibration indicators, which inherently limits their ability to calibrate train classes. To address these challenges, we propose an effective multimodal calibration method Contrast-Aware Calibration (CAC). Building on the original CLIP's zero-shot adaptability and the conclusion from empirical analysis that poor intra-class and inter-class discriminative ability on unseen classes is the root cause, we calculate calibration weights based on the contrastive difference between the original and fine-tuned CLIP. This method not only adapts to calibrating unseen classes but also overcomes the limitations of previous VLM calibration methods that could not calibrate train classes. In experiments involving 11 datasets with 5 fine-tuning methods, CAC consistently achieved the best calibration effect on both train and unseen classes without sacrificing accuracy and inference speed.
title Contrast-Aware Calibration for Fine-Tuned CLIP: Leveraging Image-Text Alignment
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2501.19060