Online Gaussian Test-Time Adaptation of Vision-Language Models

Clément Fuchs, Maxime Zanella, Christophe De Vleeschouwer

Abstract

Vision-Language Models (VLMs) like CLIP have revolutionized zero-shot classification, yet their performance can be further enhanced by adapting to specific data distributions encountered during deployment. This process, known as Online Test-Time Adaptation (OTTA), typically suffers from extreme sensitivity to hyperparameters and performance instability based on the order of incoming data. We introduce Online Gaussian Adaptation (OGA), a robust probabilistic framework that treats adaptation as a statistical estimation problem. By modeling class-specific visual features as multivariate Gaussians and employing Maximum A Posteriori (MAP) estimation, OGA achieves state-of-the-art performance across diverse benchmarks using a single set of fixed hyperparameters. Furthermore, we address the "tail risk" of adaptation, demonstrating that OGA provides superior reliability even in unfavorable data stream scenarios.

Introduction

Large-scale Vision-Language Models (VLMs) provide a powerful foundation for open-vocabulary tasks. However, the "zero-shot" performance of these models often leaves a gap that can only be closed by observing and adapting to the test-time distribution. Online Test-Time Adaptation (OTTA) aims to bridge this gap by updating the model on-the-fly as it processes a stream of unlabeled data.

Despite their potential, existing OTTA methods are often impractical for real-world deployment. They frequently rely on complex caching mechanisms and require meticulous, dataset-specific hyperparameter tuning. In dynamic environments—such as autonomous robotics or mobile applications—pre-tuning for an unknown target domain is impossible. Moreover, current research often overlooks the stochastic nature of data streams; a model might perform well on average but fail catastrophically if the incoming images are presented in a difficult or biased order.

The Online Gaussian Adaptation (OGA) Framework

OGA moves away from the complex heuristics common in OTTA, instead adopting a principled statistical approach. The method is built upon four primary components:

  1. Likelihood Modeling: OGA models the distribution of visual features for each class using multivariate Gaussian distributions. This allows the model to capture the geometric structure of the feature space for each category.
  2. Reliable Caching: To ensure the quality of the learned distributions, the system maintains a small cache of the most reliable samples. Reliability is determined by the model's confidence, specifically targeting samples with low entropy.
  3. MAP Estimation: The framework uses Maximum A Posteriori (MAP) estimation to fuse the model’s original zero-shot knowledge (acting as the prior) with the new Gaussian distributions derived from the test stream (the likelihood).
  4. Bayes Ridge Covariance: To maintain mathematical stability when data is sparse (e.g., at the start of a stream), OGA utilizes a Bayes Ridge estimator to calculate feature relationships, preventing the covariance matrices from becoming singular.

Unlike competing methods, OGA is truly "plug-and-play." It utilizes a single set of fixed hyperparameters across all evaluated tasks, eliminating the need for per-dataset manual intervention.

Experimental Evaluation

The effectiveness of OGA was validated across 11 diverse benchmarks, representing a wide array of visual domains:

  • General Objects: ImageNet, Caltech101
  • Fine-grained Categories: Oxford Pets, Flowers102, Stanford Cars, FGVC Aircraft, Food101
  • Specialized Domains: EuroSAT (satellite imagery), SUN397 (scene recognition), DTD (texture classification), and UCF101 (action recognition).

Performance and Reliability

OGA outperformed state-of-the-art competitors, such as TDA and DMN, on 9 out of the 11 datasets. The gains were particularly pronounced in specialized domains where the distribution shift from CLIP’s training data was significant. For instance, on the EuroSAT satellite dataset, OGA improved accuracy by +16.2% over the baseline zero-shot model.

Beyond average accuracy, the researchers introduced a critical safety metric: Expected Tail Accuracy (ETA). ETA measures the average performance in the worst 10% of experimental runs (varying the data order). The results indicated that OGA significantly reduces "tail risk." In several benchmarks, including ImageNet and Oxford Pets, OGA’s worst-case performance (ETA) was still superior to the average performance of its leading competitors.

Key Insights

  • Simplicity and Generalization: By relying on a principled probabilistic framework rather than complex, black-box heuristics, OGA avoids overfitting to the specific quirks of a single dataset. This leads to better generalization across vastly different visual tasks.
  • Synergy with Few-Shot Methods: OGA is not limited to zero-shot baselines. It can be successfully integrated with few-shot learning techniques like CoOp or TaskRes, providing an additional performance boost by adapting these models further to the specific test-time distribution.
  • Computational Efficiency: OGA utilizes closed-form statistical updates rather than iterative backpropagation. This makes it computationally lightweight and highly suitable for real-time, on-device applications.

Limitations and Future Directions

While OGA represents a significant step forward in robust adaptation, several avenues for improvement remain. Currently, the weight assigned to new data remains constant; future iterations could implement an adaptive weighting scheme that increases the influence of the Gaussian likelihood as the cache grows. Additionally, while the current low-entropy caching strategy ensures reliability, it may introduce confirmation bias. Exploring diversity-aware caching could further improve the model's ability to learn from varied data. Finally, extending OGA to handle non-IID (temporally correlated) data streams—where a model might see many instances of the same class in rapid succession—is a vital next step for real-world robustness.

Summary updated

BibTeX
@inproceedings{fuchs2025online,
  author = {Clément Fuchs and Maxime Zanella and Christophe De Vleeschouwer},
  title = {{Online Gaussian Test-Time Adaptation of Vision-Language Models}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure