Unsupervised Domain Adaptation through Self-Supervision

Yu Sun, Yu Sun 0020, Eric Tzeng, Trevor Darrell, Alexei A. EfrosarXiv 2019

Introduction: The Challenge of Domain Shift

In modern machine learning, models often struggle when the data they encounter in the real world (the Target domain) differs from the data they were trained on (the Source domain). This phenomenon, known as domain shift, is a critical hurdle for applications like autonomous driving, where a model trained in a sunny simulation may fail when deployed on rainy city streets.

Unsupervised Domain Adaptation (UDA) aims to bridge this gap by aligning the internal representations of the Source and Target domains without requiring labels for the Target data. Traditionally, this has been achieved through adversarial learning—a complex "minimax" game where a network tries to fool a discriminator into being unable to distinguish between domains. However, adversarial training is notoriously unstable, difficult to tune, and prone to sudden divergence.

Methodology: A Collaborative Approach

Researchers from UC Berkeley have proposed a more stable alternative: replacing the combative adversarial objective with a collaborative multi-task learning framework. Instead of fighting a discriminator, the model is tasked with solving "self-supervised" puzzles on both domains simultaneously.

The patch location task is one example of a self-supervised pretext task where the model must identify the original position of image crops.

The Multi-Task Framework

The architecture consists of three primary components:

  1. Shared Encoder: A single backbone (e.g., ResNet) that processes images from both the Source and Target domains.
  2. Main Task Classifier: Trained on labeled Source data to perform the primary objective (e.g., object classification).
  3. Self-Supervised "Pretext" Tasks: The model is given unlabeled images from both domains that have been intentionally transformed. It must then solve puzzles such as predicting an image's rotation (0°, 90°, 180°, or 270°), identifying vertical flips, or determining the relative location of image patches.

Aligning Representations via Shared Structure

The core insight of this work is that if a model can solve the same structural task on two different domains using the same low-capacity "heads," the shared encoder is incentivized to extract high-level features that are invariant to the domain shift.

As more self-supervised tasks are introduced, the Source (S) and Target (T) domains are forced into a shared feature space, achieving alignment without adversarial training.

By forcing the model to find the fundamental "essence" of objects to solve these puzzles, the representations naturally align. This transforms UDA from a volatile minimax problem into a standard, stable minimization problem. The authors observed that the distance between domain centroids shrinks smoothly during training, providing a much more predictable learning curve than adversarial methods.

Key Results and Benchmarks

The method was evaluated across diverse benchmarks, including digit recognition (MNIST, SVHN), natural scenes (CIFAR-10, STL-10), and sim-to-real semantic segmentation (GTA5 to Cityscapes).

  • State-of-the-Art Performance: The approach achieved SOTA results on 4 out of 7 standard benchmarks.
  • Natural Scene Success: On the challenging STL-10 → CIFAR-10 task, the method reached 82.1% accuracy, a significant improvement over the 75.6% source-only baseline.
  • Segmentation Benefits: When integrated with pixel-level adaptation techniques, performance on the GTA5 → Cityscapes segmentation task improved from 39.5 to 41.2 mIoU, suggesting that self-supervision captures unique structural information that other methods overlook.

Limitations and Future Directions

While effective, the method's success depends heavily on task selection. For instance, the rotation task failed on the SVHN dataset because the model could "cheat" by looking at the edges of cropped house numbers rather than learning their semantic shapes. Furthermore, while global tasks like rotation work well for classification, they may not be optimal for dense, local tasks like semantic segmentation.

Ultimately, this research suggests a shift in the UDA paradigm: moving away from adversarial competition toward stable, task-driven alignment through self-supervision.

Summary updated

BibTeX
@misc{sun2019unsupervised,
  author = {Yu Sun and Yu Sun and Eric Tzeng and Trevor Darrell and Alexei A. Efros},
  title = {{Unsupervised Domain Adaptation through Self-Supervision}},
  year = {2019},
  eprint = {1909.11825},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.11825},
}
Figure