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

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

21 Mar 2024arXiv:2403.14119archive 2025-07-28

Hee Suk Yoon, Eunseop Yoon, Joshua Tian Jin Tee, Mark Hasegawa-Johnson, Yingzhen Li, Chang D. Yoo

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2403.14119")

Code

Syntology Ran 8 of 10 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 5 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hee-suk-yoon/c-tpt officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 8 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

5ran · our draft was wrong
1ran · fixture could not drive it
2ran
2unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hee-suk-yoon/C-TPT. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ECE_Loss hee-suk-yoon/C-TPT/tpt_classification.py official repository ran MIT (permissive) · 45814cb7d8907ddb · report
accuracy hee-suk-yoon/C-TPT/utils/tools.py official repository ran · fixture could not drive it MIT (permissive) · b0f936d4d6ae3b8c · report
avg_entropy hee-suk-yoon/C-TPT/tpt_classification.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 441ae80dd4f616f3 · report
basic_clean hee-suk-yoon/C-TPT/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 98f385d847636a3e · report
get_pairs hee-suk-yoon/C-TPT/clip/simple_tokenizer.py official repository ran · our draft was wrong MIT (permissive) · d919ae32e5e4e616 · report
select_confident_samples hee-suk-yoon/C-TPT/tpt_classification.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 3ce4d11e58de02ad · report
validate hee-suk-yoon/C-TPT/utils/tools.py official repository ran MIT (permissive) · 1ca27622f8ca45e9 · report
whitespace_clean hee-suk-yoon/C-TPT/clip/simple_tokenizer.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 9542161e9640b858 · report
build_model hee-suk-yoon/C-TPT/clip/model.py official repository unverified MIT (permissive) · aa56b568a90f8516 · report
load hee-suk-yoon/C-TPT/clip/clip.py official repository unverified MIT (permissive) · 88d0e8acec4aead0 · report

Tasks

Test-time Adaptation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections