Manuscript Offprint

arXiv:2608.30230

Rethinking the Test-Time Prompt Tuning Objective from the Perspective of Calibration

Jungwon Choi, Hyeonseo Jang, Kibok Lee, Eunwoo Kim

Abstract

Test-time prompt tuning (TPT) has emerged as a powerful paradigm, refining prompts for each test sample via entropy minimization (EM) over multiple augmented views. However, we identify a limitation in the standard EM-based adaptation: it inherently drives the model toward overconfident predictions disregarding sample-specific uncertainty, leading to significant calibration degradation. Moreover, EM in TPT operates on augmented views rather than the original view used for inference, making it difficult to effectively control prediction confidence. Unfortunately, existing approaches retain the EM objective and rely on additional regularization terms, leaving the fundamental issue unresolved. To address these limitations, we propose a new objective that replaces the conventional EM loss by aligning the original-view prediction with a target distribution derived from augmented views via cross-entropy, while adversarially incorporating the entropy of the target distribution to capture sample-specific uncertainty. Furthermore, to better construct this target distribution, we apply confidence-aware temperature scaling to each augmented-view prediction according to its confidence, sharpening confident predictions while softening uncertain ones. This formulation allows the model to increase confidence only when the target distribution is reliable, while preserving uncertainty when it reflects ambiguous or conflicting augmented-view predictions. Extensive experiments across diverse benchmarks demonstrate that our approach not only achieves state-of-the-art accuracy but also significantly improves model calibration.

1 Introduction

Pre-trained vision-language models, such as CLIP [Radford et al., 2021], demonstrated remarkable zero-shot transferability by aligning images and texts in a shared embedding space. Building on this capability, prompt tuning [Zhou et al., 2022b,a, Khattak et al., 2023] emerged as an effective way to adapt these models by optimizing textual prompts instead of updating the entire model. Recently, test-time prompt tuning (TPT) [Shu et al., 2022] has attracted considerable attention by enabling adaptation using only unlabeled test samples, which is achieved by refining prompts at inference time with an entropy minimization (EM) loss over prediction probabilities computed from multiple augmented views [Feng et al., 2023, Xiao et al., 2025, Yoon et al., 2024, Sharifdeen et al., 2025]. This simple adaptation objective has proven effective in improving downstream task performance under distribution shift and has inspired a growing body of follow-up studies Feng et al. [2023], Zhu et al. [2024], Xiao et al. [2025], Choi and Kim [2026], Jang et al. [2026].

Despite its effectiveness, however, the EM loss used in TPT has an inherent limitation for trustworthy deployment. As analyzed in Section 6.3, it consistently encourages sharper prediction probabilities regardless of the characteristics of each test sample. Although this tendency can improve prediction

Preprint.

accuracy, it may also increase the mismatch between prediction correctness and confidence scores, thereby degrading model calibration. Given that vision-language models are increasingly used in real-world decision-making pipelines including safety-critical settings, such degradation in calibration is particularly concerning because confidence estimates are expected to faithfully reflect the likelihood of correctness [Liu et al., 2023, Basu et al., 2025, Khandelwal et al., 2022].

Recent studies have attempted to address this issue from several perspectives, including enlarging text-feature dispersion [Yoon et al., 2024], enforcing angular separation between class text features [Sharifdeen et al., 2025], and initializing prompts in flatter regions of the loss landscape [Jang et al., 2026]. While these methods improve calibration to a meaningful extent, they share a common critical limitation: they retain the original EM loss, the fundamental source of calibration degradation, and merely mitigate its side effects through regularization, leaving the underlying issue unresolved. Moreover, the standard EM loss in TPT is applied to the average prediction distribution obtained from augmented views, whereas the final prediction confidence at test time is determined by the original view. We empirically observe that adjusting the probabilities of augmentation views does not necessarily yield appropriate control over the probability of the original view, making precise calibration inherently difficult and suggesting the need to revisit the objective itself.

Motivated by this observation, we propose a new uncertainty-aware objective that directly incorporates the information from augmented views into the original-view prediction confidence while using the uncertainty of this information to modulate the adaptation strength. Specifically, we treat the prediction probabilities from the original view as a source distribution to be updated and construct a target distribution from augmented views. Furthermore, to construct a more reliable target distribution, we apply confidence-aware temperature scaling to each augmented-view prediction, sharpening confident predictions while softening uncertain ones. Our objective consists of a cross-entropy matching term and an adversarial target-entropy regularization term. The former transfers class-level evidence from augmented views to the original-view confidence used for the final prediction, while the latter modulates the update strength according to the uncertainty of the augmentation-based target. Notably, unlike the conventional EM loss, which consistently sharpens prediction probabilities, our objective adjusts confidence according to augmentation-derived uncertainty: our experiments show that it increases confidence when augmented views provide consistent class-level evidence, while suppressing overconfident predictions when they are ambiguous or inconsistent. As a result, the proposed objective simultaneously improves performance and model calibration, achieving state-of-the-art results across diverse benchmarks. Our contributions are summarized as follows:

• Through a comprehensive set of experiments and analyses, we systematically examine an inherent limitation of the conventional EM loss in TPT, revealing that its optimization objective is structurally misaligned with calibration.

• We propose a new uncertainty-aware objective that directly incorporates information from augmented views into the original-view prediction while modulating the adaptation strength based on augmentation-derived uncertainty.

• We achieve state-of-the-art results in both calibration and downstream task performance, without relying on additional regularization to compensate for the side effects of EM loss.

References (30)

  • Calibration-aware prompt learning for medical vision-language models
  • Latte: Language trajectory transformer
  • Dual-modality anchor-guided filtering for test-time prompt tuning (opens arXiv in a new tab)
  • Imagenet: A large-scale hierarchical image database
  • Diverse data augmentation with diffusions for effective test-time prompt tuning
  • On calibration of modern neural networks
  • A critical analysis of out-of-distribution generalization
  • Natural adversarial examples
  • Improving calibration in test-time prompt tuning for vision-language models via data-free flatness-aware prompt pretraining
  • Scaling up visual and vision-language representation learning with noisy text supervision
  • Soft calibration objectives for neural networks
  • Simple but effective: Clip embeddings for embodied ai
  • Maple: Multi-modal prompt learning
  • Trainable calibration measures for neural networks from kernel mean embeddings
  • Distribution-free predictive inference for regression
  • The devil is in the margin: Margin-based label smoothing for network calibration
  • Clip-driven universal model for organ segmentation and tumor detection
  • Obtaining well calibrated probabilities using bayesian binning
  • Learning Transferable Visual Models From Natural Language Supervision
  • Do imagenet classifiers generalize to imagenet? In International conference on machine learning, pages 5389–5400
  • O-tpt: Orthogonality constraints for calibrating test-time prompt tuning in vision-language models
  • Test-time prompt tuning for zero-shot generalization in vision-language models
  • Learning robust global representations by penalizing local predictive power
  • Medclip: Contrastive learning from unpaired medical images and text
  • Dynaprompt: Dynamic test-time prompt tuning
  • ESD: Expected Squared Difference as a Tuning-free Trainable Calibration Measure
  • C-tpt: Calibrated test-time prompt tuning for vision-language models via text feature dispersion
  • Conditional prompt learning for vision-language models
  • Learning to prompt for vision-language models
  • Efficient test-time prompt tuning for vision-language models (opens arXiv in a new tab)