Abstract: Existing domain adaptation literature comprises multiple techniques that align the labeled source and unlabeled target domains at different stages, and predict the target labels. In a source-free domain adaptation setting, the source data is not available for alignment. We present a source-free generative paradigm that captures the relations between the source categories and enforces them onto the unlabeled target data, thereby circumventing the need for source data without introducing any new hyper-parameters. The adaptation is performed through the adversarial alignment of the posterior probabilities of the source and target categories. The proposed approach demonstrates competitive performance against other source-free domain adaptation techniques and can also be used for source-present settings.
Introduction
Unsupervised Domain Adaptation (UDA) aims to transfer knowledge from a labeled source domain to an unlabeled target domain. However, real-world constraints such as data privacy, security, and storage often prevent access to the original source data during the adaptation phase. This challenge has given rise to Source-free Domain Adaptation (SFDA).
This paper introduces GAP (Generative Alignment of Posterior probabilities), a novel framework designed to address SFDA by performing alignment in the label space rather than the high-dimensional feature space. By training a generative model to mimic the label distributions of the missing source dataset, GAP successfully adapts classifiers to new target domains using only the pre-trained model and unlabeled data.
The Challenge of Source-free Adaptation
Traditional UDA methods typically require simultaneous access to both source and target datasets to align their features. In a source-free setting, standard feature or pixel alignment is impossible. Existing SFDA methods often rely on pseudo-labeling or complex entropy-based losses, which are notoriously sensitive to hyperparameters and batch sizes. GAP overcomes these limitations by hypothesizing that aligning condensed posterior probabilities (the final probability outputs) is more stable and effective than aligning high-dimensional features.
The GAP Framework
The GAP framework operates through a generative paradigm that captures inter-class relationships without requiring source data during adaptation. The process is divided into three distinct stages:
- Source Training: A model is trained on the source data to minimize classification loss.
- Source Replication: Since the source data is missing during adaptation, a conditional Generative Adversarial Network (cGAN) is trained as a "Source Replicator." This replicator learns to generate probability vectors that mimic the outputs of the original source classifier, capturing the "style" and inter-class relationships of the source model's predictions.
- Target Adaptation: The target model is trained using an adversarial objective. It aims to produce posterior probabilities on the unlabeled target data that are indistinguishable from the "fake" source probabilities produced by the Replicator. During this stage, the classifier's final layer is frozen to anchor decision boundaries, while the feature extractor is updated.
Key Insights and Advantages
- Simplicity of Label Space: As data moves through a neural network, its complexity decreases. Aligning the condensed information at the posterior probability level is more stable than high-dimensional feature alignment.
- Zero New Hyperparameters: Unlike many UDA methods that require balancing multiple loss terms (e.g., entropy vs. diversity), GAP utilizes a standard GAN framework that does not introduce new tuning knobs.
- Robustness to Batch Size: Many current methods fail when the batch size is small because they cannot accurately estimate the dataset's distribution. GAP maintains stability across varying batch sizes, making it practical for resource-constrained environments.
Empirical Performance and Robustness
GAP was evaluated on standard benchmarks including Digits (SVHN, MNIST, USPS), Office-31, Office-Home, and VisDa-C. The results demonstrate that GAP achieves accuracy comparable to or better than current state-of-the-art methods like SHOT. For instance, on the Digits dataset, GAP achieved an average accuracy of 98.4%, and on the large-scale VisDa-C dataset, it reached 81.9%.
A significant finding is GAP's stability relative to batch size. In a head-to-head comparison with SHOT-IM, GAP's performance remained consistent as batch sizes decreased, whereas SHOT-IM's accuracy dropped by approximately 25% when the batch size was reduced to a quarter of its original value.
Conclusion and Future Directions
GAP provides a robust, generative solution for source-free domain adaptation by aligning posterior probabilities. While highly effective, the current model assumes similar class priors between source and target domains ($p_s(y) \approx p_t(y)$) and requires identical label spaces. Future research may extend this framework to OpenSet or Partial domain adaptation settings, where class distributions and categories differ more significantly between domains.
Summary updated