Skip to main content
QUICK REVIEW

[Paper Review] AdaNPC: Exploring Non-Parametric Classifier for Test-Time Adaptation

Yifan Zhang, Xue Wang|arXiv (Cornell University)|Apr 25, 2023
Domain Adaptation and Few-Shot LearningComputer Science14 citations
TL;DR

AdaNPC introduces a non-parametric, memory-based classifier for test-time adaptation, yielding strong DG performance and robustness across successive target domains without heavy gradient updates.

ABSTRACT

Many recent machine learning tasks focus to develop models that can generalize to unseen distributions. Domain generalization (DG) has become one of the key topics in various fields. Several literatures show that DG can be arbitrarily hard without exploiting target domain information. To address this issue, test-time adaptive (TTA) methods are proposed. Existing TTA methods require offline target data or extra sophisticated optimization procedures during the inference stage. In this work, we adopt Non-Parametric Classifier to perform the test-time Adaptation (AdaNPC). In particular, we construct a memory that contains the feature and label pairs from training domains. During inference, given a test instance, AdaNPC first recalls K closed samples from the memory to vote for the prediction, and then the test feature and predicted label are added to the memory. In this way, the sample distribution in the memory can be gradually changed from the training distribution towards the test distribution with very little extra computation cost. We theoretically justify the rationality behind the proposed method. Besides, we test our model on extensive numerical experiments. AdaNPC significantly outperforms competitive baselines on various DG benchmarks. In particular, when the adaptation target is a series of domains, the adaptation accuracy of AdaNPC is 50% higher than advanced TTA methods. The code is available at https://github.com/yfzhang114/AdaNPC.

Motivation & Objective

  • Motivate domain generalization and robustness to unseen distributions.
  • Propose a memory-augmented, non-parametric approach for test-time adaptation (AdaNPC).
  • Theoretically justify how non-parametric classifiers reduce domain divergence and target risk.
  • Demonstrate strong empirical gains across multiple DG benchmarks with various backbones.

Proposed method

  • Train with a KNN-based loss to learn representations that pull same-label features together and push different-label features apart (Eq. 4).
  • Construct a memory bank M of source features and labels; use it at test time to vote with the K nearest neighbors (Eq. 5).
  • Perform memory-based test-time adaptation by updating the memory with test features and predicted labels when confidence is high.
  • Optionally retrain a BN layer to improve representation quality during adaptation.
  • Implement a simple FIFO-based memory management and straightforward KNN search for efficiency.

Experimental results

Research questions

  • RQ1Can a non-parametric, memory-based classifier improve test-time adaptation for domain generalization without gradient-based updates?
  • RQ2How does incorporating online target samples into memory influence target risk and domain divergence?
  • RQ3What theoretical guarantees exist for KNN-based adaptation under covariate and posterior shifts?
  • RQ4How does AdaNPC perform across multiple DG benchmarks and backbones, including successive domain adaptation scenarios?

Key findings

  • AdaNPC achieves competitive to state-of-the-art DG performance across five OOD benchmarks.
  • AdaNPC and AdaNPC +BN outperform many baselines, with substantial gains in average accuracy.
  • BN retraining provides additional gains with minimal parameter updates.
  • AdaNPC delivers strong performance even without fine-tuning, and scales well as the source dataset grows.
  • In successive adaptation, AdaNPC significantly mitigates forgetting and maintains source-domain accuracy.

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.