Dual-Path Adversarial Lifting for Domain Shift Correction in Online Test-time Adaptation
Yushun Tang, Shuoshuo Chen, Zhihe Lu, Xinchao Wang, Zhihai He
TL;DR
The paper tackles performance degradation of vision transformers under domain shift during inference by proposing online test-time adaptation. It introduces Dual-Path Adversarial Lifting, which augments each ViT layer with a domain shift token and uses a prediction network alongside an update network in an adversarial, dual-path framework to separate domain noise from class information. The update path employs smooth optimization (Sharpness-Aware Minimization) for robust class-token updates, while the prediction path uses non-smooth optimization to better capture domain-specific shifts, supported by a theoretical discussion. Experiments across ImageNet-C, ImageNet-R, ImageNet-A, VisDA-2021, and Office-Home demonstrate consistent improvements over state-of-the-art fully online TTA methods, underscoring practical impact for real-time cross-domain robustness.
Abstract
Transformer-based methods have achieved remarkable success in various machine learning tasks. How to design efficient test-time adaptation methods for transformer models becomes an important research task. In this work, motivated by the dual-subband wavelet lifting scheme developed in multi-scale signal processing which is able to efficiently separate the input signals into principal components and noise components, we introduce a dual-path token lifting for domain shift correction in test time adaptation. Specifically, we introduce an extra token, referred to as \textit{domain shift token}, at each layer of the transformer network. We then perform dual-path lifting with interleaved token prediction and update between the path of domain shift tokens and the path of class tokens at all network layers. The prediction and update networks are learned in an adversarial manner. Specifically, the task of the prediction network is to learn the residual noise of domain shift which should be largely invariant across all classes and all samples in the target domain. In other words, the predicted domain shift noise should be indistinguishable between all sample classes. On the other hand, the task of the update network is to update the class tokens by removing the domain shift from the input image samples so that input samples become more discriminative between different classes in the feature space. To effectively learn the prediction and update networks with two adversarial tasks, both theoretically and practically, we demonstrate that it is necessary to use smooth optimization for the update network but non-smooth optimization for the prediction network. Experimental results on the benchmark datasets demonstrate that our proposed method significantly improves the online fully test-time domain adaptation performance. Code is available at \url{https://github.com/yushuntang/DPAL}.
