Test-Time Adaptation (TTA) addresses domain shifts between training and testing. However, existing methods assume a homogeneous target domain (e.g., single domain) at any given time. They fail to handle the dynamic nature of real-world data, where single-domain and multiple-domain distributions change over time. We identify that performance drops in multiple-domain scenarios are caused by batch normalization errors and gradient conflicts, which hinder adaptation. To solve these challenges, we propose Domain Diversity Adaptive Test-Time Adaptation (DATTA), the first approach to handle TTA under dynamic domain shift data streams. It is guided by a novel domain-diversity score. DATTA has three key components: a domain-diversity discriminator to recognize single- and multiple-domain patterns, domain-diversity adaptive batch normalization to combine source and test-time statistics, and domain-diversity adaptive fine-tuning to resolve gradient conflicts. Extensive experiments show that DATTA significantly outperforms state-of-the-art methods by up to 13%. Code is available at https://github.com/DYW77/DATTA.
翻译:测试时适应(TTA)旨在处理训练与测试之间的域偏移。然而,现有方法通常假设在任意给定时刻目标域是单一的(例如,单域)。它们未能处理现实世界数据的动态特性,即单域和多域的分布会随时间变化。我们发现,在多域场景下性能下降是由批归一化误差和梯度冲突引起的,这些因素阻碍了适应过程。为解决这些挑战,我们提出了域多样性自适应测试时适应(DATTA),这是首个处理动态域偏移数据流下TTA的方法。该方法由一个新颖的域多样性分数指导。DATTA包含三个关键组件:一个用于识别单域和多域模式的域多样性判别器、一个结合源统计量和测试时统计量的域多样性自适应批归一化模块,以及一个用于解决梯度冲突的域多样性自适应微调模块。大量实验表明,DATTA显著优于现有最先进方法,性能提升高达13%。代码可在 https://github.com/DYW77/DATTA 获取。