Standard Unsupervised Domain Adaptation (UDA) methods assume the availability of both source and target data during the adaptation. In this work, we investigate the Test-Time Adaptation (TTA), a specific case of UDA where a model is adapted to a target domain without access to source data. We propose a novel approach for the TTA setting based on a loss reweighting strategy that brings robustness against the noise that inevitably affects the pseudo-labels. The classification loss is reweighted based on the reliability of the pseudo-labels that is measured by estimating their uncertainty. Guided by such reweighting strategy, the pseudo-labels are progressively refined by aggregating knowledge from neighbouring samples. Furthermore, a self-supervised contrastive framework is leveraged as a target space regulariser to enhance such knowledge aggregation. A novel negative pairs exclusion strategy is proposed to identify and exclude negative pairs made of samples sharing the same class, even in presence of some noise in the pseudo-labels. Our method outperforms previous methods on three major benchmarks by a large margin. We set the new TTA state-of-the-art on VisDA-C and DomainNet with a performance gain of +1.8\% on both benchmarks and on PACS with +12.3\% in the single-source setting and +6.6\% in\ multi-target adaptation. Additional analyses demonstrate that the proposed approach is robust to the noise, which results in significantly more accurate pseudo-labels compared to state-of-the-art approaches.
翻译:标准无监督域适应(UDA)方法假设适应过程中源域和目标域数据均可获取。本文研究测试时适应(TTA)——UDA的一种特殊情形,即模型在适应目标域时无法访问源域数据。我们提出了一种基于损失重加权策略的TTA新方法,该方法能够有效抵御伪标签中不可避免的噪声干扰。分类损失根据伪标签的可靠性进行重新加权,其中可靠性通过估计其不确定性来度量。在此重加权策略的引导下,通过聚合邻域样本的知识逐步优化伪标签。此外,采用自监督对比学习框架作为目标空间正则化器以增强知识聚合过程。我们提出了一种新颖的负例对排除策略,该策略能够识别并排除由共享相同类别的样本构成的负例对,即使在伪标签存在噪声的情况下依然有效。本方法在三个主流基准测试集上以显著优势超越现有方法。我们在VisDA-C和DomainNet上均取得+1.8%的性能提升,在PACS的单源设置下提升+12.3%,多目标适应设置下提升+6.6%,创下TTA领域的最新最佳性能。进一步分析表明,所提方法对噪声具有鲁棒性,相较于现有最优方法能够生成显著更准确的伪标签。