Fair Context Learning for Evidence-Balanced Test-Time Adaptation in Vision-Language Models

Sanggeon Yun, Ryozo Masukawa, SungHeon Jeong, Wenjun Huang, Hanning Chen, Mohsen ImaniarXiv 2026

TL;DR

Most test-time adaptation (TTA) methods for vision-language models rely on entropy minimization, which inadvertently amplifies spurious correlations and causes models to make overconfident mistakes on shared visual features. To fix this, Fair Context Learning (FCL) decouples adaptation into candidate exploration and fairness-driven calibration, equalizing the model's sensitivity to shared visual evidence without relying on confidence maximization. This approach yields state-of-the-art robustness across diverse domain shifts and fine-grained benchmarks while using up to 12× less peak GPU memory than traditional prompt tuning.

What Problem Does This Paper Address?

Vision-Language Models (VLMs) like CLIP excel at zero-shot recognition but degrade significantly when facing distribution shifts (e.g., changes in background, texture, or style). Test-Time Adaptation (TTA) attempts to fix this at inference time using unlabeled data.

Standard TTA approaches typically minimize prediction entropy across multiple augmented views of a single test image. However, the authors identify a critical failure mode called partial feature obsession. When different classes share common visual features (e.g., a green "Sleeping Bag" on grass sharing texture and color cues with a "Tank"), entropy minimization acts as a confidence amplifier for the wrong class if those shared features dominate the augmented views. Even majority voting strategies fail here because the bias is systematic across views.

Figure 1: Conceptual overview of Fair Context Learning. Aug- mented views probe class-aligned evidence features. Our ap- proach first explores candidate classes through confident view scoring and then calibrates the text embeddings in feature space using common-evidence maps, mitigating partial feature obses- sion.

Methods

FCL introduces a novel framework grounded in an Additive Evidence Decomposition Assumption, which models an image embedding as a combination of common evidence (shared across classes), unique evidence (class-specific), and residual noise.

Instead of optimizing for confidence, FCL decouples TTA into two distinct stages:

  1. Exploration: The model generates multiple augmented views, filters for the lowest-entropy views (which theoretically contain the strongest class-unique evidence), and uses majority voting to identify a compact set of $K$ reliable candidate classes ($C_K$).
  2. Calibration: If $K > 1$, the model estimates spatial "class evidence maps" using a fast, gradient-free masking procedure. By multiplying these maps, it localizes common evidence regions shared between pairs of candidate classes. It then optimizes the learnable text context ($\delta$) using two losses:
  3. Calibration Loss ($\mathcal{L}_{cal}$): Uses Jensen-Shannon (JS) divergence to force the model's predictions on the shared visual evidence to be uniform, effectively neutralizing the shared-feature bias.
  4. Alignment Loss ($\mathcal{L}_{align}$): A regularization term ensuring the adapted text embeddings do not drift too far from their original zero-shot initializations.
Figure 2: The pipeline of the proposed test-time adaptation framework via fair context learning. Given a test image, the method first performs an exploration stage that identifies K candidate classes CK through augmented-view evaluation and low-entropy majority voting. Next, in the calibration stage, the model learns a fair context by estimating pairwise common feature regions among candidate classes and optimizing their score distributions toward uniformity via backpropagation to update the soft prompt δ. Finally, the learned context δ⋆is applied for prediction by applying final exploration with the candidate classes CK.

Datasets

The authors evaluated FCL across two primary regimes:

  • Natural Distribution Shifts: ImageNet alongside four standard out-of-distribution (OOD) benchmarks: ImageNet-A (adversarial examples), ImageNet-R (renditions/art), ImageNet-V2 (updated test sets), and ImageNet-Sketch.
  • Fine-Grained / Cross-Dataset Generalization: Ten diverse datasets including FGVC-Aircraft, Caltech101, Stanford Cars, Describable Textures (DTD), EuroSAT (satellite imagery), Oxford Flowers, Food101, Oxford Pets, SUN397, and UCF101.

Key Insights and Ideas

  • Entropy Minimization is a Double-Edged Sword: While low-entropy views generally signal the presence of unique, discriminative features, blindly minimizing entropy across biased views forces the model to latch onto dominant, non-class-specific features.
  • Fairness as a Calibration Tool: Rather than trying to find a prompt that makes the model more confident, FCL forces the model to be equally unconfident (uniform prediction) when looking only at shared features. This forces the final classification decision to rely strictly on the remaining unique features.
  • Efficiency via Localization: By restricting the gradient-based optimization to a small candidate set ($K=10$) rather than the full label space (e.g., 1,000 classes in ImageNet), FCL dramatically reduces computational overhead.
Figure 3: Empirical validation of our theory. (a) Partial Feature Obsession: score distributions and evidence maps show misclassifications driven by shared features. (b) Common Evidence Contribution: ECEC is consistently lower for correct samples across ImageNet variants. (c) Entropy–Uniqueness Relation: EUEC negatively correlates with entropy, indicating stronger unique evidence at low entropy. Shaded regions show 95% CIs. Kernel density estimations are Gaussian with 400 bootstrap resamples.

Key Results

  • OOD Robustness: On ImageNet variants using a ViT-B/16 backbone, FCL achieved the highest average OOD accuracy (62.91%), notably outperforming prior state-of-the-art methods like TPT (60.80%) and ZERO (62.48%). It was particularly effective on the challenging ImageNet-A dataset, boosting accuracy to 61.38%.
  • Fine-Grained Performance: FCL achieved an average top-1 accuracy of 65.83% across the ten fine-grained datasets. It showed massive improvements on hard datasets like FGVC-Aircraft, beating the next-best TTA method by over 9 percentage points.
  • Computational Efficiency: FCL ran faster than TPT while consuming 12× less peak GPU memory (1.05 GB vs 12.96 GB on ViT-B/16), making it highly practical for resource-constrained deployment.

Limitations and Future Work

The authors note that FCL's fairness calibration can introduce slight noise on "near-saturated" datasets where the base zero-shot model is already exceptionally well-calibrated (e.g., Caltech101 and Oxford Pets), leading to minor performance drops. Future work includes developing more conservative calibration strengths for well-aligned baselines. Additionally, FCL relies on an approximate additive evidence decomposition; creating more mathematically precise or architectural methods to cleanly separate common and unique visual features remains an open challenge.

Summary updated

BibTeX
@misc{yun2026fair,
  author = {Sanggeon Yun and Ryozo Masukawa and SungHeon Jeong and Wenjun Huang and Hanning Chen and Mohsen Imani},
  title = {{Fair Context Learning for Evidence-Balanced Test-Time Adaptation in Vision-Language Models}},
  year = {2026},
  eprint = {2602.07027},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.07027},
}
Figure