Test-Time Adaptation Induces Stronger Accuracy and Agreement-on-the-Line

Recently, Miller et al. (2021) and Baek et al. (2022) empirically demonstrated strong linear correlations between in-distribution (ID) versus out-of-distribution (OOD) accuracy and agreement. These trends, coined accuracy-on-the-line (ACL) and agreement-on-the-line (AGL), enable OOD model selection and performance estimation without labeled data. However, these phenomena also break for certain shifts, such as CIFAR10-C Gaussian Noise, posing a critical bottleneck. In this paper, we make a key finding that recent test-time adaptation (TTA) methods not only improve OOD performance, but drastically strengthen the ACL and AGL trends in models, even in shifts where models showed very weak correlations before. To analyze this, we revisit the theoretical conditions from Miller et al. (2021) that outline the types of distribution shifts needed for perfect ACL in linear models. Surprisingly, these conditions are satisfied after applying TTA to deep models in the penultimate feature embedding space. In particular, TTA causes the data distribution to collapse complex shifts into those can be expressed by a singular scaling variable in the feature space. Our results show that by combining TTA with AGL-based estimation methods, we can estimate the OOD performance of models with high precision for a broader set of distribution shifts. This lends us a simple system for selecting the best hyperparameters and adaptation strategy without any OOD labeled data.

Paper

References (61)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer 1nU36/10 · confidence 4/52024-07-02

Summary

This paper try to achieve reliable TTA by tackling three bottlenecks, including performance evaluation without labeled data, some distribution shifts, and hyperparameter selection for TTA methods.

Strengths

1. TTA is an important topic, and this work is a relevant and timely contribution. 2. The experiments are extensive, covering various tasks comprehensively and convincingly. 3. The presentation is clear and the motivation is well-presented.

Weaknesses

1. The novelty is relatively limited; it is an application of Baek et al. (2022) to the TTA setup. And the limited theoretical conclusion is from Miller et al. (2019). 2. It might be necessary to evaluate on more complex tasks, such as object detection and semantic segmentation.

Questions

Overall, the work is an important study of TTA, however there are still some questions. 1. About Algorithm 1: In TTA, does updating the model parameters require multiple iteration steps? If it does, according to the basic idea of online algorithms, Algorithm 1 does not seem to reflect the model parameters being trained with different batches of data at different time steps. Could you provide a detailed explanation of the difference between the online algorithm you provided and the traditional offline algorithm? 2. Why the inverse of the cumulative density function of the standard Gaussian distribution is applied on the axes of accuracy and agreement? Is there any intuitions and theoretical explanations?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

No potential negative societal impact.

Reviewer ZucK7/10 · confidence 4/52024-07-09

Summary

This papers shows that using test-time-adaptation improve the accuracy of the algorithms used for OOD performance estimation algorithms based on agreement-on-the-line and accuracy-on-the-line. This is shown through a series of experiments. Some justification has also been provided based on prior work,.

Strengths

- OOD performance estimation using unlabeled data is a very important problem and methods based on agreement-on-the-line and accuracy-on-the-line are the state-of-art methods. - The experimental details are very well presented and the paper is very well written and clear.

Weaknesses

