Test-time adaptation (TTA) is the problem of updating a pre-trained source model at inference time given test input(s) from a different target domain. Most existing TTA approaches assume the setting in which the target domain is stationary, i.e., all the test inputs come from a single target domain. However, in many practical settings, the test input distribution might exhibit a lifelong/continual shift over time. Moreover, existing TTA approaches also lack the ability to provide reliable uncertainty estimates, which is crucial when distribution shifts occur between the source and target domain. To address these issues, we present PETAL (Probabilistic lifElong Test-time Adaptation with seLf-training prior), which solves lifelong TTA using a probabilistic approach, and naturally results in (1) a student-teacher framework, where the teacher model is an exponential moving average of the student model, and (2) regularizing the model updates at inference time using the source model as a regularizer. To prevent model drift in the lifelong/continual TTA setting, we also propose a data-driven parameter restoration technique which contributes to reducing the error accumulation and maintaining the knowledge of recent domains by restoring only the irrelevant parameters. In terms of predictive error rate as well as uncertainty based metrics such as Brier score and negative log-likelihood, our method achieves better results than the current state-of-the-art for online lifelong test-time adaptation across various benchmarks, such as CIFAR-10C, CIFAR-100C, ImageNetC, and ImageNet3DCC datasets. The source code for our approach is accessible at https://github.com/dhanajitb/petal.
翻译:测试时适应(TTA)是指在推理阶段,根据来自不同目标领域的测试样本,对预训练的源模型进行更新的问题。现有的TTA方法大多假设目标域是静态的,即所有测试输入均来自单一目标域。然而在实际场景中,测试输入分布可能呈现随时间变化的终身/连续偏移。此外,现有TTA方法也缺乏提供可靠不确定性估计的能力,这在源域与目标域之间存在分布偏移时至关重要。针对这些问题,我们提出PETAL(基于自训练先验的概率终身测试时适应)方法,采用概率方法解决终身TTA问题,并自然实现了:(1)学生-教师框架,其中教师模型是学生模型的指数滑动平均;(2)以源模型作为正则化项,在推理阶段对模型更新进行约束。为防止终身/连续TTA场景中的模型漂移,我们还提出一种数据驱动的参数恢复技术,通过仅恢复无关参数来减少误差累积并维持近期领域的知识。在预测错误率以及Brier分数、负对数似然等基于不确定性的指标上,我们的方法在CIFAR-10C、CIFAR-100C、ImageNetC和ImageNet3DCC等多个基准测试中,均取得了优于当前在线终身测试时适应最优方法的结果。本方法源代码已开源至 https://github.com/dhanajitb/petal。