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

有效的测试时模型自适应而不会忘记

Efficient Test-Time Model Adaptation without Forgetting

South China University of Technology(华南理工大学);Tencent AI Lab(腾讯人工智能实验室);National University of Singapore(新加坡国立大学);Pazhou Laboratory(琶洲实验室)

Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, Mingkui Tan

摘要:

测试时自适应(Test-time adaptation,TTA)通过调整给定的模型来解决训练数据和测试数据之间潜在的分布偏移。任何测试样本。当测试环境频繁变化时,此任务对于深度模型尤为重要。尽管最近已经有一些尝试来处理这个任务,我们仍然面临着两个实际挑战:1)现有的方法必须对每个测试样本进行向后计算,导致许多应用程序无法承受的预测成本; 2)虽然现有的TTA解决方案可以显著提高对分布外数据的测试性能,在TTA之后,它们经常遭受分发中数据的严重性能降级(称为灾难性遗忘)。在本文中,我们指出,并不是所有的测试样本都对模型自适应做出了同等的贡献,高熵的样本可能会导致噪声梯度,从而破坏模型。基于此,我们提出了一个主动样本选择准则来识别可靠的和非冗余的样本,在此基础上更新模型以最小化测试时自适应的熵损失。此外,为了减轻遗忘问题,我们引入了Fisher正则化器来约束重要的模型参数的剧烈变化,其中Fisher重要性是从具有生成的伪标签的测试样本中估计的。在CIFAR-10-C、ImageNet-C和ImageNet-R上的大量实验验证了该方法的有效性。

英文摘要:

Test-time adaptation (TTA) seeks to tackle potential distribution shifts between training and testing data by adapting a given model w.r.t. any testing sample. This task is particularly important for deep models when the test environment changes frequently. Although some recent attempts have been made to handle this task, we still face two practical challenges: 1) existing methods have to perform backward computation for each test sample, resulting in unbearable prediction cost to many applications; 2) while existing TTA solutions can significantly improve the test performance on out-of-distribution data, they often suffer from severe performance degradation on in-distribution data after TTA (known as catastrophic forgetting). In this paper, we point out that not all the test samples contribute equally to model adaptation, and high-entropy ones may lead to noisy gradients that could disrupt the model. Motivated by this, we propose an active sample selection criterion to identify reliable and non-redundant samples, on which the model is updated to minimize the entropy loss for test-time adaptation. Furthermore, to alleviate the forgetting issue, we introduce a Fisher regularizer to constrain important model parameters from drastic changes, where the Fisher importance is estimated from test samples with generated pseudo labels. Extensive experiments on CIFAR-10-C, ImageNet-C, and ImageNet-R verify the effectiveness of our proposed method.

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

↑