- Intuitively, if we assume that TTA is *perfect*, then we expect ID and OOD accuracy to be the same (i.e., y = x); the model has been fully adapted to the OOD setting and there is no difference between ID and OOD. Also the ID and OOD agreements should intuitively become the same (i.e., y = x). Is this understanding correct? It seems that there is a very basic reason behind the main observation of the paper. ‌Because of this, I think table Table 2 does not show a fair comparison; TTA is making models more similar and shift all the lines towards the y = x line. Is the message of the paper as simple as this? I think this answers the question "What specific mechanisms within these adaptation methods cause the observed phenomena? " asked in the conclusion section. - In a practice, we use OOD performance estimation with unlabeled data in settings where compute, budget, etc. is limited; thus we cannot collect new labeled data. Given this, is a method that is computationally expensive (that involves test time adaptation) feasible? Also, note that this method does not work if we only have black box access to a model (which is again, typical in potential applications of AGL and ACL). - What is the condition of theorem 1? It is written that "... correlation if with a bias of zero and a slope ...". Also, the condition in Eq. (2) is very strong. See my comments below for other theoretical results on AGL and ACL that study the problem in other (I believe more realistic) settings where the covariance and mean can shift. - The literature review is missing many theoretical results on agreement-on-the-line and accuracy-on-the-line. In the past 1-2 years, there has been a lot of theory results on these topics that show that these phenomenon are features of the high-dimensionality. For example: [1] N Tripuraneni, B Adlam, J Pennington, Overparameterization improves robustness to covariate shift in high dimensions, NeurIPS 2021. [2] D Lee, B Moniri, X Huang, E Dobriban, H Hassani, Demystifying Disagreement-on-the-Line in High Dimensions, ICML 2023. [3] D LeJeune, J Liu, R Heckel, Monotonic Risk Relationships under Distribution Shifts for Regularized Risk Minimization, JMLR, 2024. [4] A Sanyal, Y Hu, Y Yu, Y Ma, Y Wang, B Schölkopf, Accuracy on the wrong line: On the pitfalls of noisy data for out-of-distribution generalisation, Arxiv 2024. - The papers above show that these phenomena are fragile; these papers show clear settings where Accuracy-on-the-line and agreement-on-the-line break. - More important than the previous comment: Lee et al (2023) show that the line for agreement and the line for accuracy can have different intercepts (at least in their toy model). Although the liens have the same slope. This is seen when looking back at the plots of the original real world experiments in Baek et al. This issue needs to be addressed before any real application of AGL for practice. There might be some fundamental issue with the AGL method.

Questions

See weaknesses.

Rating

7

Confidence

4

Soundness

3

Presentation

4

Contribution

2

Limitations

The authors should discuss the limitations I mentioned in the weaknesses section.

Reviewer ZucK2024-08-08

I thank the authors for their detailed response. Below please find my response: 1. I'm still not convinced that these phenomena are independent. In the same experiment that you mention in the rebuttal, there is a significant improvement in the OOD errors after applying TENT. The OOD and ID accuracies are becoming closer. How do you argue that these phenomena are independent? There needs to be a systematic experiment that demonstrates that the observed phenomena cannot be simply explained by the decreased gap between ID and OOD by TTA. 2. The rebuttal resolves my concerns about the computational complexity. Although I believe this that this potential limitation should be further discussed in the paper. 3. Thanks for the clarification. 4. Thanks for the clarification. However, this response further strengths my doubt that most probably, the observed phenomena can be simply explained by the decreased gap between ID and OOD by TTA. As you discuss here, after TTA, the covariances and means align very well. 5. Thanks. I believe such discussion will strengthen the quality of the paper.

Authorsrebuttal2024-08-09

Further response to Reviewer ZucK's comments

