To Trust Or Not To Trust Your Vision-Language Model's Prediction

Hao Dong, Moru Liu, Jian Liang, Eleni Chatzi, Olga Fink · Submission to ICLR 2026 · Rejected

TL;DR

Vision-Language Models (VLMs) like CLIP frequently produce confident yet incorrect predictions, creating major safety risks. TrustVLM is a training-free framework that detects misclassifications by combining standard text-image prediction scores with an image-to-image verification check against visual prototypes. Across 17 benchmark datasets, TrustVLM substantially cuts false alarms and improves failure detection without requiring model retraining.

What Problem Does This Paper Address?

While foundation VLMs excel at zero-shot classification, they are notoriously prone to overconfidence: an incorrect prediction can still receive high softmax probability simply because text prompts partially match visual attributes. Detecting when a model is wrong—misclassification detection (MisD)—is vital for deploying VLMs in safety-critical settings like autonomous driving and medical imaging.

Standard approaches borrowed from out-of-distribution (OOD) detection often perform surprisingly worse than simple Maximum Softmax Probability (MSP) when applied to MisD. Furthermore, VLMs suffer from a well-known modality gap: image and text features occupy separate regions in representation space. Relying exclusively on image-to-text cosine similarity discards the rich, fine-grained geometric structure inherent to pure visual embedding spaces.

Methods

TrustVLM addresses these limitations by introducing a visual verification mechanism:

[Test Image] ──> VLM Zero-Shot Prediction ──> Predicted Class ŷ & Image-to-Text Score (S_i-t)
      │                                                │
Auxiliary Vision Encoder                               │
      │                                                ▼
