Source-free Domain Adaptation via Avatar Prototype Generation and Adaptation

Zhen Qiu, Yifan Zhang, Hongbin Lin, Shuaicheng Niu, Yanxia Liu, Qing Du, Mingkui Tan

Abstract

Source-free Unsupervised Domain Adaptation (UDA) addresses the challenge of adapting a model to a new target domain when the original source data is unavailable due to privacy or proprietary restrictions. We present Contrastive Prototype Generation and Adaptation (CPGA), a two-stage framework that first "mines" a pre-trained source classifier to generate representative "avatar prototypes" and then adapts the model to the target domain using a noise-robust contrastive strategy. CPGA achieves state-of-the-art results on major benchmarks, demonstrating that source data is not strictly necessary for effective domain alignment.

1. Introduction

Unsupervised Domain Adaptation (UDA) typically requires concurrent access to labeled source data and unlabeled target data. However, data privacy regulations like GDPR often make source data sharing impossible. Source-free UDA seeks to overcome this by using only a pre-trained source model. The primary difficulties are reconstructing the source feature distribution and aligning target data without the guidance of true labels, which often leads to error accumulation from noisy pseudo-labels.

2. Methodology: The CPGA Framework

The proposed CPGA framework consists of two main stages designed to recover source knowledge and perform robust target alignment.

2.1 Stage One: Prototype Generation

Since source data is inaccessible, CPGA treats the pre-trained source classifier as a knowledge repository. A Generator ($G_g$) is trained to produce synthetic feature vectors, termed "avatar prototypes," which the source classifier recognizes as belonging to specific classes. To ensure these prototypes are discriminative, a contrastive loss ($L^p_{con}$) is applied, forcing prototypes of the same class to be compact and those of different classes to be widely separated in the feature space.

2.2 Stage Two: Prototype Adaptation

In the second stage, the feature extractor ($G_e$) is adapted to the target domain using the generated prototypes as anchors.

  • Weighted Contrastive Alignment ($L^w_{con}$): Target samples are aligned with prototypes. To mitigate the impact of incorrect pseudo-labels, samples closer to class centers are assigned higher weights.
  • Early Learning Regularization ($L_{elr}$): Leveraging the observation that networks learn clean patterns before memorizing noise, a momentum-based memory bank tracks early predictions to prevent over-fitting to noisy labels.
  • Target Neighborhood Clustering ($L_{nc}$): This encourages local consistency, ensuring that neighboring target samples in the feature space are assigned to the same cluster.
The CPGA architecture: Stage One generates prototypes from a fixed classifier, while Stage Two adapts the feature extractor to target images using contrastive and regularization losses.

3. Experimental Evaluation

CPGA was evaluated on three standard benchmarks: Office-31, VisDA, and Office-Home.

3.1 Results on Office-31

CPGA achieves an average accuracy of 89.9% on Office-31, outperforming previous state-of-the-art source-free methods like MA (89.6%) and SHOT (88.7%). In specific tasks, such as Amazon to DSLR (A→D), CPGA even rivals source-available methods like CAN, reaching 94.4% accuracy.

3.2 Large-Scale Adaptation (VisDA)

On the VisDA challenge, CPGA reached 86.0% accuracy, a significant improvement over SHOT (79.6%) and BAIT (82.7%). The method also exhibits high efficiency, reaching 84.1% accuracy within only 40 epochs on this large-scale dataset.

4. Discussion and Key Insights

  • The Classifier as a Map: The decision boundaries of a pre-trained model contain a blueprint of the source distribution. By inverting the classifier with a generator, CPGA effectively reconstructs the source feature space.
  • High-Dimensional Orthogonality: Contrastive learning in high-dimensional spaces naturally leads to nearly orthogonal class prototypes, providing a clean, "ideal" space for target alignment.
Visualization of generated prototypes: (a) shows prototypes generated with standard cross-entropy, while (b) shows the effect of the proposed contrastive loss, resulting in more compact and separated clusters.
  • Noise Robustness: The combination of confidence weighting and early learning memory creates a robust "safety net," allowing the model to learn from unlabeled target data without being corrupted by pseudo-label noise.

5. Conclusion

CPGA demonstrates that effective domain adaptation is possible without source data. By generating avatar prototypes and employing robust alignment strategies, it bridges the gap between source-free and source-available UDA. Future work may involve simplifying the generator architecture and exploring the integration of avatar prototypes into broader privacy-preserving machine learning tasks.

Summary updated

BibTeX
@inproceedings{qiu2021source,
  author = {Zhen Qiu and Yifan Zhang and Hongbin Lin and Shuaicheng Niu and Yanxia Liu and Qing Du and Mingkui Tan},
  title = {{Source-free Domain Adaptation via Avatar Prototype Generation and Adaptation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/402},
}
Figure