Skip to main content
QUICK REVIEW

[Paper Review] Test-Time Adaptation via Conjugate Pseudo-labels

Sachin Goyal, Ming-Jie Sun|arXiv (Cornell University)|Jul 20, 2022
Domain Adaptation and Few-Shot LearningComputer Science24 citations
TL;DR

The paper introduces conjugate pseudo-labels (Conjugate PL) for test-time adaptation (TTA), deriving a loss from convex conjugates of the training loss. It shows cross-entropy-trained models naturally favor softmax-entropy (TENT-like) losses, while squared-loss models favor a negative squared loss. Empirically, Conjugate PL improves TTA across multiple datasets and losses, including PolyLoss, and can be interpreted as a self-training scheme with conjugate pseudo-labels.

ABSTRACT

Test-time adaptation (TTA) refers to adapting neural networks to distribution shifts, with access to only the unlabeled test samples from the new domain at test-time. Prior TTA methods optimize over unsupervised objectives such as the entropy of model predictions in TENT [Wang et al., 2021], but it is unclear what exactly makes a good TTA loss. In this paper, we start by presenting a surprising phenomenon: if we attempt to meta-learn the best possible TTA loss over a wide class of functions, then we recover a function that is remarkably similar to (a temperature-scaled version of) the softmax-entropy employed by TENT. This only holds, however, if the classifier we are adapting is trained via cross-entropy; if trained via squared loss, a different best TTA loss emerges. To explain this phenomenon, we analyze TTA through the lens of the training losses's convex conjugate. We show that under natural conditions, this (unsupervised) conjugate function can be viewed as a good local approximation to the original supervised loss and indeed, it recovers the best losses found by meta-learning. This leads to a generic recipe that can be used to find a good TTA loss for any given supervised training loss function of a general class. Empirically, our approach consistently dominates other baselines over a wide range of benchmarks. Our approach is particularly of interest when applied to classifiers trained with novel loss functions, e.g., the recently-proposed PolyLoss, where it differs substantially from (and outperforms) an entropy-based loss. Further, we show that our approach can also be interpreted as a kind of self-training using a very specific soft label, which we refer to as the conjugate pseudolabel. Overall, our method provides a broad framework for better understanding and improving test-time adaptation. Code is available at https://github.com/locuslab/tta_conjugate.

Motivation & Objective

  • Motivate and understand how to choose or derive effective TTA losses under distribution shifts without labeled test data.
  • Connect TTA loss design to the convex conjugate of the supervised loss to explain when entropy-like or alternative losses are optimal.
  • Provide a practical, general recipe for obtaining good TTA losses for various training losses (e.g., cross-entropy, squared loss, PolyLoss).
  • Show that the proposed Conjugate PL method corresponds to a self-training scheme using conjugate pseudo-labels and yields empirical gains across benchmarks.

Proposed method

  • Formulate the TTA loss through the convex conjugate of the supervised loss, showing L_conj(h(x)) = -f^*(∇f(h(x))).
  • Specialize to common losses: cross-entropy with f(h)=log sum exp(h) yields softmax-entropy as L_conj, matching TENT.
  • Show for squared loss with f(h)=½||h||^2, L_conj becomes a negative squared norm, explaining the alternative meta-learned loss.
  • Interpret Conjugate PL as self-training with pseudo-labels y_hat^CPL = ∇f(h(x)), i.e., conjugate pseudo-labels.
  • Extend to PolyLoss by expressing it in either the standard or expanded conjugate form, enabling CPL for non-standard losses.
  • Provide an algorithm (Conjugate PL) that updates model parameters using self-training with CPLs on unlabeled test batches, with temperature scaling as a practical enhancement.

Experimental results

Research questions

  • RQ1What is the principled form of a good TTA loss for a given supervised training loss under test-time distribution shifts?
  • RQ2Why do entropy-based losses perform well for cross-entropy trained models, and when do alternative losses become preferable?
  • RQ3Can convex conjugates provide a universal framework to derive TTA losses for diverse training losses (e.g., PolyLoss, squared loss)?
  • RQ4How does conjugate pseudo-labeling relate to self-training, and what pseudo-labels are optimal for different losses?

Key findings

  • Meta-learning the best TTA loss tends to recover a temperature-scaled softmax-entropy for cross-entropy trained classifiers, and a negative squared loss for squared-loss trained classifiers.
  • The convex conjugate framework explains why softmax-entropy emerges for cross-entropy and why other losses yield different TTA losses, providing a general recipe for new losses.
  • Conjugate PL consistently outperforms baseline TTA losses (e.g., entropy minimization, robust pseudo-labels, MEMO) across CIFAR-10/100-C and ImageNet-C, and on domain adaptation tasks.
  • Applying Conjugate PL to PolyLoss and squared-loss classifiers yields substantial gains, illustrating the method’s benefit when source training losses differ from standard cross-entropy.
  • The approach can be interpreted as a self-training method using conjugate pseudo-labels, offering a principled, broadly applicable TTA framework.

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.