Skip to main content
QUICK REVIEW

[Paper Review] Test-Time Adaptation via Self-Training with Nearest Neighbor Information

Minguk Jang, Sae-Young Chung|arXiv (Cornell University)|Jul 8, 2022
Image Enhancement TechniquesComputer Science12 citations
TL;DR

This paper proposes TAST, a test-time adaptation method that improves self-training by leveraging nearest neighbor information to generate more reliable pseudo-labels. By training multiple randomly initialized adaptation modules on test data using these neighbor-based pseudo-labels and averaging their predictions, TAST achieves state-of-the-art performance on domain generalization (VLCS, PACS, OfficeHome, TerraIncognita) and image corruption benchmarks (CIFAR-10/100C), outperforming prior methods including T3A and TENT.

ABSTRACT

Test-time adaptation (TTA) aims to adapt a trained classifier using online unlabeled test data only, without any information related to the training procedure. Most existing TTA methods adapt the trained classifier using the classifier's prediction on the test data as pseudo-label. However, under test-time domain shift, accuracy of the pseudo labels cannot be guaranteed, and thus the TTA methods often encounter performance degradation at the adapted classifier. To overcome this limitation, we propose a novel test-time adaptation method, called Test-time Adaptation via Self-Training with nearest neighbor information (TAST), which is composed of the following procedures: (1) adds trainable adaptation modules on top of the trained feature extractor; (2) newly defines a pseudo-label distribution for the test data by using the nearest neighbor information; (3) trains these modules only a few times during test time to match the nearest neighbor-based pseudo label distribution and a prototype-based class distribution for the test data; and (4) predicts the label of test data using the average predicted class distribution from these modules. The pseudo-label generation is based on the basic intuition that a test data and its nearest neighbor in the embedding space are likely to share the same label under the domain shift. By utilizing multiple randomly initialized adaptation modules, TAST extracts useful information for the classification of the test data under the domain shift, using the nearest neighbor information. TAST showed better performance than the state-of-the-art TTA methods on two standard benchmark tasks, domain generalization, namely VLCS, PACS, OfficeHome, and TerraIncognita, and image corruption, particularly CIFAR-10/100C.

Motivation & Objective

  • To address the performance degradation in test-time adaptation (TTA) caused by inaccurate pseudo-labels under domain shift.
  • To overcome the confirmation bias in self-training TTA methods that rely solely on model predictions for pseudo-labeling.
  • To improve robustness and accuracy in zero-shot domain adaptation scenarios where no labeled test data is available.
  • To develop a simple yet effective TTA method that enhances classifier generalization using nearest neighbor information in the embedding space.

Proposed method

  • Introduces trainable adaptation modules on top of a pre-trained feature extractor, initialized randomly at test time.
  • Defines a new pseudo-label distribution for test samples based on the labels of their nearest neighbors in the embedding space.
  • Trains the adaptation modules using a contrastive objective that aligns their output distribution with both the neighbor-based pseudo-labels and class prototypes derived from the test data.
  • Uses ensemble averaging of multiple independently trained adaptation modules to produce the final prediction, reducing variance and improving robustness.
  • Applies a prototype-based classification head on the output of the adaptation modules to refine predictions using class-specific prototypes.
  • Limits training to only a few epochs during inference to maintain efficiency and avoid overfitting.

Experimental results

Research questions

  • RQ1Can nearest neighbor information in the embedding space improve the reliability of pseudo-labels in test-time adaptation?
  • RQ2Does using multiple randomly initialized adaptation modules mitigate confirmation bias in self-training-based TTA?
  • RQ3How does neighbor-based pseudo-labeling compare to prediction-based pseudo-labeling in terms of robustness under domain shift?
  • RQ4Can a prototype-based classifier trained on neighbor-informed pseudo-labels achieve better performance than standard self-training or T3A?
  • RQ5What is the impact of the number of adaptation epochs on the final accuracy and stability of the TTA method?

Key findings

  • TAST achieves state-of-the-art performance on the VLCS, PACS, OfficeHome, and TerraIncognita benchmarks for domain generalization, outperforming T3A and other SOTA TTA methods.
  • On CIFAR-10/100C under high-corruption settings, TAST-BN (a variant with batch normalization adaptation) achieves the lowest average error rate, outperforming TENT and TTT++.
  • In the OfficeHome benchmark, TAST improves the average accuracy to 63.70% with 20 adaptation epochs, surpassing the ERM baseline of 62.10% and T3A's 63.21%.
  • On TerraIncognita, TAST achieves an average accuracy of 42.64% with 20 adaptation epochs, significantly outperforming the ERM baseline (40.62%) and T3A (40.20%).
  • The ablation study confirms that using nearest neighbor-based pseudo-labels leads to more stable and accurate adaptation than prediction-based pseudo-labeling.
  • TAST-BN, which further adapts batch normalization statistics, achieves the best performance on CIFAR-10/100C, indicating that combining neighbor-based pseudo-labeling with normalization adaptation is highly effective.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.