C-TPT: Calibrated Test-Time Prompt Tuning for Vision-Language Models via Text Feature Dispersion

Hee Suk Yoon, Eunseop Yoon, Joshua Tian Jin Tee, M. Hasegawa-Johnson, Yingzhen Li +1 more
2/12/2026

No official code found. Best implementation: hee-suk-yoon/C-TPT (23 stars, MIT, last commit 2024-06-09).

Abstract

In deep learning, test-time adaptation has gained attention as a method for model fine-tuning without the need for labeled data. A prime exemplification is the recently proposed test-time prompt tuning for large-scale vision-language models such as CLIP. Unfortunately, these prompts have been mainly developed to improve accuracy, overlooking the importance of calibration, which is a crucial aspect for quantifying prediction uncertainty. However, traditional calibration methods rely on substantial amounts of labeled data, making them impractical for test-time scenarios. To this end, this paper explores calibration during test-time prompt tuning by leveraging the inherent properties of CLIP. Through a series of observations, we find that the prompt choice significantly affects the calibration in CLIP, where the prompts leading to higher text feature dispersion result in better-calibrated predictions. Introducing the Average Text Feature Dispersion (ATFD), we establish its relationship with calibration error and present a novel method, Calibrated Test-time Prompt Tuning (C-TPT), for optimizing prompts during test-time with enhanced calibration. Through extensive experiments on different CLIP architectures and datasets, we show that C-TPT can effectively improve the calibration of test-time prompt tuning without needing labeled data. The code is publicly accessible at https://github.com/hee-suk-yoon/C-TPT.

View on arXivView PDF

Code Implementations(1)

hee-suk-yoon/C-TPTCommunity100%
MIT

[ICLR'24] Official code for "C-TPT: Calibrated Test-Time Prompt Tuning for Vision-Language Models via Text Feature Dispersion"

233Shell, PythonMar 5, 20242 years agoMIT
calibrationclipiclr2024test-time-adaptationvision-language

Similar Papers

Cite this paper

@article{yoon2026ctpt,
  title  = {C-TPT: Calibrated Test-Time Prompt Tuning for Vision-Language Models via Text Feature Dispersion},
  author = {Hee Suk Yoon and Eunseop Yoon and Joshua Tian Jin Tee and M. Hasegawa-Johnson and Yingzhen Li and C. Yoo},
  year   = {2026},
  eprint = {2403.14119},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2403.14119},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.14119.svg)](https://codeofpaper.com/paper/2403.14119)

Discussion