Paper: Reduce, Reuse, and Recycle: Navigating Test-Time Adaptation with OOD-Contaminated Streams (ICLR-2024)

Reviewer comment (Experiments):
The claim of "benign OOD contamination" is not strong enough: The total number of data samples is not mentioned in the comparison. If test streams with OOD data have more data than those without OOD data, there is not enough evidence to show that the improvements come from auxiliary signals provided by OOD data rather than the increase of shifted data samples.

Author response:
In our work, we provide two pieces of evidence for benign OOD-contamination.  First, we reveal that in certain test streams, OOD data can improve the performance of TENT, which does not employ any filtering scheme. Second, we demonstrate that algorithms with similar OOD detection performance can exhibit wildly different InD adaptation performance, indicating that OOD data have different degrees of helpfulness.
- By default, a test stream contains the same number of InD and OOD samples.
- Because updating the learnable parameters during TTA will likely result in model collapse, it is commonly assumed that only batch norm adaptation is performed at test-time.

Reviewer comment (Experiments):
The claim of "benign OOD contamination" is not strong enough: Only batch norm adaptation is discussed and analyzed.

Author response:
The cosine similarity is used as an auxiliary metric for filtering OOD instances because we believe that those lie closer to the InD data in the feature space aid better in the domain transfer process.

Reviewer comment (Evaluation):
The discussion about benign and harmful OOD data is not sufficient: According to which measure can we distinguish benign OOD data and harmful OOD data?

Author response:
Generally speaking, if OOD data help adaptation on shifted InD performance, we refer to it as benign OOD data, and vice versa. Therefore, while it is difficult to determine the harmfulness of OOD data without post-adaptation performance, we speculate that OOD data that exist close to InD data in the feature space of the pre-trained model will tend to be benign. This hypothesis is supported through analyses of t-sne plots and 2-Wasserstein distance measurements.

Reviewer comment (Evaluation):
The discussion about benign and harmful OOD data is not sufficient: Does the advancement of R3 come from the removal of OOD data or the preservation of benign OOD data? The main experiment results show that R3 only outperforms the clean stream baseline under a few OOD-contaminated scenarios. Does it mean that benign OOD data is also removed during the filtering process?

Author response:
The performance improvement of R3, compared to other TTA baselines, can be attributed to 1) its increased distinguishability between benign vs. harmful OOD instances and 2) effective utilization of benign OOD instances. R3 only outperforms the clean stream because while benign OOD data exist, harmful OOD data are still quite dominant, and R3, as well as all of the existing baselines, are incapable of perfectly picking out shifted InD and benign OOD data for adaptation. Yet, the significant relative performance improvement of R3 from TTA baselines suggests that R3 does indeed extend the state-of-the-art in this particular TTA scenario.

Reviewer comment (Experiments):
Why perform the filtering process on mixed shifted InD data?

Author response:
Without access to explicit test labels, it is impossible to distinguish between the shifted InD and OOD data. Therefore, R3 is bound to be blind to this distinction, leaving it with no choice but to perform a filtering process on both types of data.

Reviewer comment (Experiments):
Discussions regarding the effect of batch size and the ratio of InD to OOD data on the performance of R3 are also recommended.

Author response:
The results of ablation studies on the batch size and ratio of InD to OOD data are reported in Tables 4 and 5 of the main paper, respectively.

Reviewer comment (Evaluation):
Although it outperforms baselines in the mixed corruption scenario, R3 still fails to improve the pre-trained model on CIFAR-10-C+SVHN/DTD/DTD+SVHN and ImageNet-C with OOD data.

Author response:
We were not exactly sure what the reviewer was referring to here by the “CIFAR-10-C+SVHN/DTD/DTD+SVHN and ImageNet-C with OOD data.” If the mentioned quantity refers to the “Clean Stream” accuracy in Tables 1, 2, 3, and 4, it was obtained by performing TENT on clean streams to provide the potential empirical upper bound not by performing inference with a pre-trained model.

Reviewer comment (Novelty):
My main concern is the motivation. Using external OOD data during training has empirically proved to be effective in OOD detection/generalization [r1]. However, in this manuscript, the authors appear to replicate these observed phenomena without introducing novel insights or furnishing theoretical guarantees specific to test-time adaptation. This redundancy raises questions about the contribution and originality of the work, necessitating a more comprehensive justification to substantiate the research's value. Moreover, the term 'benign' in the manuscript is vaguely defined, leading to potential confusion about what constitutes 'harmful' or 'malignant' in this context. Clarification from the authors would enhance the paper's clarity.

Author response:
We first thank Reviewer szCP for the constructive critique of our paper. With our additional discussion below, we sincerely hope that the reviewer will reconsider the research value of our work. 

The term “benign OOD data” in the manuscript refers to OOD data that can improve the adaptation performance on the shifted InD data; any OOD data that does not meet this criterion are considered to be harmful or malignant.

We agree that OOD data have been demonstrated to improve the OOD detection or generalization performance, but this is the first work to study its effect on test-time adaptation. Because intuition that holds in one domain may not always extend to another, it would be a stretch to regard the observed phenomenon of benign OOD-contamination in TTA as simple regurgitation of previously-known facts. 

