Abstract
Continual Test-Time Adaptation (CTTA) aims to adapt a source model to continually changing unlabeled target domains without access to the source data. Existing methods mainly focus on model-based adaptation in a self-training manner, such as predicting pseudo labels for new domain datasets. Since pseudo labels are noisy and unreliable, these methods suffer from catastrophic forgetting and error accumulation when dealing with dynamic data distributions. Motivated by prompt learning in NLP, we propose to learn an image-level visual domain prompt for target domains while keeping the source model parameters frozen. During testing, the changing target datasets are adapted to the source model by reformulating the input data with the learned visual prompts. Specifically, we devise two types of prompts—domain-specific prompts and domain-agnostic prompts—to extract current domain knowledge and maintain domain-shared knowledge. Furthermore, we design a homeostasis-based prompt adaptation strategy to suppress domain-sensitive parameters in domain-invariant prompts. This transition from a model-dependent paradigm to a model-free one enables us to bypass catastrophic forgetting and error accumulation. Experiments show that our proposed method achieves significant performance gains over state-of-the-art methods on four widely-used benchmarks.
Introduction: The Challenge of Continual Test-Time Adaptation
Deep neural networks often struggle when test data deviates from the training distribution, a phenomenon known as the domain gap. In real-world scenarios, this shift is often continuous and dynamic—for instance, a vision system in a vehicle encountering varying weather conditions throughout a journey. This is the core challenge of Continual Test-Time Adaptation (CTTA).
Existing solutions typically rely on self-training, where the model generates pseudo-labels for new data and updates its own weights. However, this model-based approach faces two critical issues:
- Error Accumulation: Noisy pseudo-labels lead the model to learn incorrect features, causing performance to degrade over time.
- Catastrophic Forgetting: Adapting to a new domain often overwrites knowledge relevant to previous domains or the original source domain.
Proposed Method: Visual Domain Prompting (VDP)
To address these limitations, we introduce the Visual Domain Prompt (VDP) framework. Instead of modifying the millions of parameters in the source model, we keep the model frozen and learn lightweight, image-level tokens (prompts) that "decorate" the input images.
1. Dual-Prompt Strategy
We utilize two distinct types of visual prompts that are added to the input image:
- Domain-Specific Prompt (DSP): Captures the unique characteristics of the current target domain (e.g., specific noise or lighting conditions).
- Domain-Agnostic Prompt (DAP): Maintains knowledge shared across all domains, serving as a stable bridge back to the source model's original feature space.
2. Homeostasis-based Adaptation
To ensure the DAP remains truly agnostic and is not corrupted by domain-specific noise, we implement a homeostasis-based strategy. By identifying and suppressing "domain-sensitive" parameters—those that fluctuate significantly during environmental shifts—we stabilize the DAP and enhance its ability to capture domain-invariant features.
3. Training and Testing Pipeline
The framework employs a teacher-student setup. A student network learns the prompts via backpropagation, while a teacher network (an exponential moving average of the student) provides stable pseudo-labels. Because the underlying source model is frozen, adaptation is restricted to the lightweight prompt tokens, effectively preventing the destruction of pre-trained features.
Experimental Results
The VDP method was evaluated on four major benchmarks: CIFAR-10C, CIFAR-100C, ImageNet-C, and the VLCS dataset.
- Performance Gains: On CIFAR-100C, VDP reduced the mean error rate to 16.8%, a 16.2% absolute improvement over the previous state-of-the-art (CoTTA). On ImageNet-C, it achieved a 51.5% error rate, outperforming the previous best by 11.5%.
- Anti-Forgetting: In cyclic domain tests (VLCS), VDP demonstrated the ability to accumulate knowledge. Unlike model-tuning methods that degrade over repeated cycles, VDP's error rate consistently decreased as it revisited domains.
Conclusion
By shifting the focus from model adaptation to input reformulation, Visual Domain Prompting offers a robust and efficient solution for CTTA. It bypasses the traditional pitfalls of catastrophic forgetting and error accumulation by treating the source model as a fixed, high-quality feature extractor and using prompts as "corrective lenses" for the input data. Future work will explore learnable prompt positioning and further optimizing information coverage for low-resolution inputs.
Summary updated