Test-Time Consistency in Vision Language Models

Shih-Han Chou, Shivam Chandhok, James J. Little, Leonid Sigal

TL;DR

State-of-the-art Vision-Language Models (VLMs) are surprisingly brittle, often giving completely different answers when a prompt is slightly rephrased or an image is restyled. This paper introduces a plug-and-play, test-time adaptation framework that enforces semantic consistency on a single test point using two unsupervised losses, requiring zero training data or architectural modifications.

What Problem Does This Paper Address?

While modern VLMs achieve impressive average accuracy on multimodal tasks, they suffer from a glaring flaw: semantic inconsistency. If you ask a model "What part of the cow is used for milk production?" it might correctly answer "udder." But if you rephrase it to "Which body part is unique to female cows and used for nursing their young?", it might confidently say "uterus."

This sensitivity to minor linguistic variations, image style changes (e.g., grayscale or mosaic filters), or partial occlusions severely undermines the reliability of VLMs in high-stakes deployments. Prior approaches try to fix this by modifying model architectures or performing large-scale supervised fine-tuning on curated datasets. However, this is computationally expensive and impossible for proprietary or frozen models. This paper tackles the challenge of enforcing consistency entirely at inference time using only the single test input itself.

Figure 1: Comparison between training-time (top) and our test-time (bottom) consistency frameworks. While prior work (e.g., (Chou et al., 2024)) needs large-scale supervised fine-tuning with curated dataset to enforce consistency, our method operates entirely post-hoc by adapting to a single test point with few gradient steps at test-time

Methods

The authors propose a general-purpose, model-agnostic test-time consistency framework. Given a single test input (an image and a query), the method works as follows:

  1. Generate Variants: The system creates $K$ semantically equivalent variants of the input via question rephrasing, image restyling, or context masking.
  2. Dual-Objective Optimization: The variants are passed through the VLM, and the model's language modeling head (LM-head) is updated for a few gradient steps (typically 1 to 4) using two complementary unsupervised losses:
  3. Cross-Entropy Agreement Loss ($L_{CE}$): This aligns the token-level output probability distributions across all $K$ variants, smoothing out distribution shifts caused by the perturbations.
  4. Pseudo-Label Consistency Loss ($L_{PL}$): The model's text outputs are clustered using a string similarity metric (Levenshtein distance). The most frequent, dominant response is selected as a "pseudo-label" target, and all variants are optimized to converge toward this consensus text.
  5. Adaptive Step Selection: To prevent over-adaptation or performance degradation from too many gradient steps, an unsupervised selection mechanism dynamically picks the optimal number of updates based on internal consistency scores.
Figure 2: Overview of our test-time consistency framework. Given a test input with semantically equiv- alent input variants (e.g., restyled images), we forward them through a pretrained VLM to obtain predictions. Two complementary objectives are used to improve con- sistency: (1) Cross-Entropy Agreement Loss, which aligns token-level output distributions across variants, and (2) Pseudo-Label Consistency Loss, which encour- ages agreement with a consensus pseudo-label. The model is updated with few (1-4) steps using gradients from these objectives, enabling consistent final predic- tions without access to training data or model internals.

Datasets

The framework was evaluated using the MM-$R^3$ benchmark, which is specifically designed to test VLM consistency across three tasks:

  • Question Rephrasing: Paraphrased text queries with a fixed image.
  • Image Restyling: Stylized images (using neural style transfers like Mosaic, Candy, or Grayscale) with a fixed query.
  • Context Reasoning: Images with different localized occlusions to test reasoning under ambiguity.

To ensure the test-time updates didn't degrade the models' baseline capabilities, they also evaluated performance on the unperturbed OKVQA dataset.

Key Insights and Ideas

  • The Test Point is Enough: A single test instance contains a rich internal signal. By looking at how a model reacts to different perturbations of the same concept, we can regularize its behavior without external labels.
  • Token-Level vs. Sequence-Level Complementarity: Aligning continuous token distributions ($L_{CE}$) and forcing discrete text outputs toward a consensus ($L_{PL}$) are highly complementary. $L_{CE}$ smooths out the generation process, while $L_{PL}$ drives hard answer-level convergence.
  • Consistency Boosts Accuracy: Interestingly, optimizing for consistency doesn't just stabilize outputs—it frequently improves absolute accuracy and factual grounding, helping the model self-correct under ambiguous conditions.

Key Results

The authors tested their method across three prominent open-source VLMs: LLaVA-1.5, LLaVA-Next, and Qwen2-VL. Performance was measured using an Overall Score ($O_{all}$), the harmonic mean of correctness and consistency.

  • Question Rephrasing: On LLaVA-1.5, the overall score jumped from 52.73 to 64.08, with consistency accuracy skyrocketing from 48.55% to 79.11%.
  • Image Restyling: Qwen2-VL achieved an $O_{all}$ of 51.20 and a nearly flawless consistency score of 99.14% (up from 61.67%).
  • Competitive with Fine-Tuning: Remarkably, this test-time approach achieved competitive—and sometimes superior—performance compared to full, resource-intensive supervised fine-tuning on the MM-$R^3$ training set, particularly on linguistic rephrasing tasks.
The effect of different numbers of update steps on the overall score across different tasks.

Limitations and Future Work

  • Inference Latency: Because the method requires multiple forward and backward passes per test input to compute gradients, it introduces noticeable computational overhead and latency during inference.
  • White-Box Requirement: The framework requires access to model weights to update the LM-head, meaning it cannot be directly applied to closed-source, API-only models like GPT-4 or Gemini.
  • Systemic Biases: Since adaptation happens locally on a single test point, it cannot correct deeply ingrained systematic biases or fundamental gaps in the base VLM's knowledge.

Future work will likely focus on making these test-time gradient steps more computationally efficient to minimize latency for real-time applications.

Summary updated

BibTeX
@inproceedings{chou2026test,
  author = {Shih-Han Chou and Shivam Chandhok and James J. Little and Leonid Sigal},
  title = {{Test-Time Consistency in Vision Language Models}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
}
Figure