Leveraging Frozen Batch Normalization for Co-Training in Source-Free Domain Adaptation

Xianwen Deng, Yijun Wang, Zhi XueAISTATS 2025

Abstract

Source-free domain adaptation (SFDA) aims to adapt a source model, initially trained on a fully-labeled source domain, to an unlabeled target domain. Previous works assume that the statistics of Batch Normalization layers in the source model capture domain-specific knowledge and directly replace them with target domain-related statistics during training. However, our observations indicate that source-like samples in target data exhibit less deviation in the feature space of the source model when preserving the source domain-relevant statistics. In this paper, we propose co-training the source model with frozen Batch Normalization layers as part of the domain adaptation process. Specifically, we combine the source model and the target model to produce more robust pseudo-labels for global class clustering and to identify more precise neighbor samples for local neighbor clustering. Extensive experiments validate the effectiveness of our approach, showcasing its superiority over current state-of-the-art methods on three standard benchmarks.

Introduction

Deep learning models often suffer from performance degradation when deployed in environments different from their training data, a phenomenon known as domain shift. While Unsupervised Domain Adaptation (UDA) addresses this, it typically requires simultaneous access to both source and target data. In privacy-sensitive or proprietary contexts, such as medical imaging, source data is often unavailable during adaptation. This necessitates Source-Free Domain Adaptation (SFDA), where a pre-trained source model must adapt to a target domain using only unlabeled target data.

Standard SFDA approaches immediately replace the source model's Batch Normalization (BN) statistics with target-specific ones. This paper challenges that practice by observing that original source statistics are effective at recognizing "source-like" samples within the target domain. Discarding these statistics prematurely can lead to noisy feature representations and inaccurate labeling.

Methodology

The proposed framework, BN-SFDA, utilizes a two-branch co-learning strategy to leverage both source-domain knowledge and target-domain adaptation.

The BN-SFDA framework consists of two branches: the S-Model with frozen BN layers and the T-Model with updated BN statistics. They collaborate through neighbor discovery and joint loss calculation.

Dual-Model Architecture

  1. S-Model (Source-like): Maintains frozen Batch Normalization layers with original source-domain statistics to identify samples that align well with the source distribution.
  2. T-Model (Target-specific): Updates BN statistics based on target data to capture domain-specific features.

Co-Training Mechanisms

  • Global Class Clustering: To mitigate noise in self-supervised labeling, the system generates pseudo-labels only when both models reach a high-confidence consensus.
  • Local Neighbor Clustering: The framework identifies local data structures using a "core distance" metric. It dynamically selects the more reliable feature space (S-Model or T-Model) for each sample based on neighborhood density.
  • Probability Exchange: A strategy to exchange and re-weight probability outputs between models helps rectify feature space misalignments.

Experimental Results

BN-SFDA was evaluated on three standard benchmarks: Office-31, Office-Home, and VisDA-C. The method achieved state-of-the-art results across the board. On Office-Home, it reached an average accuracy of 76.2%, notably outperforming previous methods on difficult tasks like Ar→Cl. On the large-scale VisDA-C benchmark, it achieved a per-class average accuracy of 90.8%.

Accuracy comparison across different SFDA settings. The 'Consistency' bar shows that samples where both S-Model and T-Model agree have significantly higher accuracy than either model individually.

A key insight from the analysis is that the consistency between the S-Model and T-Model serves as a highly reliable signal. As shown in the experimental data, when both models predict the same class, the accuracy is substantially higher than the individual performance of either branch. This validates the use of consensus for robust pseudo-label generation.

Conclusion

By maintaining source-domain BN statistics, BN-SFDA effectively identifies stable anchor points in the target domain to guide adaptation. While the current implementation is specific to BN-based architectures and introduces additional computational overhead due to the dual-branch structure, it sets a new performance standard for source-free adaptation. Future work may explore extending these co-training principles to Transformer-based architectures that utilize Layer Normalization.

Summary updated

BibTeX
@inproceedings{deng2025leveraging,
  author = {Xianwen Deng and Yijun Wang and Zhi Xue},
  title = {{Leveraging Frozen Batch Normalization for Co-Training in Source-Free Domain Adaptation}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=NiyGv5qTzI},
}
Figure