DOTA: Distributional Test-Time Adaptation of Vision-Language Models

Authors: Zongbo Han, Jialong Yang, Junfan Li, Qinghua Hu, Qianli Xu, Mike Zheng Shou, Changqing Zhang
Primary area: transfer learning, meta learning, and lifelong learning
Keywords: Test-time, uncertainty, vision-language models

Abstract:
Vision-language foundation models (e.g., CLIP) have shown remarkable performance across a wide range of tasks. However, deploying these models may be unreliable when significant distribution gaps exist between the training and test data. The training-free test-time dynamic adapter (TDA) is a promising approach to address this issue by storing representative test samples to guide the classification of subsequent ones. However, TDA only naively maintains a limited number of reference samples in the cache, leading to severe test-time catastrophic forgetting when the cache is updated by dropping samples. In this paper, we propose a simple yet effective method for DistributiOnal Test-time Adaptation (DOTA). Instead of naively memorizing representative test samples, DOTA continually estimates the distributions of test samples, allowing the model to continually adapt to the deployment environment. The test-time posterior probabilities are then computed using the estimated distributions based on Bayes' theorem for adaptation purposes. To further enhance the adaptability on the uncertain samples, we introduce a new human-machine collaboration paradigm which identifies uncertain samples, collects human-feedback, and incorporates it into the DOTA framework. Extensive experiments validate that DOTA enables CLIP to continually learn, resulting in a significant improvement compared to current state-of-the-art methods.

Decision: reject
Reviewer scores: 6, 6, 6, 6

Reviews and discussion:
<thread>
creation date:
1729240062687

thread_type:
official_review

<thread_object>
creator: reviewer_gkjd

<content>
summary:
The authors propose a Distributional Test-time Adaptation (DOTA) method, which adapt the pretrained Vision-language foundation models (e.g., CLIP) to the test target domain by estimating the distributions of different categories for test samples continually. The authors further introduce a human feedback collaboration method which identifies uncertain samples to further enhance the adaptability. Extensive experiments on diverse datasets validate the effectiveness of the proposed method.

strengths:
1. The writing and figures are good and easy to understand.

2. The DistributiOnal Test-time Adaptation (DOTA) method for Vision-language foundation models without BP is simple yet effective during testing in new target domain, achieving a significant improvement compared to current state-of-the-art methods in most of the datasets.

3. This paper first define the test-time adaptation problem with human feedback, allows the test-time adaptation for uncertain samples with human feedback.

4. An adaptive final fusion probability is introduced to mitigate the potential negative impact when the number of test samples is insufficient.

weaknesses:
1. The proposed method estimate the data distribution of samples in the current test environment during testing, but there lack some evidence or visualization. Why updating the feature distribution for different categories works better?

2. The DOTA method seems somewhat similar to the T3A method [R1], which continually maintains a memory bank for prototypes during the testing stage. Could the authors clarify and analysis the difference and the advantages of the proposed method?

[R1] Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization

3. The proposed method seems works for not only VLMs but also other models in all classification tasks. Is it suitable for traditional TTA or Domain Generalization tasks?

4. There could give more details and explanation about the $f_k(x)$ in Eq.(3).

5. The uncertainty estimation method is simple. Is there any other uncertainty estimation method (like entropy) better?

6. There missing an ablation study for the adaptive fusion probability.

questions:
see the Weaknesses
</content>
</thread_object>

</thread>
<thread>
creation date:
1730483130663

thread_type:
official_review

<thread_object>
creator: reviewer_dnwr

<content>
summary:
The article addresses the problem of test-time adaptation of vision-language models. Differently from previous works (e.g., TDA, Karmanov et al. 2024) that use a cache to store samples, the proposed method, DOTA, stores an online estimate of the statistics (mean and variance) of each class of interest.  These statistics are then used during inference to refine standard CLIP predictions.  An active learning strategy exploiting this statistic is also proposed to improve the performance of the model further, asking a user to annotate the least confident examples. Experiments on a wide range of tasks show the efficacy of this approach.

