Test-time adaptation (TTA) has shown to be effective at tackling distribution shifts between training and testing data by adapting a given model on test samples. However, the online model updating of TTA may be unstable and this is often a key obstacle preventing existing TTA methods from being deployed in the real world. Specifically, TTA may fail to improve or even harm the model performance when test data have: 1) mixed distribution shifts, 2) small batch sizes, and 3) online imbalanced label distribution shifts, which are quite common in practice. In this paper, we investigate the unstable reasons and find that the batch norm layer is a crucial factor hindering TTA stability. Conversely, TTA can perform more stably with batch-agnostic norm layers, \ie, group or layer norm. However, we observe that TTA with group and layer norms does not always succeed and still suffers many failure cases. By digging into the failure cases, we find that certain noisy test samples with large gradients may disturb the model adaption and result in collapsed trivial solutions, \ie, assigning the same class label for all samples. To address the above collapse issue, we propose a sharpness-aware and reliable entropy minimization method, called SAR, for further stabilizing TTA from two aspects: 1) remove partial noisy samples with large gradients, 2) encourage model weights to go to a flat minimum so that the model is robust to the remaining noisy samples. Promising results demonstrate that SAR performs more stably over prior methods and is computationally efficient under the above wild test scenarios.
翻译:测试时间适应(TTA)显示,通过调整测试样品的某个模型,在解决培训和测试数据之间的分配变化方面,测试时间适应(TTA)已证明是有效的,但是,TTA的在线模式更新可能不稳定,这往往是妨碍现有TTA方法在现实世界中部署的一个关键障碍。具体地说,TTA在测试数据出现:1)混合分配变化,2小批量尺寸,3)在线标签分配变化不平衡,这在实践中非常常见。在本文件中,我们调查不稳定的原因,发现批次规范层是阻碍TTA稳定性的关键因素。相反,TTA可以更稳定地使用批次标准层的层层,这往往是阻碍现有TTTA方法在现实世界中应用的关键障碍。具体地说,TTTA可能无法改进甚至损害模型的运行性能,2)通过调查失败案例,发现某些具有大梯度的噪音测试样品可能会扰乱模型的适应,导致残余的解决方案崩溃,\ie,为所有样本分配相同的类标签。为了解决上述崩溃问题,我们建议,TTTTA标准可以更精确地执行一个精确的测试方法,然后从SAR标准进行一个最起码的升级的样品,然后通过一个最精确的样品,从SAR的样品,从SAR标准进行一个最精确的样品,从一个最精确的样品,从一个比重的方法,从一个比。</s>