Unsupervised Domain Adaptation in the Absence of Source Data

Roshni Sahoo, Divya Shanmugam, John V. Guttag

Introduction

Machine learning models often exhibit brittleness when deployed in environments that differ from their training distribution. This phenomenon, known as distribution shift, can cause a classifier trained on sunny images to fail in rainy conditions. While standard Unsupervised Domain Adaptation (UDA) aims to mitigate this by aligning source and target distributions, these methods typically require simultaneous access to both datasets. In practice, source data is frequently unavailable due to privacy concerns, proprietary restrictions, or logistical constraints. This paper proposes a "source-free" UDA approach that adapts a pre-trained "black-box" model to a target domain using only unlabeled target images.

Methodology

The proposed method treats the pre-trained source classifier as a fixed expert. Instead of retraining the classifier, the system learns to "pre-process" target images to match the expert's expectations.

Proposed architecture for source-free domain adaptation.

The architecture consists of three main components:

  1. Transformation Network: A small CNN that predicts transformation parameters (e.g., brightness adjustment or rotation angle) for a given target image.
  2. Differentiable Transforms: These parameters are applied via differentiable functions, allowing end-to-end gradient-based optimization.
  3. Maximum Softmax Probability (MSP) Loss: The network is trained to maximize the confidence (MSP) of the source classifier on the transformed images. This leverages the observation that models are most confident when processing data similar to their training set. Temperature scaling ($s=10$) is applied to sharpen the softmax outputs and improve the optimization signal.

Experimental Setup

The approach was evaluated using modified versions of CIFAR-10 (testing brightness and contrast shifts) and MNIST (testing rotation shifts). The method was compared against the original source classifier (no adaptation), an "Oracle" trained directly on target data, and standard fine-tuning approaches.

Results and Discussion

The experimental results demonstrate that a pre-trained model's internal confidence scores provide sufficient information to guide adaptation even without access to source data.

Comparison of accuracy across different brightness and contrast shifts against fine-tuning baselines.

Key findings include:

  • Superiority over Fine-Tuning: On CIFAR-10, the unsupervised method outperformed fine-tuning the model's last layer when fewer than 4,000 labeled target samples were available. It beat fine-tuning the entire network when fewer than 1,000 labeled samples were available.
  • Near-Oracle Accuracy: For contrast and rotation shifts, the method recovered nearly all lost accuracy, performing almost as well as an Oracle model trained with full knowledge of the target domain.
  • Robustness to Severity: The method remained stable even as shifts became severe (e.g., very low brightness), effectively "undoing" the environmental changes that caused the source classifier's accuracy to plummet.

Conclusion

This work proves that source-free domain adaptation is feasible by utilizing a pre-trained model's own certainty as a compass. By restricting adaptations to "natural axes" of variation, the method achieves robust performance without labels. Future work includes addressing non-invertible transformations (e.g., extreme overexposure) and extending the approach to complex semantic shifts and medical imaging artifacts, such as bias field correction in MRI scans.

Summary updated

BibTeX
@misc{sahoo2020unsupervised,
  author = {Roshni Sahoo and Divya Shanmugam and John V. Guttag},
  title = {{Unsupervised Domain Adaptation in the Absence of Source Data}},
  year = {2020},
  eprint = {2007.10233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.10233},
}
Figure