[Paper Review] Continual Test-Time Domain Adaptation
This paper proposes CoTTA, a continual test-time domain adaptation method that mitigates error accumulation and catastrophic forgetting in non-stationary environments by using weight-averaged and augmentation-averaged pseudo-labels for improved prediction quality, and stochastically restoring a subset of network weights to their source pre-trained values to preserve prior knowledge. CoTTA achieves state-of-the-art performance across four classification and one segmentation benchmark, outperforming TENT by 29.1% error rate reduction on ImageNet-C (63.0% vs. 66.5%) and 1.9% mIoU gain on Cityscapes-to-ACDC.
Test-time domain adaptation aims to adapt a source pre-trained model to a target domain without using any source data. Existing works mainly consider the case where the target domain is static. However, real-world machine perception systems are running in non-stationary and continually changing environments where the target domain distribution can change over time. Existing methods, which are mostly based on self-training and entropy regularization, can suffer from these non-stationary environments. Due to the distribution shift over time in the target domain, pseudo-labels become unreliable. The noisy pseudo-labels can further lead to error accumulation and catastrophic forgetting. To tackle these issues, we propose a continual test-time adaptation approach~(CoTTA) which comprises two parts. Firstly, we propose to reduce the error accumulation by using weight-averaged and augmentation-averaged predictions which are often more accurate. On the other hand, to avoid catastrophic forgetting, we propose to stochastically restore a small part of the neurons to the source pre-trained weights during each iteration to help preserve source knowledge in the long-term. The proposed method enables the long-term adaptation for all parameters in the network. CoTTA is easy to implement and can be readily incorporated in off-the-shelf pre-trained models. We demonstrate the effectiveness of our approach on four classification tasks and a segmentation task for continual test-time adaptation, on which we outperform existing methods. Our code is available at \url{https://qin.ee/cotta}.
Motivation & Objective
- To address the instability of existing test-time domain adaptation methods in non-stationary, continually changing environments where domain distributions shift over time.
- To reduce error accumulation caused by noisy and mis-calibrated pseudo-labels due to distribution shift in streaming test data.
- To prevent catastrophic forgetting of source knowledge during long-term online adaptation without access to source data.
- To enable continual adaptation of all network parameters—not just batch norm statistics—using only unlabeled target data.
- To develop a plug-and-play method compatible with off-the-shelf pre-trained models without retraining on source data.
Proposed method
- Uses a momentum-averaged teacher network to generate more accurate pseudo-labels, reducing error accumulation through ensemble-like prediction stability.
- Applies augmentation-averaged predictions for high-domain-gap samples to further improve pseudo-label quality in challenging test conditions.
- Introduces stochastic weight restoration, where a small fraction of network neurons are periodically reset to their source pre-trained weights to preserve source knowledge.
- Combines both strategies in a single online learning framework that updates model parameters in real time using only unlabeled target data.
- Employs a simple yet effective training loop that integrates weight averaging and augmentation averaging without architectural modifications.
- Does not rely on specific layers (e.g., BatchNorm), making it applicable to diverse architectures including transformers and models with LayerNorm.
Experimental results
Research questions
- RQ1Can self-training methods in test-time domain adaptation remain stable under continual, non-stationary domain shifts?
- RQ2How can pseudo-label quality be improved in the presence of increasing domain shift and distribution drift over time?
- RQ3What mechanisms can effectively prevent catastrophic forgetting of source knowledge during long-term online adaptation?
- RQ4Can a plug-and-play method be designed to adapt all network parameters without access to source data?
- RQ5How does the proposed method perform across diverse benchmarks, including segmentation and complex architectures?
Key findings
- On ImageNet-to-ImageNet-C with severity level 5, CoTTA achieves an average error rate of 63.0% ± 1.8, outperforming TENT (66.5%) by 3.5 percentage points.
- In the gradual corruption setup on ImageNet-C, CoTTA reduces error to 10.4%, compared to TENT’s 30.7%, demonstrating robustness to slow distribution shifts.
- On CIFAR100-to-CIFAR100C, CoTTA improves by 2.9% over BN stats adapt and maintains performance gains over time, indicating effective long-term learning.
- On Cityscapes-to-ACDC for semantic segmentation, CoTTA achieves 58.6% mIoU, a 1.9% absolute improvement over the baseline, and outperforms TENT and BN stats adapt.
- The method is effective on diverse architectures, including Segformer with LayerNorm, showing it is not limited to models with BatchNorm layers.
- The performance gain increases over time, indicating that CoTTA effectively leverages past unlabeled data to improve current predictions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.