Efficient Test-time Adaptation through Candidate Verification and Divergence Shifts

Seungmin Oh, Seunghun Kang, Jongbin RyuNeurIPS 2026

TL;DR

Vision-language models like CLIP are great out of the box, until real-world data shifts trip them up. Instead of sluggishly re-tuning model parameters or massaging prediction probabilities at inference time, Test-Time Correction (TTC) treats a model's top guesses as scientific hypotheses and tests which class geometry stays the calmest when the new image is added to it. The result? Better accuracy across the board, up to a $2\times$ speedup, and a fraction of the memory footprint.

What Problem Does This Paper Address?

Vision-language models (VLMs) align images and text in a shared mathematical space, giving them impressive zero-shot classification abilities. However, when test images look different from training data—changes in lighting, style, or camera angles—their accuracy drops.

Test-time adaptation (TTA) tries to fix this on the fly using only unlabeled test data. Historically, TTA methods operate on the "prediction side": they either run slow, iterative gradient updates on prompts (often requiring dozens of augmented views per image), or they maintain complex caches and probability priors to nudge output logits in the right direction. Even "training-free" methods carry noticeable memory and compute baggage, and they often assume that high model confidence is still trustworthy under domain shift. The authors ask: Instead of adjusting the model's predictions, what if we just verify which candidate class geometrically makes the most sense?

Methods

The authors reframe TTA as candidate verification through a three-step mantra: hypothesize, reconstruct, correct.

Figure 1: Overview of the Test-Time Correction (TTC) based on divergence shift estimation. TTC first selects the top-2 candidate labels, denoted by y1 and y2. Each candidate label is then treated as a hypothesis, and TTC estimates the divergence shifts, δy1→y2(x) and δy2→y1(x), induced by inserting the test feature x into the corresponding candidate subspace. Although the original top-1 prediction is y1, TTC corrects the prediction to y2 because inserting x into Sy2 induces a smaller divergence shift, yielding the lowest aggregated verification score.
  1. Hypothesize & Subspace Memory: Keep the VLM completely frozen. For each class, maintain a tiny memory bank (up to $m=16$ high-confidence feature vectors) that spans a linear subspace representing that class's geometric structure. When a new test image arrives, don't trust the top-1 prediction; grab the top-$k$ candidates (default $k=3$) as competing hypotheses.
  2. Reconstruct & Divergence Shift (The Novel Twist): Standard nearest-subspace classifiers just ask, "Which subspace is closest to this test point?" TTC goes deeper using perturbation analysis. It hypothetically inserts the test feature into a candidate class's memory bank and measures the divergence shift—how much that insertion warps the reconstruction relationship between this subspace and competing candidate subspaces.
  3. If the hypothesis is right, the test feature already fits the subspace, barely rippling the geometric waters.
  4. If the hypothesis is wrong, shoving an out-of-class feature into the subspace introduces a large orthogonal component, heavily perturbing its relationship with other candidates.
  5. Correct: TTC computes a closed-form ridge-regularized projection (no gradient descent needed!) combining absolute reconstruction error with forward and reverse pairwise divergence shifts. The candidate with the lowest disturbance wins, and if confident, updates the memory bank online.

Datasets

No new benchmarks are introduced; instead, the authors test TTC across 15 standard benchmarks spanning five evaluation settings using CLIP (ResNet50 and ViT-B/16):

  • Domain Generalization (5 datasets): ImageNet and four out-of-distribution variants (ImageNet-A, -R, -Sketch, and -V2).
  • Downstream Tasks (11 datasets): ImageNet, Caltech101, DTD, EuroSAT, FGVCAircraft, Flowers102, Food101, OxfordPets, StanfordCars, SUN397, and UCF101 (used for zero-shot, few-shot, base-to-novel, and cross-dataset transfer).

Key Insights and Ideas

  • Perturbation beats proximity: Measuring how much a point disrupts inter-class relationships (relative stability) combined with absolute distance is much more discriminative than simple cosine similarity or Euclidean distance, improving zero-shot accuracy by several percentage points in ablations.
  • The answer is almost always in the top-3: Across settings, the true label sits inside the VLM's initial top-3 predictions 80–94% of the time, even when the top-1 guess is wrong 13–22% of the time. Focusing compute strictly on verifying top-3 candidates captures most of the upside for pennies on the computational dollar.
  • Subspaces shrug off noisy initialization: In label-free settings, the memory bank starts with pseudo-labels that might be wrong. Because subspaces capture broad class structure rather than relying on point-to-point nearest neighbors, TTC works well even with low initial memory purity—and actively cleans itself up online.

