arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.09640cs.LG
收藏

基于共轭伪标签的测试时自适应

Test-Time Adaptation via Conjugate Pseudo-labels

Carnegie Mellon University(卡内基梅隆大学);Bosch Center for AI(博世人工智能中心)

Sachin Goyal, Mingjie Sun, Aditi Raghunathan, Zico Kolter

摘要:

测试时自适应(TTA)是指神经网络适应分布偏移,在测试时只访问来自新域的未标记测试样本。现有的TTA方法优化了无监督的目标,例如TENT中的模型预测的熵[Wang等人,2021年],但目前还不清楚究竟是什么使一个良好的TTA损失。在本文中,我们首先提出了一个令人惊讶的现象:如果我们试图在广泛的一类函数上元学习最好的TTA损失,那么我们可以恢复一个与TENT所采用的softmax熵非常相似的函数(温度缩放版本)。然而,只有当我们正在适应的分类器通过交叉熵训练时,这才成立;如果通过平方损失训练,则会出现不同的最佳TTA损失。为了解释这一现象,我们通过训练损失的凸共轭透镜来分析TTA。我们表明,在自然条件下,这个(无监督的)共轭函数可以被视为对原始监督损失的良好局部近似,实际上,它恢复了元学习发现的最佳损失。这导致了一个通用的配方,可以用来找到一个良好的TTA损失的任何给定的监督训练损失函数的一般类。从经验上讲,我们的方法在广泛的基准测试中始终优于其他基线。我们的方法是特别感兴趣的,当应用于分类训练与新的损失函数,例如,最近提出的PolyLoss,它与基于熵的损失有很大不同(并且优于基于熵的损失)。此外,我们表明,我们的方法也可以被解释为一种自我训练使用一个非常具体的软标签,我们称之为共轭伪标签。总的来说,我们的方法提供了一个广泛的框架,更好地理解和改善测试时自适应。代码可在https://github.com/locuslab/tta_conjugate上获得。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