Dear Reviewer Zuck, We really appreciate your quick response to our rebuttal, and we will definitely include further theoretical discussion on ACL/AGL theory and the computational complexity of our method in our final manuscript. You were still concerned that the strong linear trend, which appears after TTA, is caused by model performances approaching the $y=x$ line. We clarify the subtle point below as to **why the closer ID and OOD gap is correlated, but not causal, to the strong linear trend**. As stated in Theorem 1, under distribution shifts that simply “scale” up or down the _norm_ of the mean and covariance, i.e., $\mu_{OOD} = \alpha \mu_{ID}$, $\Sigma_{OOD} = \gamma^2 \Sigma_{ID}$, classifiers can observe perfect linear trends with slope $\alpha / \gamma$. In Section 4, we showed that TTA satisfies this condition by aligning the “direction/shape” of the ID/OOD mean and covariance, while the scaling factor might still be far off, i.e., $\alpha$ << $1$, $\gamma$ >> $1$. Note that the degree of “scale shift” can be large, and in fact, _the perfect trend can lie arbitrarily far from $y=x$_, i.e., $\alpha / \gamma$ << $1$. We see examples of this in our paper, such as TENT on ImageNet-C Shot Noise. On the other hand, any shift, however small, that moves the “direction / shape” of the mean or the covariance matrix breaks the perfect linear trend _in finite dimensions_ (Miller et al.[1]). As an intervention, let us imagine a “Scale TTA” which improves OOD performance by reducing “scales shifts” in covariance in the feature space, but the “shape” of the covariance matrices remain misaligned. We can synthetically simulate the effect of such TTA over toy Gaussian data, where the cosine similarity between the shape of ID and OOD covariance matrices remain less than 1, and $\gamma^2$ decreases from 1 to 0.2 after Scale TTA. Empirically, we can see that the linear trend moves closer to $y=x$ (slope 0.66$\rightarrow$ 0.8), but the strength of the linear trend remains weak ($R^2$ 0.75$\rightarrow$ 0.63). This empirical evidence proves that improving OOD performance does not necessarily make the linear trend stronger. Overall, we see that ACL improves after TTA because TTA aligns the “shape” of the means/covariances, which is the true causal factor for _both_ stronger ACL and the linear trend moving closer to $y = x$. On the other hand, had TTA only reduced “scale shifts” and the “shapes” were unaligned, models would observe weak linear trends even though the slope moves closer to $y=x$. We hope this addresses your concern, and thus makes our paper’s observation and analysis more interesting to you. We will make sure to add the clarification in our final manuscript. Let us know if you have any questions! >**Reference** \ > [1] Miller et al., Accuracy on the Line: On the Strong Correlation between Out-of-Distribution and In-Distribution Generalization, ICML 2021

Reviewer ZucK2024-08-10

I thank the authors for their response. My concerns about the paper are now resolved. However, I believe this discussion is necessary and adding it will significantly increase the quality of the paper. Under the condition that these discussion will be added to the paper, I increase my score to 7 and recommend acceptance.

Authorsrebuttal2024-08-11

Dear Reviewer ZucK, Thank you for your updated score and we are glad that the clarifications were helpful. We will make sure to include the discussion in our final manuscript.

Reviewer JQG95/10 · confidence 3/52024-07-12

Summary

The paper presents a study on how test-time adaptation influences accuracy-on-the-line (ACL) and agreement-on-the-line (AGL). The authors empirically find that TTA methods significantly enhance the ACL and AGL, enabling better OOD performance estimation. Extensive experiments support their findings.

Strengths

1. This paper investigates an under-explored but important observation of TTA. TTA can boost AGL and ACL phenomenon on out-of-distribution datasets. 2. The observed phenomenon is verified under diverse settings, including learning rates, the number of adapting steps, batch sizes, and the early-stopped epoch for pretraining, etc.

Weaknesses

1. The scope should be revised. TTA encompasses more than just feature extractor adaptation, but also classifier adaptation such as T3A [1]. Additionally, it appears that the author does not employ TTA methods with a memory bank [1-4]. Therefore, the paper should clearly specify which types of TTA methods support the observations. 2. The experimental setting is idealized. It seems that the paper only focuses that how TTA always improves accuracy. However, TTA might fail under continuously changing distributions, especially in cases of small batch sizes (e.g.,1), or significant distribution shifts. The author should provide a discussion of these scenarios. 3. The analysis in section 4.2 is not supervising, since BN_Adapt and TENT only modify the $\gamma$ and $\beta$ in BN layers to make the output features similar to the target domain. It would be better to discuss whether other non-BN methods align with these results. 4. One key advantage of TTA is that it does not require source domain data. However, the AGL-based method requires it, which limits the contribution of this paper. [1] Iwasawa Y, Matsuo Y. Test-time classifier adjustment module for model-agnostic domain generalization. In NeurIPS. 2021. [2] Jang M, Chung S Y, Chung H W. Test-time adaptation via self-training with nearest neighbor information. In ICLR. 2023. [3] Yuan L, Xie B, Li S. Robust test-time adaptation in dynamic scenarios. In CVPR. 2023. [4] Wang S, Zhang D, Yan Z, et al. Feature alignment and uniformity for test time adaptation. IN CVPR. 2023.

Questions

1. Visualizing the change of correlation coefficient as the model adapts to the test data flow could be more beneficial for understanding the contribution of the paper.

Rating

5

Confidence

3

Soundness

3

Presentation

