- The paper introduces a discriminator-guided forward diffusion method that selects sample-dependent stopping times to balance corruption removal and semantic preservation.
- It leverages a frozen diffusion model and classifier, incorporating a gradient-based structural guidance to avoid catastrophic forgetting while adapting to corruption severity.
- Empirical evaluations on ImageNet-C show that the method achieves robust performance over fixed-schedule and parameter tuning approaches across multiple corruption types.
Discriminator-Guided Adaptive Diffusion for Source-Free Test-Time Adaptation under Image Corruptions
Problem Context and Motivation
The domain adaptation problem under distributional shift, especially in the source-free unsupervised domain adaptation (SFUDA) regime, is increasingly critical in practical deployment settings where labeled source data cannot be accessed after initial training. Standard parameter adaptation methods, such as test-time entropy minimization or pseudo-label refinement, carry the risk of catastrophic forgetting and require sensitive hyperparameter tuning, particularly when the shift is caused by natural image corruptions (e.g., blur, noise, weather, digital artifacts) with varying severity across test samples. Input-level adaptation via generative models, particularly diffusion models, offers an alternative by mapping corrupted target-domain images towards the latent source-domain distribution, but prior approaches have relied on fixed, manually selected noise schedules. These fixed strategies can either fail to fully remove corruptions or overly degrade class-relevant content, especially when facing the heterogeneity and unpredictability of real-world corruptions.
Framework: Discriminator-Guided Adaptive Diffusion
The central innovation in this work is a test-time input adaptation method that employs a discriminator-guided, sample-wise adaptive diffusion schedule. The method leaves both the pretrained diffusion model and the target classifier completely frozen during deployment, and all adaptation occurs through a discriminator-tuned forward diffusion process:

Figure 1: Overview of the proposed test-time adaptation pipeline: forward diffusion with discriminator-driven adaptive stopping, followed by reverse denoising and final classification via a frozen source-trained model.
Adaptive Forward Diffusion and Discriminator Scheduling
Forward diffusion injects progressive Gaussian noise into an unlabeled target image, perturbing the corrupted input along the learned source distribution until domain-specific cues are suppressed. At each step, a frozen discriminator—trained to distinguish between noisy source-like and noisy target images—evaluates the intermediate latent. Diffusion is halted when the discriminator's confidence drops below a fixed threshold τ, defining a sample-dependent stopping time t∗. This yields a strongly adaptive mechanism: mild corruptions prompt early stopping (preserving semantics), while severe ones lead to deeper noise injection (enhancing domain removal).

Figure 2: The discriminator adaptively determines the optimal stopping time for each sample by monitoring its domain confidence throughout forward diffusion.
Reverse Denoising and Structural Guidance
Starting from the adaptively chosen latent at t∗, the reverse diffusion process reconstructs a source-aligned image, leveraging the source-pretrained DDPM prior. To ensure that the semantics and low-frequency structures of the input are preserved, especially under heavy corruption, the reverse denoising process can incorporate a gradient-based structural guidance term derived from a low-pass filtered version of the original input.
Robust Frozen Classifier
The final, adapted image is classified using a source-trained and fully frozen classifier (Swin-Tiny). No parameter updates or test-time optimization occurs at the classifier or diffusion model; the only adaptation component is the discriminator-guided forward schedule.
Experimental Analysis
Benchmarks and Evaluation Protocol
Extensive evaluation is conducted on the ImageNet-C benchmark (15 corruption types × 4 families: noise, blur, weather, digital), using Top-1 classification accuracy at maximal severity. Comparative baselines include methodologically diverse approaches: model adaptation (Tent [wang2021tent], MEMO [zhang2021memo]), input purification with diffusion models (DiffPure [nie2022diffusion], DDA [gao2022back]), and the naive source-only classifier.
Main Results
Empirical evaluation demonstrates that the proposed method, especially when combined with structural guidance, achieves the highest overall average accuracy (0.39 Top-1), and the most balanced robustness across all non-noise corruption families, sometimes exceeding or matching DDA, and consistently outperforming DiffPure:
| Method |
Top-1 Accuracy |
| Source only |
0.33 |
| Tent [wang2021tent] |
0.30 |
| MEMO [zhang2021memo] |
0.29 |
| DiffPure [nie2022diffusion] |
0.25 |
| DDA [gao2022back] |
0.38 |
| Ours |
0.36 |
| Ours + Guidance |
0.39 |
For non-noise corruptions (blur, weather, digital), the adaptive method achieves consistently strong or superior results. For noise-based corruptions, DDA is marginally strongest due to aggressive denoising, but adaptive methods prevent over-denoising and semantic loss in other families.
Corruption-Wise and Family-Wise Analysis
Adaptive scheduling ensures that:
- Blur and Digital: Early stopping preserves structure for spatially structured corruptions, outperforming DDA, particularly on defocus/motion blur and pixelate/JPEG.
- Weather: Adaptive methodology yields high accuracy (esp. on fog and snow) by halting diffusion before semantically relevant features are lost.
- Noise: While DDA's deep denoising is optimal for heavy noise, the adaptive method, when coupled with structural guidance, closes much of the gap.
Discriminator Dynamics and Stopping Behavior
Quantitative and qualitative analyses of the discriminator show that forward diffusion erases domain cues at corruption-dependent rates. For noise, cues persist longer; for blur/digital/weather, early diffusion suffices.

Figure 3: Discriminator accuracy vs. diffusion step for various corruptions—noise corruptions require deeper diffusion for effective domain removal.
The per-sample stopping distribution matches the point where the discriminator's confidence curve falls to chance, confirming that adaptive schedules closely follow the underlying domain cue dynamics for each corruption.




Figure 4: Samples illustrating the histogram of stopping times t∗ and discriminator performance for representative corruptions, confirming sample-specific, corruption-aware behavior.
Ablations
Sweeping the discriminator threshold Ï„ indicates broad insensitivity; Ï„=0.5 is robust across families. Lower thresholds may allow residual domain cues, while higher ones risk excessive semantic loss.
Theoretical and Practical Implications
The principal theoretical benefit of this framework is to jointly optimize robustness and semantic fidelity via sample-wise balancing of adaptation strength—a capability unavailable to any fixed-schedule TTA method. Because the method maintains the classifier and diffusion prior fixed, there is no risk of catastrophic forgetting or divergence due to ongoing parameter updates. The practical consequence is that no per-corruption tuning is required; a single pipeline is robust to unseen or heterogeneous shifts at test time. This dramatically improves deployability in settings where source data is inaccessible and domain shifts are unpredictable.
Moreover, the adaptive scheduling framework generalizes to any setting where corruption type/severity is unknown at deployment, and provides an explicit mechanism (discriminator performance) for diagnosing sample-wise adaptation needs.
Prospects and Future Directions
A central limitation is that for pure noise corruptions, aggressive denoising (as in DDA) can yield better restoration, suggesting that an ensemble or hybrid scheduling could further improve test-time robustness across all corruption modes. Exploring learned, corruption-aware guidance or integrating classifier feedback directly into the adaptation loop (beyond input-level analysis) may provide additional improvements. Investigating the impact of data modalities beyond vision, or the extension to continual adaptation in non-stationary domains, are promising directions.
Conclusion
Discriminator-guided adaptive diffusion establishes a new paradigm for SFUDA under complex, real-world corruptions. Its sample-wise, data-driven noising schedule robustly interpolates between minimal intervention and strong purification depending on corruption characteristics, yielding superior or competitive accuracy and stability compared to both parameter-adaptive and fixed-schedule diffusion baselines. The approach is architecture-agnostic, tuning-free, and strictly source-free, consistent with the operational demands of secure, large-scale deployment scenarios. Future research will focus on corruption-type hybridization, dynamic classifier integration, and more extensive cross-domain evaluation.