Everything to the Synthetic: Diffusion-driven Test-time Adaptation via Synthetic-Domain Alignment
Jiayi Guo, Junhao Zhao, Chaoqun Du, Yulin Wang, Chunjiang Ge, Zanlin Ni, Shiji Song, Humphrey Shi, Gao Huang
TL;DR
The paper tackles diffusion-driven test-time adaptation (TTA), where target data are mapped into a synthetic diffusion domain—yet this introduces source-synthetic misalignment that degrades performance. It introduces Synthetic-Domain Alignment (SDA), a framework that aligns both the source model and target data to the same synthetic domain using a Mix-of-Diffusion (MoD) approach: a conditional diffusion model generates labeled synthetic data for source-domain fine-tuning, while an unconditional diffusion model aligns these samples to the test-time synthetic domain before updating the model. SDA converts cross-domain TTA into an in-domain prediction task by ensuring that the adapted model operates within the same synthetic distribution as the target data, and it ensembles predictions from the original source model and the synthetic-domain model for inference. Empirically, SDA outperforms existing diffusion-driven TTA methods across image classification benchmarks (e.g., ImageNet-C, ImageNet-W, CIFAR-10-C) and extends effectively to semantic segmentation and multimodal LLMs like LLaVA, demonstrating improved domain alignment, reduced data-stream sensitivity, and strong scalability. The work also provides extensive ablations and visual analyses, highlighting the necessity of both conditional data generation and unconditional data alignment for robust performance.
Abstract
Test-time adaptation (TTA) aims to improve the performance of source-domain pre-trained models on previously unseen, shifted target domains. Traditional TTA methods primarily adapt model weights based on target data streams, making model performance sensitive to the amount and order of target data. The recently proposed diffusion-driven TTA methods mitigate this by adapting model inputs instead of weights, where an unconditional diffusion model, trained on the source domain, transforms target-domain data into a synthetic domain that is expected to approximate the source domain. However, in this paper, we reveal that although the synthetic data in diffusion-driven TTA seems indistinguishable from the source data, it is unaligned with, or even markedly different from the latter for deep networks. To address this issue, we propose a \textbf{S}ynthetic-\textbf{D}omain \textbf{A}lignment (SDA) framework. Our key insight is to fine-tune the source model with synthetic data to ensure better alignment. Specifically, we first employ a conditional diffusion model to generate labeled samples, creating a synthetic dataset. Subsequently, we use the aforementioned unconditional diffusion model to add noise to and denoise each sample before fine-tuning. This Mix of Diffusion (MoD) process mitigates the potential domain misalignment between the conditional and unconditional models. Extensive experiments across classifiers, segmenters, and multimodal large language models (MLLMs, \eg, LLaVA) demonstrate that SDA achieves superior domain alignment and consistently outperforms existing diffusion-driven TTA methods. Our code is available at https://github.com/SHI-Labs/Diffusion-Driven-Test-Time-Adaptation-via-Synthetic-Domain-Alignment.
