TL;DR
This paper introduces D-TAPE, a novel test-time adaptation method that leverages diffusion models to align target domain images with the source domain before adapting a model using pseudo-labels. This approach effectively combines the benefits of model and input adaptation while mitigating their individual weaknesses, achieving state-of-the-art results on corrupted image datasets.
What Problem Does This Paper Address?
Deep learning models trained on a specific data distribution (source domain) often perform poorly when deployed on data from a different, continuously changing distribution (target domain). This is a common issue in real-world scenarios where data can drift over time or be affected by various corruptions. Test-time adaptation (TTA) aims to address this by adapting the model during inference without access to the original source data. Existing TTA methods fall into two main categories: model adaptation (updating model parameters) and input adaptation (modifying input data). Model adaptation can suffer from accumulating noisy updates, while input adaptation might struggle with certain domain shifts and needs to adapt each input from scratch. This paper tackles the challenge of developing a TTA method that is robust to diverse domain shifts and effectively leverages the strengths of both adaptation paradigms.
Methods
The core of D-TAPE lies in its innovative combination of diffusion models and a student-teacher framework for pseudo-label ensembling.
- Diffusion-infused Latent Refinement: The method starts by using a pre-trained diffusion model (trained on the source domain) to project the target domain images closer to the source distribution. To prevent the diffusion process from losing crucial class information, they employ a low-pass filtering technique, similar to ILVR, which preserves high-frequency features. This process is iterative, refining the image representation.
- Pseudo-label Ensembling with Student-Teacher: A student-teacher framework is used for model adaptation. The "teacher" model generates pseudo-labels for both the original and the diffusion-projected test images. These pseudo-labels then supervise the "student" model's updates. The teacher's weights are updated via an exponential moving average of the student's weights. This ensembling of pseudo-labels from both original and refined inputs helps to create more robust supervision signals.
This approach aims to benefit from the diffusion model's ability to bridge the domain gap (input adaptation aspect) while simultaneously updating the model's parameters using these refined inputs (model adaptation aspect).
Datasets
- Training: CIFAR10 (standard dataset for training the initial models).
- Evaluation: CIFAR10-C (a benchmark dataset comprising CIFAR10 images corrupted with 15 different types of corruptions at various severity levels). The paper evaluates on severity level 5 for sudden shifts and considers all severity levels for gradual shifts.
Key Insights and Ideas
- Diffusion as a Domain Aligner: The paper convincingly demonstrates that diffusion models can be effectively used to "denoise" or align target domain images towards the source domain distribution, acting as a powerful input adaptation step.
- Class-Preserving Diffusion: The use of a low-pass filter during the diffusion process is crucial for retaining class information, a common pitfall in diffusion-based image manipulation.
- Synergy of Model and Input Adaptation: D-TAPE's strength lies in its seamless integration of diffusion-based input refinement with pseudo-label ensembling for model adaptation, creating a more robust and effective TTA strategy.
- Pseudo-label Ensembling for Robustness: Ensembling pseudo-labels from both original and diffusion-refined images provides a richer and more stable supervisory signal, helping the model adapt better to challenging corruptions.
Key Results
- D-TAPE outperforms the strongest baseline (COTTA) by an average of 1.7% across 15 diverse corruptions on CIFAR10-C in the sudden adaptation setting.
- It significantly surpasses the strongest input adaptation baseline (DDA) by an average of 18% in the same setting.
- In the gradual adaptation setting, D-TAPE improves over the strongest baseline by approximately 1% and shows substantial gains over DDA.
- A-distance analysis shows that the diffusion process generally brings generated images closer to the clean CIFAR-10 distribution, indicating successful domain alignment.
Limitations and Future Work
- A-distance for Fog and Contrast: The paper notes that for certain corruptions like "fog" and "contrast," the A-distance slightly increases for generated images. This is attributed to the interpolated latent refinement scheme retaining low-frequency noises.
- Future Work: The authors anticipate that their work will inspire broader adoption and exploration of diffusion models in future test-time adaptation research. The paper's success suggests that exploring more sophisticated diffusion model conditioning and refinement strategies could lead to further improvements.
Summary updated