[Image Embedding] ─── Cosine Similarity ────> [Prototype of Class ŷ] ──> Image-to-Image Score (S_i-i)
                                                       │
                                      Final Confidence Score: κ = S_i-t + S_i-i
  1. Class Visual Prototypes: For each class, feature embeddings from $N$-shot exemplar images are extracted via an auxiliary vision encoder (such as CLIP's vision backbone, MoCo v2, or DINOv2) and averaged into a class centroid prototype $P_c$.
  2. Zero-Shot Prediction: The VLM classifies input image $x$ via text-image cosine similarity, producing prediction $\hat{y}$ and standard confidence $S_{i-t} = \max_c p(y=c|x)$.
  3. Image-to-Image Verification: The test image embedding $E_x$ is compared to the prototype of the predicted class $P_{\hat{y}}$: $$S_{i-i} = E_x \cdot P_{\hat{y}}$$ If the prediction $\hat{y}$ is incorrect, $E_x$ is matched against an inappropriate prototype, driving $S_{i-i}$ down and penalizing overconfidence. If correct, $S_{i-i}$ reinforces confidence.

  4. Combined Scoring: The final confidence is $\kappa(x) = S_{i-t} + S_{i-i}$.

  5. Extensions:
  6. TrustVLM*: Combines image-to-text and prototype-based image-to-image probabilities directly into the classification decision.
  7. TrustVLM*(F): Applies lightweight, 2-minute fine-tuning to the prototype vectors via cross-entropy loss while freezing all encoders.

Datasets

The authors evaluated TrustVLM across 17 distinct datasets:

  • 10 Fine-Grained Datasets: Caltech101, OxfordPets, StanfordCars, Flowers102, Food101, FGVCAircraft, SUN397, DTD, EuroSAT, and UCF101.
  • ImageNet & 4 Robustness Variants: ImageNet-1K alongside distribution-shifted test sets ImageNetV2, ImageNet-Sketch, ImageNet-A (natural adversarial examples), and ImageNet-R (renditions/art).
  • Failure Detection Baselines: CIFAR-10, CIFAR-100, and Waterbirds (evaluating spurious correlations).

Note: No new datasets were introduced; existing benchmarks were leveraged to test generalization.

Key Insights and Ideas

  • Image embeddings separate visual concepts better than text embeddings: In CLIP, semantic distances between text prompts are often compressed compared to distances between image embeddings. For example, the similarity gap between "dog" and "seaplane" is only 0.13 in cross-modal text-image space, but expands to 0.29 in visual feature space.
  • Verification conditioned on the prediction: Instead of comparing an input to all classes equally, testing consistency against the chosen class prototype ($P_{\hat{y}}$) acts as an effective gatekeeper.
  • OOD detectors struggle with MisD: Sophisticated OOD methods (like Energy scores or Maximum Concept Matching) consistently lagged behind standard MSP on MisD, underscoring that detecting in-distribution classification failure is fundamentally different from detecting out-of-distribution inputs.
  • High data efficiency: Just 1 to 4 exemplar images per class ($N \in [1, 4]$) are sufficient to saturate MisD gains.

Key Results

  • Fine-Grained Classification Benchmarks (CLIP ViT-B/16): TrustVLM using DINOv2 (TrustVLM-D) beat the strongest baseline (MSP) across 10 datasets, improving AURC by 20.69%, AUROC by 4.78% (reaching 86.98%), and slashing FPR95 by 15.63% (down to 54.47%).
  • Accuracy Gains (TrustVLM*): Ensembling image-to-image similarity directly into prediction boosted zero-shot classification accuracy by an average of 12.7% on fine-grained benchmarks.
  • Comparison to Concept-Based Methods (ORCA): On CIFAR-10, CIFAR-100, and EuroSAT, TrustVLM outperformed the LLM-concept-based framework ORCA by up to 9.57% in AUROC and 35.86% in FPR95 on CLIP ResNet-101.
  • Architecture and VLM Agnostic: Consistent gains held when swapping backbones between ResNet-50, ViT-B/32, and ViT-B/16, or switching foundation models from CLIP to SigLIP.
  • Zero-Real-Data Alternative: When real exemplar images are withheld for privacy, prototypes synthesized using Stable Diffusion 3 still outperformed the MSP baseline (AUROC 86.96% vs. 85.98% on UCF101).

Limitations and Future Work

  • Dependence on Exemplars: TrustVLM assumes access to a few labeled exemplar images per class (or synthetic equivalents), making it difficult to deploy in purely open-vocabulary or unlabeled open-world environments.
  • Narrow Task Scope: Evaluation was restricted to image classification; tasks like visual question answering (VQA), dense captioning, and grounded reasoning remain untested.
  • Static Encoders: The auxiliary vision encoder is fixed, meaning it cannot automatically adapt to temporal distribution shifts or streaming data without updating prototypes.
  • Future Directions: Promising next steps include exploring adaptive weighting between image-text and image-image branches, multi-encoder fusion, and leveraging Large Vision-Language Models (LVLMs) to reason through and correct flagged misclassifications.

Summary updated

Abstract

Vision-Language Models (VLMs) have demonstrated strong capabilities in aligning visual and textual modalities, enabling a wide range of applications in multimodal understanding and generation. While they excel in zero-shot and transfer learning scenarios, VLMs remain susceptible to misclassification, often yielding confident yet incorrect predictions. This limitation poses a significant risk in safety-critical domains, where erroneous predictions can lead to severe consequences. In this work, we introduce TrustVLM, a training-free framework designed to address the critical challenge of estimating when VLM’s predictions can be trusted. Motivated by the observed modality gap in VLMs and the insight that certain concepts are more distinctly represented in the image embedding space, we propose a novel confidence-scoring function that leverages this space to improve misclassification detection. We rigorously evaluate our approach across 17 diverse datasets, employing 4 architectures and 2 VLMs, and demonstrate state-of-the-art performance, with improvements of up to 51.87% in AURC, 9.14% in AUROC, and 32.42% in FPR95 compared to existing baselines. By improving the reliability of the model without requiring retraining, TrustVLM paves the way for safer deployment of VLMs in real-world applications. The code is available in Supplementary Material.
BibTeX
@misc{dong2025trust,
  author = {Hao Dong and Moru Liu and Jian Liang and Eleni Chatzi and Olga Fink},
  title = {{To Trust Or Not To Trust Your Vision-Language Model's Prediction}},
  year = {2025},
  eprint = {2505.23745},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23745},
}

Loading related content...

Figure