Reshaping the Online Data Buffering and Organizing Mechanism for Continual Test-Time Adaptation

Zhilin Zhu,Xiaopeng Hong,Zhiheng Ma,Weijun Zhuang,Yaohui Ma,Yong Dai,Yaowei Wang
2024-07-18
Abstract:Continual Test-Time Adaptation (CTTA) involves adapting a pre-trained source model to continually changing unsupervised target domains. In this paper, we systematically analyze the challenges of this task: online environment, unsupervised nature, and the risks of error accumulation and catastrophic forgetting under continual domain shifts. To address these challenges, we reshape the online data buffering and organizing mechanism for CTTA. We propose an uncertainty-aware buffering approach to identify and aggregate significant samples with high certainty from the unsupervised, single-pass data stream. Based on this, we propose a graph-based class relation preservation constraint to overcome catastrophic forgetting. Furthermore, a pseudo-target replay objective is used to mitigate error accumulation. Extensive experiments demonstrate the superiority of our method in both segmentation and classification CTTA tasks. Code is available at <a class="link-external link-https" href="https://github.com/z1358/OBAO" rel="external noopener nofollow">this https URL</a>.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The paper primarily addresses the problem of Continual Test-Time Adaptation (CTTA), which is a technique for adapting pre-trained models in a continuously changing and unsupervised target domain. Specifically, the paper tackles the following three key challenges: 1. **Online Environment**: Data is processed in a single-pass manner, requiring the model to make immediate predictions. In this scenario, the model may not obtain a sufficient number of informative samples, thereby affecting the effectiveness of adaptation. 2. **Unsupervised Nature**: Throughout the adaptation process, the input data lacks ground truth labels. Additionally, due to privacy or legal constraints, source domain data may no longer be available, and only the source pre-trained model can be accessed. 3. **Error Accumulation and Catastrophic Forgetting**: When adapting to a continuously changing target domain, pseudo-labels may become unreliable, potentially leading to the loss of knowledge about the source domain, resulting in error accumulation and catastrophic forgetting. To address these challenges, the paper proposes methods for reshaping online data buffering and organization mechanisms. Specifically, it includes: - **Uncertainty-Aware Buffering Method**: An uncertainty-aware buffering strategy is designed to identify and gather high-confidence samples from the unsupervised, single-pass data stream. - **Graph-Based Class Relationship Preservation Constraint**: A novel graph-based class relationship preservation constraint is proposed to maintain the intrinsic class relationships obtained on the source domain, thereby overcoming the problem of catastrophic forgetting. This is achieved by penalizing topological changes in the class relationship graph to mitigate knowledge forgetting while allowing reasonable vertex movements to enhance adaptability. - **Pseudo-Target Replay Objective**: These samples are incorporated into a pseudo-target replay objective to reduce the risk of error accumulation caused by misclassified samples. Experimental results demonstrate that this method significantly improves CTTA performance on several challenging datasets, such as image classification tasks (ImageNet-to-ImageNet-C, CIFAR10-to-CIFAR10C, CIFAR100-to-CIFAR100C) and semantic segmentation tasks (Cityscapes-to-ACDC), proving its effectiveness and generality.