2

Contribution

3

Limitations

N/A

Authorsrebuttal2024-08-11

Dear Reviewer JQG9, Thank you for your positive score, and we are glad that the clarifications were helpful. We will make sure to include such clarifications in our final manuscript.

Reviewer puv15/10 · confidence 2/52024-07-13

Summary

This paper presents observations that TTA models exhibit strong agreement-on-the-line (AGL) and accuracy-on-the-line (ACL) phenomenon, which persists across a wide range of distribution shifts and models. Leveraging this observation, the authors apply methods to estimate OOD accuracy without labeled data and perform a hyperparameter selection task for a TTA model. The proposed methods are evaluated extensively, demonstrating their effectiveness in TTA settings.

Strengths

1. The identification of the AGL phenomenon in TTA models is interesting and novel. This observation is leveraged effectively to address significant challenges in the field, including performance evaluation and hyperparameter tuning. 2. The authors provide extensive experimental results to support their claims. The evaluation covers various TTA methods and datasets, demonstrating the robustness and generality of the proposed approach.

Weaknesses

1. The paper lacks a comprehensive comparison with the extensive body of literature on model selection methods under distribution shifts (e.g., i-iv below) that share a same goal of predicting OOD performances and thereby achieving a better model selection performance. 2. While the paper examines the hyperparameter selection task for individual TTA methods, a more interesting and practical task would be to choose the best model among various TTA methods. The suggested metric might have a slope unique to each TTA method, potentially complicating the model selection task among different TTA methods. Addressing this issue would enhance the practical applicability of the proposed approach. 3. The paper is missing a core theoretical explanation of how TTA methods can result in a feature space that satisfies the sufficient condition in Theorem 1. Without this theoretical foundation, I have an impression that this paper could be interpreted as a simple application of Baek et al. and Miller et al.'s findings to the TTA setting. Providing a deeper theoretical insight would strengthen the contribution of the paper. i. Hu, D., Liang, J., Liew, J. H., Xue, C., Bai, S., & Wang, X. (2024). Mixed Samples as Probes for Unsupervised Model Selection in Domain Adaptation. In NeurIPS. ii. Musgrave, K., Belongie, S., & Lim, S. N. (2022). Benchmarking validation methods for unsupervised domain adaptation. arXiv preprint arXiv:2208.07360, 2(6), 12. iii. Yang, J., Qian, H., Xu, Y., & Xie, L. (2023). Can we evaluate domain adaptation models without target-domain labels? a metric for unsupervised evaluation of domain adaptation. arXiv preprint arXiv:2305.18712. iv. Saito, K., Kim, D., Teterwak, P., Sclaroff, S., Darrell, T., & Saenko, K. (2021). Tune it the right way: Unsupervised validation of domain adaptation via soft neighborhood density. In ICCV.

Questions

Kindly see the weaknesses part.

Rating

5

Confidence

2

Soundness

3

Presentation

3

Contribution

2

Limitations

The authors partially discuss the limitations in the paper.

Authorsrebuttal2024-08-13

Dear Reviewer puv1, Thank you once again for your thoughtful and detailed review. We kindly remind you of our rebuttal that include: * (**W1**) Adding a comparison to existing model selection baselines, * (**W2**) Demonstrating best TTA method selection, * (**W3**) Providing intuition on how TTA satisfies the condition in Theorem 1, and clarified novelty against Miller et al. and Baek et al., to address your concerns. We are happy to discuss with you further if you have any other questions or feedback!

Authorsrebuttal2024-08-14

Dear Reviewer puv1, Thank you for updating your score, and we are glad that the clarifications were helpful. We will make sure to include such results and clarifications in our final manuscript.

Authorsrebuttal2024-08-13

Dear Reviewer 1nU3, Thank you for your positive score, and we are glad that the clarifications were helpful. We will make sure to include such clarifications in our final manuscript.

Reviewer puv12024-08-13

I appreciate the authors' efforts in addressing my questions and conducting additional experiments. I believe the newly added experiments enhance the practical value of the findings presented in the paper. Considering the rebuttal and the comments from other reviewers, I have increased my score to 5.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC