Exploring Structured Semantic Priors Underlying Diffusion Score for Test-time Adaptation
Mingjia Li, Shuang Li, Tongrui Su, Longhui Yuan, Jian Liang, Wei Li
TL;DR
This work tackles robust test-time adaptation by bridging discriminative models with the rich semantic priors embedded in diffusion score models. It introduces DUSA, a single-timestep, priors-based objective that aligns the diffusion noise predictor with a pre-trained task model through a theoretically grounded, unbiased estimator $\mathcal{L}_{\text{DUSA}}(\theta, \phi)$. The authors derive a key score-function identity $\nabla_{\mathbf{x}}\log p(\mathbf{x}) = \sum_y p(y|\mathbf{x})\nabla_{\mathbf{x}}\log p(\mathbf{x}|y)$ and connect it to Tweedie’s formula to justify using conditional diffusion predictions as discriminative priors, including per-pixel extensions for segmentation. Practical designs—timestep selection, candidate class pruning via LogitNorm, and budgeted computation—enable efficient adaptation that rivals or surpasses diffusion-based baselines across ImageNet-C and ADE20K-C, with demonstrated benefits in both fully and continual TTA. The approach generalizes to dense prediction and maintains strong performance with modest computational overhead, making diffusion priors more accessible for real-world discriminative tasks.
Abstract
Capitalizing on the complementary advantages of generative and discriminative models has always been a compelling vision in machine learning, backed by a growing body of research. This work discloses the hidden semantic structure within score-based generative models, unveiling their potential as effective discriminative priors. Inspired by our theoretical findings, we propose DUSA to exploit the structured semantic priors underlying diffusion score to facilitate the test-time adaptation of image classifiers or dense predictors. Notably, DUSA extracts knowledge from a single timestep of denoising diffusion, lifting the curse of Monte Carlo-based likelihood estimation over timesteps. We demonstrate the efficacy of our DUSA in adapting a wide variety of competitive pre-trained discriminative models on diverse test-time scenarios. Additionally, a thorough ablation study is conducted to dissect the pivotal elements in DUSA. Code is publicly available at https://github.com/BIT-DA/DUSA.
