Domain shift is a common problem in the realistic world, where training data and test data follow different data distributions. To deal with this problem, fully test-time adaptation (TTA) leverages the unlabeled data encountered during test time to adapt the model. In particular, entropy-based TTA (EBTTA) methods, which minimize the prediction's entropy on test samples, have shown great success. In this paper, we introduce a new clustering perspective on the EBTTA. It is an iterative algorithm: 1) in the assignment step, the forward process of the EBTTA models is the assignment of labels for these test samples, and 2) in the updating step, the backward process is the update of the model via the assigned samples. This new perspective allows us to explore how entropy minimization influences test-time adaptation. Accordingly, this observation can guide us to put forward the improvement of EBTTA. We propose to improve EBTTA from the assignment step and the updating step, where robust label assignment, similarity-preserving constraint, sample selection, and gradient accumulation are proposed to explicitly utilize more information. Experimental results demonstrate that our method can achieve consistent improvements on various datasets. Code is provided in the supplementary material.
翻译:领域偏移是现实世界中的常见问题,即训练数据与测试数据遵循不同的数据分布。为解决此问题,完全测试时自适应(TTA)利用测试阶段遇到的未标注数据来调整模型。其中,基于熵的测试时自适应(EBTTA)方法通过最小化测试样本预测熵取得了显著成功。本文从聚类视角重新审视EBTTA,将其视为一种迭代算法:1)在分配步骤中,EBTTA模型的前向过程相当于为测试样本分配标签;2)在更新步骤中,反向过程则通过已分配样本更新模型。这一新视角使我们能够探索熵最小化对测试时自适应的影响,并据此指导EBTTA的改进方向。我们提出从分配步骤和更新步骤两个环节改进EBTTA,具体包括鲁棒标签分配、相似性保持约束、样本选择与梯度累积,以显式利用更多信息。实验结果表明,本方法能在多种数据集上实现一致的性能提升。代码已收录于补充材料中。