strengths:
1. DOTA revisits principles in the literature on continual learning via nearest class mean classifiers (e.g., [a,b]) for improving the performance of VLMs at test time. Overall the approach is easy to implement and can be considered a valid baseline for future works, performing continuous TTA without the need for storing a cache, as in TDA.

2. The article is well-structured and easy to follow, guiding the reader through all the design choices. 

3. DOTA is effective (as shown in the comparisons with TDA, e.g., Tab. 1 and Tab. 2) and computationally cheap (as shown in Tab. 3). 

4. Fig. 3 provides an analysis of how the performance of the two models (TDA and DOTA) vary w.r.t. the number of samples, showing the advantages of the latter.

**References**:

[a] Mensink, Thomas, et al. "Distance-based image classification: Generalizing to new classes at near-zero cost." IEEE transactions on pattern analysis and machine intelligence 35.11 (2013): 2624-2637.

[b] Bendale, Abhijit, and Terrance Boult. "Towards open world recognition." Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.

weaknesses:
1. DOTA continually updates its estimates of the statistics. Those might be affected by various factors linked to the experimental protocol, (e.g., order of the classes in the stream, batch size) as well as hyperparameters choice (i.e., the initial variance value, the shrinkage $\epsilon$, $\lambda$'s hyperparameters). Currently, the article does not provide too many insights on these factors, with the analysis mostly limited to the active learning percentile (i.e., Fig. 3). To assess the robustness of the model and provide a thorough study of its performance, it would be interesting to show results across multiple data ordering (i.e., currently it is not clear how many orders have been tested) and whether the performance changes w.r.t. the particular stream considered, even on the edge-cases where the data is non-i.i.d. [c]. Moreover, the hyperparameters may impact the speed of adaptation (e.g., variance initialization, $epsilon$) as well as how much the pretrained model is considered (e.g., $\lambda$s): studying their impact is essential to fully evaluate the complexity of the approach and potential difficulties in applying it on real-world scenarios. 

2. While TPT and DiffTPT are strong models for test-time adaptation, they work on the episodic setting, i.e., where adaptation is held out on a single sample, and then the model is reset to its previous state. The possibility of storing/using test-time data (assuming coherence in the sequence) is a non-negligible advantage that DOTA has (and that it shares with TDA). This makes both the "continual adaptation" mark on TPT (Tables 1 and 2) potentially misleading, as well as TDA the only true baseline acting under the same priors of DOTA. To make the results stronger, it would be beneficial to add more baselines, such as DMN [d]. 

3. Following on the previous points, adapting to an evolving stream is a much more nuanced problem, where correlation between consecutive data may play an important role. Thus, various TTA settings with different types of stream and data dependencies (e.g., practical TTA [e], universal TTA [f]) could have been considered to further show the effectiveness of the approach. 

4. A key motivation behind DOTA relies on the test-time forgetting of TDA (lines 52-56). However, there are no experiments demonstrating this point (beyond the quantitative advantages of DOTA). An analysis clearly showing this phenomenon (and how DOTA is more robust to it) would strengthen the motivation behind the approach. 

5. The active learning strategy proposed to refine the performance for uncertain samples (Section 3.3) is a nice addition to make the approach more coherent but it lacks competitors. For instance, also TDA could employ a similar strategy (as the update of the cache is based on the confidence of the predictions). Moreover: (i) the accuracy with random feedback is also very close to those achieved with the proposed strategy (e.g., 0.6% gap on average in Tab. 6, 5% percentile); (ii) for the confidence-based scoring to work, the model is assumed to be calibrated, something not always true and that needs a proper discussion [g]; (iii) in Tab. 7 the accuracy of the random baseline is not reported: this is an important reference to put results into perspective.  

6. Related work (Section 2) provides a limited discussion on the various types of TTA settings (e.g., [e,f]) as well as on previous methods employing online updates of statistics for continual learning/open world recognition [b] or prototype-based few-shot learning [I,j]. Expanding the discussion would help to better contextualize the work in the current literature.

**Minors**: 

- Footnote 1 hints that the model could be applied beyond CLIP. However, there are no experiments confirming this claim. It would have been more thorough to show other models (e.g., SigLIP [h]) to support it.

- Table 4 shows the results only for DOTA. It would be interesting to see the same analysis for the other baselines (e.g., TDA) to contextualize/provide a reference for the results.


**References**:

[a] Mensink, Thomas, et al. "Distance-based image classification: Generalizing to new classes at near-zero cost." IEEE transactions on pattern analysis and machine intelligence 35.11 (2013): 2624-2637.

[b] Bendale, Abhijit, and Terrance Boult. "Towards open world recognition." Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.

[c] Gong, Taesik, et al. "Note: Robust continual test-time adaptation against temporal correlation." Advances in Neural Information Processing Systems 35 (2022): 27253-27266.

[d] Zhang, Yabin, et al. "Dual memory networks: A versatile adaptation approach for vision-language models." Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2024.

[e] Yuan, Longhui, Binhui Xie, and Shuang Li. "Robust test-time adaptation in dynamic scenarios." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.

[f] Marsden, Robert A., Mario Döbler, and Bin Yang. "Universal test-time adaptation through weight ensembling, diversity weighting, and prior correction." Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2024.

[g] Tu, Weijie, et al. "An Empirical Study Into What Matters for Calibrating Vision-Language Models." International Conference on Machine Learning. 2024.

[h] Zhai, Xiaohua, et al. "Sigmoid loss for language image pre-training." Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023.

[i] Snell, Jake, Kevin Swersky, and Richard Zemel. "Prototypical networks for few-shot learning." Advances in neural information processing systems 30 (2017).

[j] De Lange, Matthias, and Tinne Tuytelaars. "Continual prototype evolution: Learning online from non-stationary data streams." Proceedings of the IEEE/CVF international conference on computer vision. 2021.

questions:
1. How does the performance change w.r.t. the data stream?
2. What is the impact of the various hyper parameter?
3. How does the test-time forgetting phenomenon happen?
4. How does the model compare with other baselines, e.g., DMN?
5. How does the work relate to existing ones on prototypical networks and the various TTA settings?
</content>
</thread_object>

</thread>
<thread>
creation date:
1730534026762

thread_type:
official_review

<thread_object>
creator: reviewer_xgae

<content>
summary:
The author presents DOTA, a method that adapts to deployment conditions by continually estimating test sample distributions rather than memorizing them. Using Bayes’ theorem, Dota computes posterior probabilities for real-time adaptation. A human-in-the-loop feature also gathers feedback on uncertain samples, enhancing adaptability. Experiments show Dota outperforms current methods with continuous test-time learning.

strengths:
1. This paper is well written and easy to follow.
2. The idea is interesting,  the motivation of this paper is clear as well as the novelty of the method.
3. The proposed method is extensively tested against prior work and outperforms on a variety of tasks/baselines.

weaknesses:
1. This paper does not include a detailed case study focused on a particular domain or a challenging dataset.
2. This paper does not include experiments assessing the model's sensitivity to hyperparameters. A detailed analysis of hyperparameter tuning could offer valuable insights into the robustness and generalizability of the proposed approach.
3. The paper could benefit from additional visualizations illustrating Test-time adaption with human feedback

questions:
1. This paper is novel and interesting; would you consider making the code open source?
2. In Table 1, for ResNet-50, DOTA’s performance is only slightly better than TDA, with an average improvement of just 0.15%. I would like to understand the reason for this marginal gain.
</content>
</thread_object>

</thread>
<thread>
creation date:
1730578093976

thread_type:
official_review

<thread_object>
creator: reviewer_qfmn

<content>
summary:
The authors address the problem of Test Time Adaptation of Vision Langugage models. They propose to continuously estimate the distribution of test samples, which they leverage through Bayes theorem, to make the final test predictions. They also collect human feedback to receive supervision for uncertain samples.

strengths:
- They propose to estimate the class distributions in an online manner. 
- The adaptive fusion of zero shot text classifier based predictions and the distribution based feature similarities is simple and intuitive. 
- This being a backpropogation free approach, is very light-weight computationally, which is a great advantage for TTA.
- The paper is well written and easy to follow, however several clarifications are required.

weaknesses:
1. **Distributional Test Time Adaptation:** In a single image TTA setting, the whole section 3.2 is quite unclear. There is no **batch** of samples in this setting. So, how are the class distributions actually updated at each time step.

2. **Samples for distribution estimation:** Are all test samples used for updating the class distributions? Wouldn't the use of low confident/uncertain samples lead to bad parameter estimates in eqn(4)?

3. **TTA with human feedback:** While this is one of the major contribution of the paper, it appears to only result in modest improvements. 5% and 15% is a lot of data to ask labels for, from a human. However, the results improve only of the order of 1-2%. This makes the efficiency of this whole process questionable.

4. **Performance evaluation of TTA with human feedback:** As the test samples arrive in an online manner and based on uncertainty, how is the final accuracy evaluated here? Are these samples inclusive when evaluating accuracy? If so, you should be using the ground truth as predictions for actively labeled samples. Then the accuracy should be up by about 5% or 15%. As this is not the case in the results reported, are the labeled samples excluded from evaluation? This needs to be clarified. For fair comparison, all results should be reported on the complete test set, even when using human feedback.

5. **Need stronger baselines for TTA with human feedback:** To study the role of TTA with human feedback, stronger baselines need to be established, using different selection strategies, like random, confidence, entropy etc. and report the accuracy of complete test set. As all strategies have same amount of labeled samples included, the performance improvement due these strategies as well as the gains wrt no human feedback can be assessed.   

6. **Amount of human feedback:** 5% and 15% is a lot of supervision and this may not be feasible during test time. It's more practical to ask labels for about 1-2% of test data. Experiments with stronger baselines, with lesser supervision, with correct evaluation method, is required to actually understand and evaluate the role of human feedback in TTA.

7. **Choice of hyperparameters:**
In Implementation details, it is mentioned that validation sets are used to choose the hyperparameters. However, in TTA, one does not have access to any data from the test distribution apriori. Hence, validation data is not accessible in practice. Well, if one had access to validation data for test data, it provides a lot more information and could be used for more than just hyperparameter tuning.

questions:
1. **Test Distribution Estimation:** In line 212 and from equations (4) and (6), it is described such that a batch of test samples arrive at each time step. However, prior baselines TPT, TDA perform single image TTA. Further, in Implementation details, in line 706, it is mentioned batch size is 1. Please clarify if single image TTA is done here as well, for fair comparison. If so, what does $n$ refer to in equations (5) and (6). How are $\mu_k$ and $\sigma_k$ estimated in single image TTA. Are you storing features, as done in TTA as well, along with the statistics?

2. **Selection of uncertain samples:**
Confidence is softmax applied over the similarity scores only right? Why is there such a large discrepancy using these two similar metrics (Table 7)? Also, is this similarity and confidence estimated from zero shot classifier or the classifier proposed? And why'd you choose what you choose?

3. **Sensitivity to hyperparameters:** How sensitive is the method on the choice of the parameters $\sigma, \eta, \rho$, as it's not practical to assume access to validation data before actually doing TTA? 

4. **Human in the loop TTA:** Please refer to the weaknesses and address the relevant concerns raised.
</content>
</thread_object>

</thread>
<thread>
creation date:
1731767770597

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Thank you for considering our revisions and valuable sugestiongs. We are looking forward to disscuss with you.

comment:
Dear Reviewers, Area Chairs, Program Chairs and Senior Area Chairs, 

We address the reviewers' concerns with the following updates and improvements:

1. **Hyperparameter Analysis**: Detailed exploration of hyperparameter settings. 
2. **Additional Evaluation Metrics**. Clarified previous evaluation metrics and added new evaluation metrics 
3. **Improved Baselines**: New baseline methods, covering diverse uncertain sample selection strategies and the latest methods (3 published in NeurIPS 2024 and 1 under review at ICLR 2025). 
4. **Extended Analysis and Experiments**: More evaluation, including variations of TDA, the impact analysis of data stream order, and scenarios with reduced human feedback ratios, etc. 
5. **Diverse CLIP Versions**: Integration of another version of CLIP models (contrastive learning models for pathology and text). 
6. **More Datasets**: Use of additional datasets, particularly for pathology image classification. 
7. **Point-by-Point Responses**: Comprehensive responses to specific reviewer comments. 

Thank you for considering our revisions and valuable suggestion. **We appreciate your help in our work. If you have any other concerns, please feel free to contact us and we look forward to disscuss with you.** A new manuscript is also in preparation in which we will address the reviewers' concerns.
</content>
</thread_object>

</thread>
<thread>
creation date:
1732416383050

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Manuscript has been updated!

comment:
Dear reviewers, I have updated the paper based on your feedback. Due to space constraints, some of the results have been included in the appendix.
</content>
</thread_object>

</thread>
<thread>
creation date:
1732759785831

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Response for Reviewer QFMN (Reviewer 1)

comment:
## **For Reviewer QFMN (Reviewer 1):**

Dear reviewers,

We clarify two existing misunderstandings at the beginning of this web page to facilitate further discussion.


**On the benefit of incorporating human feedback after deployment:**

Incorporating human feedback after model deployment can effectively enhance the model's performance, even when we stop collecting labels at a later stage. To elaborate, consider the scenario where the model is already deployed. Without human feedback, its performance will remain static and unimproved. However, when human feedback is incorporated, the model's performance can improve on standard accuracy (evaluated without using human feedback labels). 

**In other words, even if human label collection ceases at a certain stage post-deployment, the performance of DOTA will remain higher than it was prior to introducing the feedback loop.** For example, with the EuroSAT dataset, introducing 5% human feedback increased standard accuracy from 57% to 65%. 

Furthermore, as the model’s performance improves, we can gradually reduce the volume of human feedback. A higher feedback ratio can be applied during the early deployment stages, with a lower ratio later. When human feedback collection stops, the ratio of feedback naturally decreases as the number of test samples increases. **This indicates that the benefit of incorporating human feedback becomes increasingly significant.**

To validate this, we conducted experiments on a large dataset (over 1 million test samples). In these experiments, we introduced more human feedback during the early stages (first 50,000 samples) and then ceased feedback collection and model updates during the later stages. Results demonstrate that incorporating human feedback leads to increasing benefits as the number of test samples grows while reducing the cost of feedback. 

Experimental results:

| Model                        | Performance (%) in terms of standard ACC |
|------------------------------|------------------------------------------|
| Original CLIP                | 70.14                                   |
| DOTA without human feedback  | 70.89                                   |
| DOTA with Feedback rate at 0.75%       | 72.01                                   |
| DOTA with Feedback rate at 1%          | 72.44                                   |
| DOTA with Feedback rate at 2%          | 73.15                                   |

Hypothetically, assuming the number of test samples increases tenfold and performance remains stable (as the data usually are independent and identically distributed), the corresponding performance could be:

| Model                        | Performance (%) in terms of standard ACC |
|------------------------------|------------------------------------------|
| Original CLIP                | 70.14                                   |
| DOTA without human feedback  | 70.89                                   |
| DOTA with Feedback rate at 0.075%      | 72.01                                   |
| DOTA with Feedback rate at 0.1%        | 72.44                                   |
| DOTA with Feedback rate at 0.2%        | 73.15                                   |

These results highlight the critical role of human feedback, even at low feedback rates, in enhancing model performance and achieving greater accuracy. We acknowledge that there is a trade-off between the volume of human feedback and performance gains, and this approach may not apply universally.
</content>
</thread_object>

</thread>
<thread>
creation date:
1732760224108

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Response for Reviewer GKJd (Reviewer 4)

comment:
Dear reviewers,

We clarify two existing misunderstandings at the beginning of this web page to facilitate further discussion.

## **For Reviewer GKJd (Reviewer 4):**

**Comparison with T3A:**

T3A is a classic test-time adaptation (TTA) method. However, if T3A retains all past samples, its repository grows with the number of test samples, leading to increased storage and computational costs. Specifically, the storage and computational complexity of T3A are \(O(n)\), where \(n\) is the number of test samples. In contrast, our method requires only the mean and covariance matrix, avoiding additional storage, and achieving \(O(1)\) complexity for both storage and computation. In addition, simply memorizing samples may not result in a good classifier, which is similar to the comparison between KNN and Gaussian discriminant analysis algorithms.

**On the negative impact of low-confidence samples:**

1. In fact, our initial version of the proposed method updated model parameters using only high-confidence samples, following the strategy used in T3A and TDA methods. However, the performance improvement was limited compared with TDA. The fundamental reason is that low-confidence predictions also contain information that is beneficial for model training. The experimental results are shown in the following table:

|                              | Caltech101 | Cars  | DTD   | EuroSAT | Flower102 | Food101 | Pets  | SUN397 | UCF101 | Mean      |
|------------------------------|------------|-------|-------|---------|-----------|---------|-------|--------|--------|-----------|
| TDA                          | 94.24      | 67.28 | 47.40 | 58.00   | 71.42     | 86.14   | 88.63 | 67.62  | 70.66  | 72.38     |
| DOTA with high-confidence only  | 94.10      | 68.08 | 45.70 | 58.60   | 72.06     | 88.06   | 89.47 | 69.90  | 68.80  | 72.75     |
| DOTA with all samples        | 94.32      | 69.48 | 47.87 | 57.65   | 74.67     | 87.02   | 91.69 | 69.70  | 69.01  | 73.49     |

2. **In some deployment scenarios, we cannot obtain a sufficient number of high-confidence samples to characterize the data distribution.** On the ImageNet test set, each class contains only 50 samples, insufficient for selecting a large number of high-confidence samples for adaptation. Utilizing information from low-confidence samples is crucial. Additionally, due to inherent CLIP biases, certain categories may naturally have low confidence, making high-confidence-only adaptation challenging.

3. Theoretically, our method’s objective function aligns with prior TTA methods, such as entropy minimization. These methods minimize cross-entropy loss between the predicted class probabilities.

4. This process resembles a single iteration of the Expectation-Maximization (EM) algorithm. Like EM, our method uses predicted probabilities of the old classifier to train the new classifier. Specifically, zero-shot classification corresponds to the expectation step, while estimating \(\{\mu_k, \Sigma_k\}\) represents the maximization step.

5. Intuitively, this estimation process can be seen as reweighting. Zero-shot predicted probabilities (typically well-calibrated [1]) serve as weights to adjust sample contributions across classes, mitigating inaccuracies in zero-shot predictions.

However, we also very acknowledge your perspective that, in some cases, using only high-confidence samples can also be a good choice, and it serves as a complementary approach to the method we proposed, i.e., the proposed method can also use this strategy, and as shown in the table above, the performance is still slightly improved compared to TDA.

[1] Revisiting the calibration of modern neural networks. 

We deeply appreciate your thoughtful and constructive feedback. Thank you for guiding us in improving our work.
</content>
</thread_object>

</thread>


Metareview:
metareview:
This paper tackles the test-time adaptation problem for CLIP using an approach termed distributional test-time adaptation (DOTA). The approach has two main ideas: the first idea is to estimate and keep track of the distribution parameters (namely mean and variance) of test samples, and the second idea is to integrate the approach with a human-in-the-loop strategy, which asks human labelers to correct wrong zero-shot predictions when the model’s confidence is lower than a threshold. The reviewers generally appreciated the first idea of distributional adaptation but remained deeply concerned about the human-in-the-loop design, which does not bring significant improvement and lacks comparisons with related work. In the panel discussion, the reviewers specifically pointed out that the marginal improvement brought by the extra human labor cost is insufficient and thus do not give support for full acceptance. After reading the paper and the reviews, the AC agrees with the view that the human-in-the-loop design does not bring enough improvement and therefore needs further justifications. Since this is the first work that combines test-time adaptation with human-in-the-loop, it is important to set up a fair, convincing benchmark for future research. The AC recommends that the paper be rejected and encourages the authors to further refine the human-in-the-loop part.