We are deeply disheartened that the reviewer finds the insights from our empirical analyses lacking in research value. While our work may not offer the theoretical depth that the reviewer expects, we kindly ask Reviewer szCP to reconsider the value of our work based on the following grounds:

1. As noted above, we would like to emphasize that this is the first time OOD-contaminated streams have been explored in test-time adaptation. We believe this is a realistic and important setting that significantly broadens the scope and versatility of TTA.
2. We do make a meaningful attempt to explicate the reason behind the existence of benign OOD data through analyses of t-sne plots and 2-Wasserstein distance measurements.
3. We develop a novel algorithm which is grounded on the empirical findings, as well as extending the state-of-the-art across a variety of test scenarios that span combinations of two shifted InD datasets and five OOD datasets. R3 employs conservative dual filtering to preserve benign data, and new R3 loss functions are designed to amplify the effect of OOD data during the adaptation process through mixup and contrastive learning. Moreover, R3 may only lead to marginal performance improvements in certain test scenarios, we would like to bring to the reviewer’s attention the consistent improvement observed across the board.

Reviewer comment (Theory):
The use of t-SNE visualization for validating assumptions on benign OOD data in the manuscript is notably heuristic and may not be entirely reliable. This situation gives the impression that the authors are attempting to validate one intuitive hypothesis using another intuitive tool, which significantly weakens the theoretical foundation of the paper.

Author response:
We are deeply disheartened that the reviewer finds the insights from our empirical analyses lacking in research value. While our work may not offer the theoretical depth that the reviewer expects, we kindly ask Reviewer szCP to reconsider the value of our work based on the following grounds:

1. As noted above, we would like to emphasize that this is the first time OOD-contaminated streams have been explored in test-time adaptation. We believe this is a realistic and important setting that significantly broadens the scope and versatility of TTA.
2. We do make a meaningful attempt to explicate the reason behind the existence of benign OOD data through analyses of t-sne plots and 2-Wasserstein distance measurements.
3. We develop a novel algorithm which is grounded on the empirical findings, as well as extending the state-of-the-art across a variety of test scenarios that span combinations of two shifted InD datasets and five OOD datasets. R3 employs conservative dual filtering to preserve benign data, and new R3 loss functions are designed to amplify the effect of OOD data during the adaptation process through mixup and contrastive learning. Moreover, R3 may only lead to marginal performance improvements in certain test scenarios, we would like to bring to the reviewer’s attention the consistent improvement observed across the board.