Key Results

TTC consistently outperforms state-of-the-art training-based and training-free baselines (like TPT, DPE, TDA, OGA, and BCA):

  • Zero-Shot & Domain Generalization: Improves average zero-shot accuracy over the best training-free baselines by +2.5 percentage points (pp) on ResNet50 (reaching 63.98%) and +2.4 pp on ViT-B/16 (71.10%). On domain generalization, TTC beats methods using 63 image augmentations while using only 10 (or 0).
  • Prompt-Tuned Models: Stacked on top of CoOp, TTC boosts few-shot learning across all shot counts, lifts base-to-novel harmonic mean by +0.9 pp (75.01%), and improves cross-dataset transfer by +0.7 pp (67.56%).
Figure 2: Experimental results of few-shot classification using CoOp trained with a specified shot.
  • Blazing Efficiency: On ImageNet (ViT-B/16, single RTX A5000), TTC processes 2,049 images/sec (total wall-clock time of 24.5s vs. 53.7s for the fastest baseline, BCA). That is a $2.2\times$ speedup, while using $3.5\times$ less CPU memory (135 MB) and $1.4\times$ less GPU memory (0.17 GB).

Limitations and Future Work

  • The Top-$k$ Ceiling: Because TTC only re-ranks the VLM's initial top-$k$ candidates, its accuracy is hard-capped by the initial Hit@$k$ rate. If the true label isn't in the top-3, TTC cannot recover it.
  • Cold-Start & Near-Duplicates: On very short test streams or unseen classes where candidate memory banks are empty or sparse, TTC has to fall back on the VLM's original prediction. When it does fail inside the top-3, it's mostly on near-duplicate labels (e.g., sunglass vs. sunglasses, or ear of corn vs. corn).
  • Future Directions: Expanding the candidate pool dynamically using uncertainty estimation or memory-guided retrieval so the framework can rescue predictions even when the initial VLM logits miss the mark completely.

Summary updated

Abstract

Vision-language models (VLMs) achieve strong zero-shot transferability but remain vulnerable to target-domain shifts at inference time. Test-time adaptation (TTA) offers a practical remedy, yet most existing VLM-TTA methods follow a prediction-side adaptation paradigm. They use test samples to adjust logits, prototypes, caches, priors, or feature statistics, often incurring additional computational overhead. In this paper, we take a different perspective and reframe VLM-TTA as candidate verification rather than prediction adjustment. We propose **Test-Time Correction (TTC)**, a hypothesis-based correction framework guided by a simple principle: *hypothesize, reconstruct, correct*. Given a test feature and its top-$k$ candidate labels, TTC treats each candidate label as a hypothesis, reconstructs the feature within the corresponding latent subspace stored in a memory bank, and measures the resulting **divergence shift**. This shift quantifies how much the candidate subspace and its relations to other candidates change after the hypothetical insertion of the test feature. A correct candidate hypothesis induces only a small shift, whereas an incorrect one perturbs the subspace more strongly. TTC therefore corrects the prediction by selecting the candidate with the minimum aggregated divergence shift. This training-free candidate-verification mechanism avoids iterative optimization and provides a favorable accuracy-efficiency trade-off. Across five TTA settings and 15 benchmark datasets, including zero-shot classification, domain generalization, few-shot classification, base-to-novel generalization, and cross-dataset evaluation, TTC consistently improves accuracy over state-of-the-art VLM-TTA methods while achieving up to $2\times$ speedup, over $3\times$ lower CPU memory usage, and up to $1.4\times$ lower GPU memory usage than the lowest-memory training-free baseline. Our code is available at [https://github.com/mmai-laboratory/ttc](https://github.com/mmai-laboratory/ttc)
BibTeX
@inproceedings{oh2026efficient,
  author = {Seungmin Oh and Seunghun Kang and Jongbin Ryu},
  title = {{Efficient Test-time Adaptation through Candidate Verification and Divergence Shifts}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ofqsXmAtDS},
}
Figure