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 perspective on the EBTTA, which interprets these methods from a view of clustering. 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. Based on the interpretation, we can gain a deeper understanding of EBTTA, where we show that the entropy loss would further increase the largest probability. Accordingly, we offer an alternative explanation for why existing EBTTA methods are sensitive to initial assignments, outliers, and batch size. This observation can guide us to put forward the improvement of EBTTA. We propose robust label assignment, weight adjustment, and gradient accumulation to alleviate the above problems. Experimental results demonstrate that our method can achieve consistent improvements on various datasets. Code is provided in the supplementary material.
翻译:域偏移是现实世界中的一个常见问题,即训练数据与测试数据遵循不同的数据分布。为解决该问题,全测试时自适应方法利用测试阶段遇到的未标注数据来调整模型。其中,基于熵的测试时自适应方法通过最小化测试样本预测的熵,已展现出显著成效。本文从聚类视角为EBTTA引入新解读,揭示其本质为一种迭代算法:1)在标签分配步骤中,EBTTA模型的前向传播过程为测试样本分配伪标签;2)在模型更新步骤中,反向传播则利用已分配样本对模型进行更新。基于该视角,我们可深入理解EBTTA——熵损失会进一步强化最大概率值。由此,我们提出现有EBTTA方法对初始标签分配、离群样本及批次大小敏感的另一解释。该发现引导我们提出针对EBTTA的改进方案,具体包括鲁棒标签分配、权重调整与梯度累积策略。实验结果表明,我们的方法可在多种数据集上取得一致性改进。代码详见补充材料。