Reviewer comment (Novelty):
The proposed method simply concatenates three stages without offering additional insights, particularly concerning the so-called `benign OOD data'. The authors need to delve deeper and elucidate how these stages interact and contribute to handling benign OOD data.

Author response:
We are deeply disheartened that the reviewer finds the insights from our empirical analyses lacking in research value. While our work may not offer the theoretical depth that the reviewer expects, we kindly ask Reviewer szCP to reconsider the value of our work based on the following grounds:

1. As noted above, we would like to emphasize that this is the first time OOD-contaminated streams have been explored in test-time adaptation. We believe this is a realistic and important setting that significantly broadens the scope and versatility of TTA.
2. We do make a meaningful attempt to explicate the reason behind the existence of benign OOD data through analyses of t-sne plots and 2-Wasserstein distance measurements.
3. We develop a novel algorithm which is grounded on the empirical findings, as well as extending the state-of-the-art across a variety of test scenarios that span combinations of two shifted InD datasets and five OOD datasets. R3 employs conservative dual filtering to preserve benign data, and new R3 loss functions are designed to amplify the effect of OOD data during the adaptation process through mixup and contrastive learning. Moreover, R3 may only lead to marginal performance improvements in certain test scenarios, we would like to bring to the reviewer’s attention the consistent improvement observed across the board.

Reviewer comment (Evaluation):
The experimental results indicate that the proposed method only achieves marginal improvements, which raises further doubts about whether the motivation of the paper has been accurately conveyed and validated. The authors need to address this issue by providing a more thorough analysis of the results and discussing potential reasons for the limited improvement, ensuring that the paper's objectives and contributions are clearly and convincingly presented.

Author response:
We develop a novel algorithm which is grounded on the empirical findings, as well as extending the state-of-the-art across a variety of test scenarios that span combinations of two shifted InD datasets and five OOD datasets. R3 employs conservative dual filtering to preserve benign data, and new R3 loss functions are designed to amplify the effect of OOD data during the adaptation process through mixup and contrastive learning. Moreover, R3 may only lead to marginal performance improvements in certain test scenarios, we would like to bring to the reviewer’s attention the consistent improvement observed across the board.

Reviewer comment (Writing):
I am confused about what is “shifted InD data”. In my understanding, “shifted + InD data” = OOD data. However, in the paper, they are different. And the concept “shifted InD data” is first introduced in the last line of page 1 with further definition. Could the authors give more clear explanation?

Author response:
In the proposed scenario, we assume that two types of out-of-distribution data exist in the test stream: those that share the label space with the in-distribution data but have undergone some type of corruption in the input space (shifted InD data) and those that exist in a completely different label space (OOD data). The objective of test-time adaptation is to adapt the pre-trained model on the shifted InD data, and thus, we consider the latter “OOD-contamination.” As the reviewer correctly notes, “shifted InD data” are commonly considered to be “OOD data,” and we apologize that our wording led to confusion.

Reviewer comment (Writing):
In Section 3.1, the concept “benign OOD-contamination” means the OOD data that is helpful for TTA?

Author response:
Yes, the concept of “benign OOD-contamination” refers to OOD data that could assist in the domain transfer from InD to shifted InD data and consequently lead to the adaptation accuracy on the shifted InD data.

Reviewer comment (Experiments):
In Section 4.1, for “Reduce” part, what are the differences from and advantages over EATA? Can we identify harmful OOD instances with entropy metric instead of energy one?

Author response:
In the reduce part, we utilize both the energy score and the similarity measure to identify and discard OOD instances. In Table A4, we compare the InD adaptation and OOD detection performance of EATA vs. R3. While the two yield a similar detection performance, R3 noticeably outperforms EATA, demonstrating that the filtering schemes in EATA and R3 may appear similar on the surface, the latter is more effective for the proposed scenario.

Reviewer comment (Theory):
In “Preliminaries and Notations”, the authors mention that irrelevant OOD data do not share the label set with training data? How to deal with these differences in label sets?

Author response:
Yes, the irrelevant OOD data do not share the label space with training data. Because we do not have access to the test labels, when performing adaptation, R3 remains blind to the distinction between the two and applies the filtering scheme to both relevant shifted InD and irrelevant OOD data.

Reviewer comment (Evaluation):
The pipeline seems to be very complex and computationally costly. It may introduce significant latency while inferring models. Do the authors compare the latency of the proposed methods and SOTAs? Note that introducing too much computational cost will make TTA algorithms hard for practical applications.

Author response:
While R3 does lead to latency increase compared to TENT, we would like to argue that such an increase in the computational cost does not completely undermine the practicality of our method, especially because this is the first time OOD-contamination has been studied in TTA. Furthermore, many of previous TTA methods have utilized techniques that can increase the computational cost, and optimizing the computational cost of TTA is a separate research topic on its own.

Reviewer comment (Experiments):
Why is there a difference in accuracy between "separate" and "mixed" for "Test (no adapt)" in Tables 1-3? Please include corresponding implementation details in the main paper. Moreover, I highly suggest the authors mix all 15 corrupted datasets rather than sampling a part of the test samples from each corrupted dataset, as the former one is more challenging to demonstrate the effectiveness of the proposed R3 method.

Author response:
Q1. Mixed Setting Implementation Detail
As noted in our NeurIPS response, the number of instances in the test set used for the mixed scenario was set to be the same as the number of instances in a single test of shifted InD data in the separate scenario. For instance, for CIFAR-10-c, each shifted test set contains 10,000 samples. To construct the mixed test set for CIFAR-10-c, we sampled 10,000 / 15 number of samples from each test set and shuffled them. Therefore, the test set used for the mixed scenario is different from that used for the separate scenario. 

We will incorporate your suggestion to mix all 15 corrupted datasets and include the results in the final version of the paper.

Reviewer comment (Evaluation):
Could the authors provide information on the number of OOD samples (with novel classes) that are filtered out by your method? This would help further validate the claim of "Benign OOD contamination."

Author response:
Q2. Number of OOD samples filtered out
In Table A4 of Appendix, we compare the OOD detection accuracy on a CIFAR-01-C+DTD stream. The total number of OOD samples in this stream are 5000, so the OOD detection accuracy of 53.38% indicates that 2669 samples are being identified as OOD.

While the three compared approaches perform similarly from the perspective of OOD detection, they yield significantly different results on the InD classification task, further justifying that some OOD data are better preserved than discarded.

Reviewer comment (Experiments):
Will the proposed method still be effective under small batch sizes, e.g., 1, 2, 4? It would be better to provide these results even though it does not perform well enough.

Author response:
Q3. Small batch size
We found that running our method with extremely small batch sizes is rather tricky and leads to complete model collapse mostly due to the filtering factor. Oftentimes, the filtering component would leave us with no sample to perform test-time adaptation with.

Reviewer comment (Writing):
Many references have been published. Pls carefully check this and cite the corresponding published version.

Author response:
Q4. Published references
We apologize again for not updating the publication statuses of cited references.

Reviewer comment (Experiments):
It would be better to clearly point out that in Tables 1-3 the clean stream accuracy is measured by Tent. Additionally, in Tables 1-3, the performance gain of Clean Stream (Tent) over “Test (no adapt)” is lower than other TTA papers. I guess this is because the authors use ResNet-50-BN from timm. Here I suggest the authors could also provide comparisons based on ResNet50BN from torchvision and include the results in the Appendix.

Author response:
Q5. Use of timm model
We are deeply sorry that this implementation detail was missing; we will include this detail in the final version.