by
Dynamic Distribution-Aware Uncertainty Tracking in Vision-Language Representation Learning
Abstract.
Uncertainty Quantification (UQ) aims to measure the reliability of model predictions, serving as a critical safeguard for deploying Vision-Language Models (VLMs) in safety-critical scenarios. Post-hoc approaches are widely adopted due to their lightweight nature, mapping the outputs of VLMs to uncertainty measures through learnable modules or inductive summarization. However, post-hoc approaches remain inherently confined to fitting the failure patterns of the source domain, ignoring the dynamic nature of test distributions. To address this challenge, we propose a Dynamic Distribution-Aware Uncertainty Quantification framework (DDA-UQ) that shifts the paradigm from static mapping to a dynamic distribution-aware process. During training, we leverage a Gaussian Mixture Model to model the VLMs’ embedding space and extract distributional evidence, thereby dynamically deriving uncertainty estimates. During inference, the design dynamically responds to changes in the data distribution. Extensive experiments demonstrate that our approach significantly outperforms state-of-the-art methods.
1. Introduction
Large-scale pretrained vision-language models (VLMs) such as CLIP (Radford et al., 2021) have emerged as a cornerstone of zero-shot learning, demonstrating remarkable performance across diverse applications ranging from image recognition (Zhang et al., 2024; Yao et al., 2023; Zhou et al., 2022; Li et al., 2026) and segmentation (Lan et al., 2024; Ding et al., 2023; Zhou et al., 2025) to retrieval (Wang et al., 2024a; Guo et al., 2025) without requiring task-specific fine-tuning (Laurençon et al., 2024; Tomani et al., 2023; Tu et al., 2024; Li et al., 2023). However, this remarkable performance often comes with the risk of overconfident mispredictions (Wang et al., 2024b). Consequently, deploying VLMs in safety-critical scenarios, such as autonomous driving and medical diagnosis (Wang et al., 2025; Chen et al., 2025; Kirchhof et al., 2024; Bang et al., 2024; Savage et al., 2025), necessitates reliable Uncertainty Quantification (UQ) (Chun, ; Murugesan et al., 2024; He et al., 2025; Shorinwa et al., 2025) as a safeguard against potential failures. Fundamentally, UQ serves as a proxy for failure prediction, outputting a normalized score in [0,1] where higher values indicate a greater risk of prediction error.
Unlike deep ensemble methods, such as MaskEnsembles (Durasov et al., 2021) and LoRA-Ensemble (Gal and Ghahramani, 2016) that require costly retraining, post-hoc methods estimate uncertainty directly from pre-trained representations, offering a lightweight and deployment-friendly alternative. Within this category, traditional methods like Doctor (Granese et al., 2021) construct training-free statistical discriminators from softmax outputs, while Rel-U (Gomes et al., 2023) learns an uncertainty matrix to characterize confusion structures. However, Doctor is limited by the model’s intrinsic calibration, and Rel-U tends to overfit the source domain’s confusion topology. Consequently, under distribution shifts, these methods struggle to effectively capture uncertainties. The state-of-the-art method, ViLU (Lafon et al., 2025), adopts a post-hoc training module. It utilizes the correctness of model predictions as a binary supervision signal to train a lightweight network that maps sample embeddings to risk scores based on training data. However, this approach relies on a static, sample-level perspective. By formulating uncertainty quantification as a fixed mapping, it suffers from limited generalization capability. Consequently, its learned decision boundary often fails to transfer effectively, causing the method to tend to produce high uncertainty estimates regardless of whether the VLM’s prediction is correct or incorrect, thereby limiting its effectiveness in real-world scenarios. As illustrated in Figure 1, the method generalizes well to in-distribution natural lynx images but fails on cartoon lynx images, resulting in invariably high uncertainty scores.
To transcend the limitations, we introduce the Dynamic Distribution Aware post-hoc Uncertainty Quantification framework (DDA-UQ), which reframes uncertainty estimation by shifting the perspective from a sample-centric view to a distribution-aware paradigm. Specifically, distinct from previous approaches, we jointly model the sample’s embedding and its relative position within class‑conditional distributions. We first model the VLM embedding space via a Gaussian Mixture Model (GMM) to capture the latent distribution. We extract an evidence vector from GMM comprising two metrics: (i) cognitive typicality derived from negative log-likelihood; and (ii) aleatoric ambiguity captured by posterior entropy. Then, we inject the evidence vector into visual representations to incorporate distributional context. Finally, the visual representations integrated with the evidence vector are passed through a simple linear layer followed by an activation function to produce the uncertainty score. We employ semantic-aware soft targets as supervisory signals, and the overall process is optimized using a cross-entropy loss. Moreover, our framework learns distribution-aware capabilities with strong generalization by synergistically maintaining a dynamic GMM and an evidence adaptation mechanism during training. This design enables real-time, data-driven adaptation at inference, thereby refining uncertainty quantification by dynamically adjusting to unlabeled test data. The main contributions of our method are as follows:
-
•
We propose DDA-UQ, a lightweight framework that reformulates uncertainty estimation from a static, sample-level decision problem into a distribution-level modeling task within the embedding space, thereby grounding the quantification in intrinsic statistical geometry.
-
•
During training, we dynamically update sample positional evidence and condition sample embeddings on this evidence. Simultaneously, we substitute rigid hard-label supervision (0/1) with soft targets decomposed into semantic severity and predictive fragility.
-
•
During inference, the framework operates in an online adaptive mode, continuously adapting to the test data stream by dynamically updating the sufficient statistics of the Gaussian Mixture Model using unlabeled samples.
Extensive experiments demonstrate that our method consistently outperforms static approaches, exhibiting superior generalization.
2. Related Work
Current approaches for uncertainty quantification in vision-language models predominantly follow a post-hoc paradigm. These methods do not modify or retrain the base model; instead, they estimate uncertainty directly from its raw outputs or by training an additional lightweight module. Although Deep Ensembles (Gal and Ghahramani, 2016; Havasi et al., ; Wen et al., ) perform well for uncertainty quantification, their computational cost scales linearly with the ensemble size, and they lack the flexibility required for online deployment, making them unsuitable for large-scale architectures. Consequently, deep ensemble methods are excluded from the scope of our discussion.
Output-Based. Methods in this category directly derive uncertainty signals from the model’s inference outputs or latent representations. Standard approaches include Entropy (Sensoy et al., 2018), which measures the dispersion of predictive probabilities, and MCM (Ming et al., 2022), which evaluates visual-textual alignment. The latter is often synergized with calibration methods (Gal and Ghahramani, 2016; Guo et al., 2017) to refine reliability. More advanced approaches delve into statistical and geometric properties: Doctor (Granese et al., 2021) constructs a training-free discriminator grounded in statistical hypothesis testing, while Rel-U (Gomes et al., 2023) adopts a geometric perspective, modeling uncertainty as the distance to the decision boundary. However, since these methods rely heavily on the static, intrinsic properties of the pre-trained model, they often struggle to adapt effectively to distribution shifts at test time.
Probabilistic Modeling. Beyond point estimates, methods like ProbVLM (Upadhyay et al., 2023) and BayesVLM (Baumann et al., 2024) introduce probabilistic modeling via Gaussian or Laplace approximations. However, these approaches rely on static parameterization fixed to the source domain, thereby failing to adapt to distribution shifts at test time.
Failure Prediction via Learned Risk Heads. Another line of work, exemplified by ViLU (Lafon et al., 2025), trains a lightweight module to predict model failure using prediction correctness as a supervised signal. However, this approach learns a static mapping from embeddings to risk scores based solely on the source domain. Consequently, it implicitly overfits the training distribution and struggles to generalize to distribution shifts or unseen concepts.
3. Preliminaries
3.1. Contrastive Vision-Language Models
During the pre-training stage, CLIP (Radford et al., 2021) learns aligned visual and textual representations by maximizing the cosine similarity between image and text embeddings through a contrastive objective on large-scale image–text pairs. Unlike conventional classifiers trained on closed-set labels, CLIP exploits open-set semantic supervision from natural language, enabling it to capture a broad spectrum of visual concepts. As a result, CLIP supports zero-shot classification at test time without any additional training.
Specifically, given a test image belonging to one of candidate categories, let denote the visual embedding produced by the image encoder. For each class , a text embedding is obtained by encoding a prompt such as “a photo of {class c}”, where the placeholder is replaced with the corresponding category name. The zero-shot predictive probability for class is then computed as
| (1) |
where is CLIP’s learned temperature parameter and denotes cosine similarity.
3.2. Gaussian Distribution Modeling in the Embedding Space
Recent studies have shown that CLIP representations exhibit pronounced class-conditional clustering behavior in the embedding space, and can be well approximated by multivariate Gaussian distributions (Zanella et al., 2024; Wang et al., ; Zhu et al., 2024). Motivated by these findings, we shift the perspective from evaluating a sample in isolation to assessing it within a collective statistical context. This motivates us to adopt a generative view inspired by Gaussian Discriminant Analysis (GDA), explicitly modeling the feature distribution to enable distribution-aware inference.
Specifically, we assume that the embedding distribution of each semantic class follows a multivariate Gaussian. Given an image , the class-conditional likelihood for class is defined as:
| (2) |
where and denote the mean vector and covariance matrix of class , respectively. Consequently, the marginal distribution of is formulated as a Gaussian mixture over all classes:
| (3) |
where denotes the class prior. Under the uniform prior assumption , the posterior distribution is fully determined by the relative geometry between the embedding and the class-conditional Gaussian component:
| (4) |
Consequently, the posterior can be reformulated into a normalized exponential (softmax) form
| (5) |
where the discriminant function is
| (6) |
Intuitively, quantifies the compatibility between the embedding and class by balancing two geometric factors: the quadratic term represents the Mahalanobis distance to the class mean, while the log-determinant term penalizes class-wise dispersion. This formulation ensures that the posterior is governed not just by proximity to a prototype, but by the intrinsic shape of the class distribution. It is worth noting that, in our actual implementation, we adopt a shared covariance matrix across all semantic classes, instead of the class-specific covariance matrices described above. This modification simplifies the model while maintaining the core distribution-aware inference capability. For explanations and reasoning regarding this part, see Appendix A.1 for details.
4. Method
Existing UQ methods for VLMs typically rely on static estimates fixed by training data (e.g., Eq. (1)). We argue this paradigm is fundamentally limited: by evaluating uncertainty in isolation based on rigid decision boundaries, these methods fail to generalize, leading to unreliable estimates under distribution shifts. Leveraging the Gaussian framework (Sec. 3.2), we propose a shift from static sample-level evaluation to dynamic distributional adaptation. Our core insight is that UQ must be location-aware—grounded in the sample’s position within the feature manifold.
4.1. Distributional Evidence
Building on the Gaussian modeling in Sec. 3.2, we extract two complementary distributional evidences to characterize uncertainty: distributional typicality and semantic ambiguity.
We first quantify the support of a sample within the global embedding space using the negative log-likelihood (NLL) of the mixture density:
| (7) |
This metric assesses how well a sample conforms to the learned target manifold. Low NLL values indicate distributionally typical samples, whereas high values flag outliers in low-density regions, signaling potential out-of-distribution inputs. Crucially, captures global geometric support independent of specific class assignments.
While density assesses representativeness, it fails to capture separability; a sample can be distributionally typical yet ambiguous if it resides in the intersection of multiple Gaussian components. To isolate this, we compute the entropy of the classification posterior:
| (8) |
Elevated entropy indicates that the sample lies near decision boundaries where class prototypes overlap, reflecting high aleatoric uncertainty. Conversely, minimized entropy corresponds to samples deeply embedded within a single class-specific cluster. Finally, we standardize these metrics to ensure scale consistency and aggregate them into a compact evidence vector .
4.2. Framework
After extracting evidence from the distribution, we combine the evidence with the representation vectors. Specifically, the visual embedding is first mapped to a hidden representation via a linear projection. Simultaneously, a gating network processes the evidence vector to generate sample-specific affine transformation parameters—namely, a scaling factor and a shift term :
| (9) |
where are learnable projection matrices and denotes the sigmoid function. The visual features are then modulated as . The gating branch introduces only a negligible number of parameters, and the increased expressiveness comes primarily from the structural prior: the uncertainty quantification is forced to be a function of visual features conditioned on their distributional validity. This mechanism enables the distributional evidence to perform channel-wise recalibration of visual features. For instance, evidence of distributional anomaly (e.g., a high value) can suppress activations that lack support from the target distribution, thereby guiding the predictor to rely on more reliable signals. Then, a two-layer MLP predicts the scalar uncertainty score from the modulated representation:
| (10) |
where is the ReLU activation function, and ensures the output lies in .
4.3. Training Procedure and Update Process
We optimize the predicted score using a standard binary cross-entropy objective. Departing from conventional hard label, which assigns 0 to correct predictions and 1 to errors (Lafon et al., 2025), we construct a continuous soft label theoretically derived from the Gaussian discriminant distribution. This soft label integrates both the semantic severity of misclassifications and the predictive fragility of correct predictions. Specifically, for misclassified samples (hard label: 1), the risk is scaled by semantic severity; this design penalizes overconfident and semantically implausible errors more heavily while attenuating the risk for confusions between related concepts. Conversely, for correctly classified samples (hard label 0), we characterize fragility using the probability margin of top-2 predictions (detailed derivation in Appendix A.3). Given this soft label and the predicted score , we achieve calibrated uncertainty estimation by minimizing the following loss function:
| (11) |
where denotes the batch size.
Algorithm 1 outlines the training procedure of our dynamic uncertainty estimation framework from a batch perspective. In Step 1, the model updates the Gaussian Mixture Model via a momentum-based Exponential Moving Average (EMA) (Klinker, 2011). This procedure is mathematically equivalent to a streaming Expectation-Maximization (EM) (Greff et al., 2017; Moon, 1996) process (see Appendix A.2). By continuously synchronizing statistical estimates with the underlying feature manifold, this mechanism fosters robust evidence extraction from partial distributional observations, thereby enabling the framework to resiliently accommodate diverse distributional shifts. To unify supervised training and unsupervised adaptation, we employ the discriminative mechanism from Eq. (4) to define a gate responsibility :
| (12) |
where is the indicator function and denotes the target class, and controls the strength of supervision. These responsibilities serve as dynamic weights for updating the GMM statistics: a sample of batch contributes to the sufficient statistics of class proportional to . During training (), this formulation softly biases the responsibilities toward the ground-truth label, driving the GMM parameters to converge to accurate class-conditional densities.
Subsequently, Step 2 extracts and standardizes distributional evidence based on density and semantic ambiguity. In Step 3, a gating network conditions the visual features on this evidence, followed by a two-layer MLP predictor that outputs calibrated uncertainty scores aligned with the current distributional perspective.
During inference (), the supervision term vanishes and reduces to the zero-shot posterior, enabling the model to self-update its parameters based on its own predictions in a fully unsupervised manner. This design naturally endows the model with test-time adaptation capabilities. By exclusively updating the GMM statistics while keeping the prediction head frozen, the model efficiently calibrates distributional evidence to the target distribution, thereby avoiding computationally expensive gradient-based parameter fine-tuning.
| Caltech101 | FGVCAircraft | StanfordCars | SUN397 | UCF101 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 91.4% | 18.1% | 60.1% | 62.1% | 61.6% | ||||||
| Method | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 |
| MCM | 87.3±0.25 | 69.5±0.98 | 76.4±0.48 | 82.1±1.05 | 80.9±0.32 | 72.8±1.12 | 79.2±0.41 | 76.3±0.87 | 83.5±0.28 | 69.4±0.92 |
| TS + MCM | 89.7±0.21 | 56.3±1.15 | 75.2±0.52 | 81.9±1.08 | 82.1±0.38 | 72.5±1.08 | 78.3±0.39 | 74.9±0.92 | 83.9±0.31 | 68.9±0.95 |
| Entropy | 85.4±0.34 | 79.5±0.87 | 73.6±0.58 | 84.2±0.95 | 78.9±0.41 | 76.8±1.21 | 75.2±0.47 | 79.3±1.05 | 82.9±0.36 | 73.6±0.88 |
| Doctor | 88.0±0.29 | 65.9±1.02 | 75.3±0.51 | 82.0±1.11 | 81.5±0.35 | 72.5±1.14 | 78.9±0.43 | 76.5±0.96 | 85.2±0.33 | 69.8±1.07 |
| Rel-U | 89.5±0.26 | 57.8±1.34 | 69.1±0.72 | 81.8±1.22 | 74.9±0.62 | 79.5±1.32 | 74.5±0.58 | 80.7±1.18 | 83.5±0.40 | 62.0±1.45 |
| ProbVLM | 90.5±0.24 | 51.6±1.52 | 74.1±0.53 | 82.9±1.03 | 79.0±0.49 | 74.9±1.15 | 77.3±0.51 | 77.5±0.99 | 87.9±0.22 | 54.2±1.68 |
| BayesVLM | 93.3±0.18 | 36.9±1.78 | 71.3±0.65 | 85.0±0.89 | 86.9±0.31 | 62.8±1.54 | 79.6±0.37 | 74.1±1.21 | 85.1±0.42 | 65.7±1.12 |
| ViLU | 95.9±0.12 | 17.6±1.95 | 81.7±0.41 | 72.4±1.58 | 89.6±0.25 | 47.3±1.82 | 88.1±0.28 | 49.6±1.67 | 95.2±0.15 | 21.3±1.89 |
| \rowcolorlightblue Ours (Base) | 94.7±0.14 | 14.8±1.67 | 84.7±0.35 | 61.2±1.35 | 93.2±0.23 | 38.9±1.55 | 86.1±0.31 | 53.3±1.48 | 93.8±0.19 | 20.1±1.72 |
| \rowcolorlightpurple Ours (Adaptation) | 95.1±0.13 | 15.1±1.58 | 85.9±0.32 | 59.0±1.42 | 94.3±0.21 | 39.2±1.46 | 87.2±0.26 | 49.1±1.52 | 96.6±0.11 | 16.9±1.65 |
5. Experiments
Experimental Setup
We focus on uncertainty quantification for VLMs in zero-shot classification tasks, and consider five experimental scenarios: standard benchmark settings, distribution shift, comparison of test-time adaptation scenarios, multi-label classification, and OOD scenarios. In addition, we provide ablation studies and qualitative visualizations to further demonstrate the efficacy of the proposed uncertainty quantification approach.
Datasets. We employ two types of benchmark datasets: (i) image–label datasets and (ii) image–caption datasets.
Baselines. To comprehensively evaluate our approach, we compare it against state-of-the-art methods discussed in the Related Work section, including: (i) output-based post-hoc methods (MCM, TS+MCM, Entropy, Doctor, Rel-U), (ii) probabilistic modeling approaches (ProbVLM, BayesVLM), and (iii) training a lightweight module (ViLU).
Implementation Details. In the main experiments, we adopt CLIP ViT-B/32 as the default backbone network. We evaluate two variants of the framework: the Base version, which accesses the entire test set offline to estimate distribution statistics, and the Adaptation version, which corresponds to an online deployment scenario where samples arrive sequentially and the statistics are updated incrementally on a per-sample basis. We employ five-fold cross-validation and report the mean value along with the standard deviation. In our method, the covariance is shared, which avoids the computational and storage overhead on high-dimensional datasets such as ImageNet-1K.
Metrics. We evaluate our model using two widely adopted metrics in uncertainty quantification and failure detection: (i) the False Positive Rate at 95% True Positive Rate (FPR95), and (ii) the Area Under the Receiver Operating Characteristic Curve (AUC). These metrics measure the model’s ability to identify high-uncertainty (or potentially erroneous) predictions.
Main Result
UQ on Standard Benchmarks. We evaluate failure prediction performance on five standard image-label benchmarks, where the training and test sets are stratified splits sampled from the same dataset. As shown in Table 1, our framework achieves superior or comparable performance to state-of-the-art methods in most cases. Compared to post-hoc approaches that rely on fixed decision rules, such as MCM, Doctor, and BayesVLM, our learning-based method demonstrates significant performance gains. Our approach outperforms the current SOTA method ViLU on the majority of benchmarks. Although ViLU also employs a trainable failure predictor, it relies on a static mapping from embeddings to risk scores. In contrast, DDA-UQ explicitly models the statistical geometry of the embedding space, an advantage that becomes particularly pronounced in fine-grained classification tasks with high semantic ambiguity. On the FGVCAircraft dataset, where frequent confusion among visually similar aircraft variants leads to a low base accuracy of only 18.1%, ViLU achieves an AUC of 81.7%. By leveraging an aleatoric ambiguity measure derived from the entropy of a Gaussian mixture model, our method effectively identifies these ambiguous samples, improving the AUC to 85.9% (a gain of +4.2%) and substantially reducing FPR95. Even on datasets where ViLU exhibits competitive performance, such as Caltech101, our method achieves a markedly lower FPR95 (e.g., 14.8 vs. 17.6 for Ours (Base), and 15.1 vs. 17.6 for Ours (Adaptation)), indicating that our risk estimation is more conservative and reliable for safety-critical applications. Notably, our adaptive variant achieves superior or comparable performance to the base version across multiple datasets, suggesting that the streaming exponential moving average update mechanism not only enables efficient adaptation to test-time distribution shifts, but also acts as a robust regularizer by preventing the statistical parameters from being overly influenced by outliers in the full test set. Experimental results on image-caption datasets are reported in Appendix A.4.
| ImageNet-1k | ImageNet-R | ImageNet-C | CIFAR-10 | CIFAR-10-C | CIFAR-100 | CIFAR-100-C | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 66.7% | 74.3% | 46.8% | 88.3% | 75.2% | 68.6% | 55.8% | ||||||||
| Method | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 |
| MCM | 80.8±0.35 | 71.3±1.05 | 78.3±0.42 | 65.2±1.12 | 72.1±0.48 | 81.6±1.18 | 89.3±0.41 | 52.8±0.87 | 83.8±0.63 | 62.3±0.94 | 82.1±0.52 | 67.9±1.03 | 77.5±0.71 | 74.1±1.12 |
| TS + MCM | 80.7±0.36 | 71.5±1.08 | 83.9±0.31 | 58.4±1.05 | 80.7±0.32 | 71.5±1.12 | 90.2±0.38 | 51.0±0.92 | 84.6±0.55 | 61.5±0.79 | 84.4±0.47 | 67.9±0.88 | 78.9±0.64 | 73.4±0.97 |
| Entropy | 78.3±0.42 | 76.8±1.15 | 75.8±0.48 | 69.4±1.22 | 70.5±0.52 | 84.2±1.28 | 88.2±0.45 | 60.4±1.15 | 80.9±0.72 | 69.2±1.08 | 79.3±0.61 | 72.5±1.21 | 74.1±0.82 | 78.6±1.33 |
| Doctor | 80.3±0.38 | 72.9±1.12 | 76.9±0.45 | 67.8±1.18 | 71.8±0.49 | 82.5±1.25 | 89.0±0.36 | 57.1±0.95 | 84.0±0.58 | 63.9±0.86 | 82.9±0.48 | 69.2±1.05 | 77.2±0.69 | 75.9±1.18 |
| Rel-U | 75.1±0.52 | 85.0±1.42 | 81.0±0.39 | 58.2±1.08 | 75.1±0.47 | 85.0±1.38 | 85.7±0.52 | 55.0±1.01 | 79.7±0.68 | 65.3±0.82 | 80.4±0.56 | 68.8±0.93 | 74.6±0.77 | 76.5±1.25 |
| ProbVLM | 78.7±0.41 | 77.0±1.18 | 81.2±0.37 | 62.3±1.15 | 75.6±0.46 | 79.8±1.22 | 96.1±0.28 | 21.8±0.65 | 89.5±0.35 | 35.1±0.73 | 79.8±0.43 | 69.1±0.98 | 75.2±0.54 | 74.0±0.91 |
| BayesVLM | 81.5±0.33 | 70.3±1.05 | 83.5±0.29 | 58.7±1.08 | 78.9±0.39 | 76.4±1.18 | 92.0±0.33 | 45.4±0.76 | 86.8±0.42 | 54.0±0.69 | 86.5±0.39 | 60.9±0.84 | 81.5±0.47 | 68.4±1.05 |
| ViLU | 89.5±0.22 | 47.4±1.58 | 78.2±0.44 | 66.8±1.25 | 73.4±0.51 | 86.3±1.45 | 97.9±0.22 | 8.2±0.53 | 95.0±0.26 | 16.9±0.45 | 91.0±0.31 | 36.0±0.78 | 86.2±0.38 | 43.1±0.62 |
| \rowcolorlightblue Ours (Base) | 91.2±0.18 | 43.8±1.45 | 88.9±0.24 | 48.6±1.22 | 84.7±0.31 | 65.1±1.28 | 98.5±0.18 | 7.5±0.48 | 96.1±0.22 | 14.8±0.42 | 92.3±0.27 | 32.5±0.72 | 87.9±0.34 | 39.5±0.58 |
| \rowcolorlightpurple Ours (Adaptation) | 92.4±0.15 | 38.6±1.32 | 90.5±0.19 | 43.2±1.15 | 86.3±0.27 | 58.9±1.22 | 99.0±0.15 | 6.8±0.42 | 97.2±0.19 | 12.5±0.38 | 93.8±0.23 | 29.1±0.65 | 89.4±0.29 | 35.2±0.52 |
Robustness to Distribution Shift. As shown in the Table 2, we evaluate the robustness of uncertainty estimation under distribution shift on ImageNet (CIFAR) variants. For methods that require training, we train the uncertainty estimators on the ImageNet-1K (CIFAR-10) training set and perform inference on the ImageNet-1K (CIFAR-10,CIFAR-100) validation set, ImageNet-R, and ImageNet-C (CIFAR-10-C,CIFAR-100-C) . Notably, distribution shift does not necessarily correspond to a monotonic decrease in zero-shot accuracy. For example, CLIP achieves even higher accuracy on ImageNet-R (74.3%) than on the original ImageNet (66.7%), while suffering a substantial degradation on ImageNet-C (46.8%). This setting therefore provides a stringent test of whether UQ remains aligned with the model’s effective predictive competence, rather than merely reacting to the distribution shift itself. We observe that parameterized uncertainty estimators that rely on fitting training-set patterns exhibit limited robustness under distribution shift. In particular, ViLU, which learns a static mapping from embeddings to risk scores using supervised failure signals, suffers from severe miscalibration once the target distribution deviates from the training distribution. For instance, while ViLU achieves strong performance on ImageNet (AUC 89.5), it degrades sharply on ImageNet-R and ImageNet-C, indicating that its learned decision boundaries fail to generalize beyond the training distribution. In contrast, post-hoc methods that directly operate on model outputs, such as MCM and Rel-U, exhibit more stable behavior across distributions, as they inherit the zero-shot generalization capability of the underlying VLM. However, their performance remains limited due to the lack of explicit modeling of the global feature-space geometry. Our approach consistently achieves the best performance across all distributions. By dynamically estimating the embedding-space distribution and adapting GMM statistics to the target data stream, our framework avoids fitting training-specific uncertainty patterns. Instead, it derives uncertainty from the evolving distributional structure of the target distribution itself. As a result, both the Base and adaptation variants maintain high AUC and low FPR95 under all distribution shifts, demonstrating robust and reliable uncertainty estimation even when the data distribution changes substantially.
| ImageNet-1K | ImageNet-R | ImageNet-C | ||||
|---|---|---|---|---|---|---|
| Method | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 |
| ViLU | 89.5±0.22 | 47.4±1.58 | 78.2±0.44 | 66.8±1.25 | 73.4±0.51 | 86.3±1.45 |
| MCM | 80.8±0.35 | 71.3±1.05 | 78.3±0.42 | 65.2±1.12 | 72.1±0.48 | 81.6±1.18 |
| ViLU + DOTA (Han et al., 2025) | 91.8±0.20 | 41.2±1.40 | 84.1±0.38 | 54.7±1.32 | 80.5±0.44 | 68.9±1.28 |
| MCM + DOTA | 83.5±0.33 | 66.8±1.15 | 81.9±0.41 | 60.3±1.21 | 78.6±0.47 | 74.2±1.35 |
| \rowcolorlightblue Ours (Base) | 91.2±0.18 | 43.8±1.45 | 88.9±0.24 | 48.6±1.22 | 84.7±0.31 | 65.1±1.28 |
| \rowcolorlightpurple Ours (Full) | 92.4±0.15 | 38.6±1.32 | 90.5±0.19 | 43.2±1.15 | 86.3±0.27 | 58.9±1.22 |
TTA-enhanced baselines. As shown in Table 3, to further investigate uncertainty estimation in the online setting, we design the following experiments. All methods are trained on ImageNet-1K and evaluated under distribution shifts from the perspective of test-time adaptation (TTA). We construct two composite baselines: ViLU + DOTA and MCM + DOTA, where DOTA is a test-time adaptation strategy. We evaluate all configurations on distribution-shift datasets including ImageNet-R and ImageNet-C. The experimental results demonstrate that our method consistently outperforms state-of-the-art uncertainty quantification methods and their combinations with test-time adaptation (e.g., ViLU+DOTA and MCM+DOTA) across all datasets. This indicates that uncertainty quantification directly derived from the data distribution achieves better performance than existing state-of-the-art ViLU combined with test-time adaptation, leading to more robust calibration.
| VOC 2007 | MS-COCO | NUS-WIDE | ||||
|---|---|---|---|---|---|---|
| 78.4% | 59.2% | 46.7% | ||||
| Method | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 |
| Doctor | 80.1±0.38 | 59.4±1.22 | 75.6±0.42 | 76.2±1.28 | 64.4±0.52 | 89.1±1.18 |
| Rel-U | 84.2±0.31 | 52.4±1.32 | 78.3±0.36 | 70.1±1.35 | 67.6±0.45 | 86.9±1.22 |
| BayesVLM | 83.9±0.32 | 51.7±1.35 | 79.8±0.34 | 67.5±1.38 | 74.6±0.38 | 73.9±1.45 |
| ViLU | 85.7±0.28 | 43.4±1.48 | 80.9±0.31 | 63.8±1.42 | 63.8±0.54 | 91.6±1.12 |
| \rowcolorlightblue Ours (Base) | 88.1±0.24 | 36.3±1.52 | 84.2±0.26 | 54.1±1.48 | 68.4±0.42 | 63.5±1.52 |
| \rowcolorlightpurple Ours (Adaptation) | 89.4±0.21 | 34.9±1.55 | 85.6±0.22 | 52.7±1.51 | 71.2±0.38 | 61.8±1.58 |
Complex Semantic Distributions. We evaluate our method on multi-label datasets to distinguish genuine uncertainty from the ambiguity caused by class co-existence. Crucially, we adopt a strict “exact match” criterion, where a prediction is correct only if all relevant labels are accurate. This renders Softmax-based baselines (e.g., MCM) ill-suited, as their inherent mutual-exclusivity assumption forces label competition, preventing accurate risk quantification for partial misclassifications. As shown in Table 4, our method achieves the best calibration across all datasets. The Adaptation variant consistently improves upon the Base baseline, validating the effectiveness of test-time distribution updates. Notably, on the semantically dense MS-COCO, our approach outperforms ViLU, demonstrating superior capability in isolating uncertainty from multi-label ambiguity. Even on the challenging NUS-WIDE dataset, where absolute performance naturally declines due to lower zero-shot accuracy, our method maintains a distinct relative advantage.
| DTD | SVHN | Places365 | ||||
|---|---|---|---|---|---|---|
| Method | AUC | FPR95 | AUC | FPR95 | AUC | FPR95 |
| MCM | 77.4 | 77.9 | 88.5 | 48.2 | 85.3 | 52.7 |
| KNN (Sun et al., 2022) | 76.9 | 82.6 | 88.0 | 49.8 | 84.5 | 54.9 |
| GEN (Liu et al., 2023) | 76.4 | 80.2 | 87.1 | 52.4 | 83.9 | 57.1 |
| DPU (Li et al., 2025) | 87.2 | 55.9 | 91.2 | 41.5 | 89.8 | 39.2 |
| Barrier (Peng et al., ) | 93.8 | 28.8 | 95.5 | 18.7 | 94.2 | 25.6 |
| \rowcolorlightblue Ours(Base) | 95.1 | 24.3 | 96.7 | 22.1 | 96.1 | 21.4 |
Applied to OOD scenarios. Although UQ and OOD detection address distinct reliability objectives, our framework exhibits remarkable task generalization through the underlying GMM modeling. Specifically, without any architectural modifications for OOD tasks, our method naturally generalizes to OOD scenarios by leveraging the dual properties of GMM-derived evidence. The density-based evidence () inherently functions as a global sensor to capture the deviation of samples from the known manifold, effectively addressing OOD detection. Meanwhile, the ambiguity-based evidence () provides fine-grained sensitivity to semantic confusion at decision boundaries within the established manifold, facilitating robust UQ. This seamless adaptation underscores that our framework captures intrinsic statistical structures rather than merely learning task-specific heuristics. Table 5 further confirms improved OOD detection with ImageNet-1K as in-distribution, where we outperform ViLU on DTD, SVHN, and Places365 (e.g., on DTD, AUC and FPR95). Overall, these results demonstrate that our framework improves both in-distribution failure prediction and robustness under distribution shifts, providing a practical Uncertainty quantification solution for real-world VLM deployment.
5.1. Questions and Discussions
Q1: Does uncertainty depend on the model performance itself?
To some extent, this conclusion applies to all uncertainty quantification methods. A reliable backbone is a prerequisite for effective confidence estimation: no downstream uncertainty quantification module can correct the poor discriminative features generated by a weak backbone. However, as shown in Figure 3, our method exhibits excellent generalization performance across five vision backbones. Our two proposed methods achieve top results on nearly all backbones. Notably, Ours (Adaptation) achieves the highest AUC and lowest FPR95 across all five architectures, fully demonstrating its good robustness to different backbone capacities.
Q2: Is the Gaussian assumption for high-dimensional CLIP embeddings reasonable?
We fully agree that no strict multivariate Gaussian exists in high dimensions, and we do not claim CLIP embeddings strictly follow Gaussianity—we only use it as a reasonable approximation for class-conditional embeddings, supported by (Zanella et al., 2024). These works verify that CLIP embeddings present clear class-clustering on semantic manifolds, where Gaussian serves as an optimal and concise approximation. Our GMM only relies on first/second-order statistics (mean, covariance) to model distribution geometry, free from strict Gaussian constraints. Moreover, CLIP embeddings reside on low-dimensional semantic manifolds with effective dimensionality far lower than the apparent dimension, thus avoiding modeling failure caused by the curse of dimensionality.
5.2. Ablation Study
We examine the impact of each core component in Table 6. Starting from a visual-only Baseline (a), we observe that: (i) Impact of Distributional Context: Incorporating GMM-derived evidence (b) provides a substantial performance leap. This confirms that density and ambiguity signals offer critical context for identifying failure modes that raw visual features alone cannot capture. (ii) Conditioned Feature Fusion: Moving from simple concatenation to our adaptive modulation (c) significantly enhances results. This demonstrates the superiority of conditioning the visual embeddings on distributional evidence, which enables the model to actively recalibrate visual activations based on their distributional validity rather than merely treating evidence as auxiliary input. (iii) Benefit of Dynamic Adaptation: The inclusion of Soft Risk Labels (d) and dynamic GMM Updates (e) yields the best performance. These components allow the model to learn fine-grained risk nuances and maintain alignment with the target distribution’s evolving manifold, which is essential for robust uncertainty quantification.
| Variant | Evid. | Mod. | Soft | Update | AUC | FPR95 |
|---|---|---|---|---|---|---|
| (a) Baseline | - | - | - | - | 88.1 | 68.7 |
| (b) + Evidence | ✓ | - | - | - | 92.8 | 24.2 |
| (c) + Modulation | ✓ | ✓ | - | - | 93.5 | 19.2 |
| (d) + Soft label | ✓ | ✓ | ✓ | - | 94.7 | 15.8 |
| \rowcolorlightblue (e) Full Model | ✓ | ✓ | ✓ | ✓ | 95.2 | 14.4 |
5.3. Analysis
Figure 4 highlights the vulnerability of ViLU under distribution shift: its dependence on static semantic embeddings leads to a misalignment between the frozen text anchors and the shifted visual features. Consequently, it fails to distinguish between true semantic novelty and mere stylistic variations (e.g., in ImageNet-R), causing miscalibrated risk scores. Conversely, our framework shifts the paradigm from static matching to dynamic adaptation. By modeling the visual manifold via a dynamic GMM and explicitly accounting for semantic ambiguity, we enable the uncertainty estimation to actively synchronize with the target distribution, ensuring robust calibration even in unsupervised environments.
As illustrated in Figure 5, our framework demonstrates remarkable efficiency in both training and inference phases. First, regarding training efficiency (Figure 5a), our method rapidly converges, surpassing the strong zero-shot baseline (MCM) using as little as 20% of the training data. We attribute this to our statistical GMM modeling: unlike discriminative methods (e.g., ViLU) that require abundant samples to delineate complex boundaries, estimating sufficient statistics (means and covariances) is inherently sample-efficient. Furthermore, the semantic-aware soft target accelerates convergence by providing dense, continuous gradient signals from each sample. Second, regarding inference stability (Figure 5b), our method maintains robust performance across varying batch sizes. Notably, even at a batch size of 1 (online streaming setting), the model achieves competitive FPR95, which further improves and saturates around a batch size of 32. This confirms that our EMA update mechanism is stable and does not strictly require large buffers, making it highly suitable for real-time, resource-constrained deployment.
Additional qualitative and parameter analyses are provided in Appendix A.4. The case study under distribution shift shows that, although CLIP can remain robust or even improve its recognition performance on shifted data, existing uncertainty estimation methods such as ViLU may still suffer substantial degradation due to their reliance on static source-domain representations. In contrast, our distribution-aware framework consistently yields more reliable uncertainty estimates by adapting to the evolving representation structure of the target distribution. We further analyze the sensitivity to the number of GMM components and observe that performance improves as increases and becomes stable when approaches the number of classes . Accordingly, we set as the default configuration in all experiments.
6. Conclusion
This work introduces the Dynamic Distribution-Aware Uncertainty Quantification framework (DDA-UQ) for Vision-Language Models, which overcomes the limitations of static uncertainty estimation. By leveraging a Gaussian Mixture Model to capture the embedding space structure, DDA-UQ shifts uncertainty quantification from a fixed mapping to a dynamic, distribution-aware process. Extensive experiments validate that our framework significantly improves robustness to distribution shifts, providing a reliable safety mechanism for deploying VLMs in real-world, non-stationary environments.
Acknowledgements
We would like to thank the anonymous reviewers for their insightful comments. This work is supported by the JiangSu Natural Science Foundation under Grant No.BK20251989; the National Natural Science Foundation of China under Grants Nos. 62172208, 62441225, 61972192; the Fundamental and Interdisciplinary Disciplines Breakthrough Plan of the Ministry of Education of China (No.JYB2025XDXM118); the “111 Center” (No. B26023). This work is partially supported by Collaborative Innovation Center of Novel Software Technology and Industrialization.
References
- Active prompt learning in vision language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 27004–27014. Cited by: §1.
- Post-hoc probabilistic vision-language models. arXiv preprint arXiv:2412.06014. Cited by: §2.
- Hyperdimensional uncertainty quantification for multimodal uncertainty fusion in autonomous vehicles perception. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 22306–22316. Cited by: §1.
- [4] Improved probabilistic image-text representations. In The Twelfth International Conference on Learning Representations, Cited by: §1.
- Open-vocabulary universal image segmentation with maskclip. In Proceedings of the 40th International Conference on Machine Learning, pp. 8090–8102. Cited by: §1.
- Masksembles for uncertainty estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13539–13548. Cited by: §1.
- Dropout as a bayesian approximation: representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059. Cited by: §1, §2, §2.
- A data-driven measure of relative uncertainty for misclassification detection. In The Twelfth International Conference on Learning Representations, Cited by: §1, §2.
- Doctor: a simple method for detecting misclassification errors. Advances in Neural Information Processing Systems 34, pp. 5669–5681. Cited by: §1, §2.
- Neural expectation maximization. Advances in neural information processing systems 30. Cited by: §4.3.
- On calibration of modern neural networks. In International conference on machine learning, pp. 1321–1330. Cited by: §2.
- A parameter-efficient and fine-grained prompt learning for vision-language models. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 31346–31359. Cited by: §1.
- Dota: distributional test-time adaptation of vision-language models. Advances in Neural Information Processing Systems. Cited by: Table 3.
- [14] Training independent subnetworks for robust prediction. In International Conference on Learning Representations, Cited by: §2.
- A survey on uncertainty quantification methods for deep learning. ACM Computing Surveys. Cited by: §1.
- Pretrained visual uncertainties. arXiv preprint arXiv:2402.16569. Cited by: §1.
- Exponential moving average versus moving exponential average. Mathematische Semesterberichte 58 (1), pp. 97–107. Cited by: §4.3.
- ViLU: learning vision-language uncertainties for failure prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17807–17817. Cited by: §1, §2, §4.3.
- Proxyclip: proxy attention improves clip for open-vocabulary segmentation. In European Conference on Computer Vision, pp. 70–88. Cited by: §1.
- What matters when building vision-language models?. Advances in Neural Information Processing Systems 37, pp. 87874–87907. Cited by: §1.
- Blip-2: bootstrapping language-image pre-training with frozen image encoders and large language models. In International conference on machine learning, pp. 19730–19742. Cited by: §1.
- Multi-label test-time adaptation with bayesian conditional priors. arXiv preprint arXiv:2606.12925. Cited by: §1.
- Dpu: dynamic prototype updating for multimodal out-of-distribution detection. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 10193–10202. Cited by: Table 5.
- Gen: pushing the limits of softmax-based out-of-distribution detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 23946–23955. Cited by: Table 5.
- Delving into out-of-distribution detection with vision-language representations. Advances in neural information processing systems 35, pp. 35087–35102. Cited by: §2.
- The expectation-maximization algorithm. IEEE Signal processing magazine 13 (6), pp. 47–60. Cited by: §4.3.
- Robust calibration of large vision-language adapters. In European Conference on Computer Vision, pp. 147–165. Cited by: §1.
- [28] OOD-barrier: build a middle-barrier for open-set single-image test time adaptation via vision language models. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, Cited by: Table 5.
- Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748–8763. Cited by: §1, §3.1.
- Large language model uncertainty proxies: discrimination and calibration for medical diagnosis and treatment. Journal of the American Medical Informatics Association 32 (1), pp. 139–149. Cited by: §1.
- Evidential deep learning to quantify classification uncertainty. Advances in neural information processing systems 31. Cited by: §2.
- A survey on uncertainty quantification of large language models: taxonomy, open research challenges, and future directions. ACM Computing Surveys. Cited by: §1.
- Out-of-distribution detection with deep nearest neighbors. In International conference on machine learning, pp. 20827–20840. Cited by: Table 5.
- Beyond in-domain scenarios: robust density-aware calibration. In International Conference on Machine Learning, pp. 34344–34368. Cited by: §1.
- An empirical study into what matters for calibrating vision-language models. In International Conference on Machine Learning, Cited by: §1.
- Probvlm: probabilistic adapter for frozen vison-language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1899–1910. Cited by: §2.
- Text is mass: modeling as stochastic embedding for text-video retrieval. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16551–16560. Cited by: §1.
- Uncertainty quantification for safe and reliable autonomous vehicles: a review of methods and applications. IEEE Transactions on Intelligent Transportation Systems. Cited by: §1.
- Understanding and mitigating miscalibration in prompt tuning for vision-language models. In Forty-second International Conference on Machine Learning, Cited by: §1.
- [40] A hard-to-beat baseline for training-free clip-based adaptation. In The Twelfth International Conference on Learning Representations, Cited by: §3.2.
- [41] BatchEnsemble: an alternative approach to efficient ensemble and lifelong learning. In International Conference on Learning Representations, Cited by: §2.
- Visual-language prompt tuning with knowledge-guided context optimization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6757–6767. Cited by: §1.
- Boosting vision-language models with transduction. Advances in Neural Information Processing Systems 37, pp. 62223–62256. Cited by: §3.2, §5.1.
- Vision-language models for vision tasks: a survey. IEEE transactions on pattern analysis and machine intelligence 46 (8), pp. 5625–5644. Cited by: §1.
- Batch selection for multi-label classification guided by uncertainty and dynamic label correlations. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 39, pp. 22902–22909. Cited by: §1.
- Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16816–16825. Cited by: §1.
- Enhancing zero-shot vision models by label-free prompt distribution learning and bias correcting. Advances in Neural Information Processing Systems 37, pp. 2001–2025. Cited by: §3.2.