Learning Invariant Representations and Risks for Semi-Supervised Domain Adaptation

Bo Li, Yezhen Wang, Shanghang Zhang, Dongsheng Li, Kurt Keutzer, Trevor Darrell, Han Zhao

In machine learning, the assumption that training and test data share the same distribution rarely holds in real-world applications. A model trained to recognize objects in sunny conditions often fails in snowy environments—a phenomenon known as "domain shift." While Unsupervised Domain Adaptation (UDA) attempts to bridge this gap using unlabeled target data, it frequently struggles when label distributions vary.

This paper introduces LIRR (Learning Invariant Representations and Risks), a novel framework for Semi-supervised Domain Adaptation (Semi-DA). In Semi-DA, researchers leverage a large labeled source dataset alongside a small amount of labeled target data. LIRR is the first method to simultaneously align both feature distributions and predictive logic across domains, ensuring that the model's "reasoning" remains consistent regardless of the environment.

The Challenge: Beyond Feature Alignment

Most existing domain adaptation methods focus solely on Invariant Representations. The goal is to transform data so that a domain classifier cannot distinguish between source and target features. However, theoretical research has shown that aligning features (marginal distributions) is insufficient. If the relationship between features and labels—the conditional distribution—shifts, the model will still fail. For instance, a specific visual pattern might represent a "car" in the source domain but a "truck" in the target domain. This discrepancy is known as a shift in "risks."

The LIRR Framework

LIRR addresses this by optimizing for Joint Independence, ensuring the domain index becomes irrelevant to both the features and the labels. The method operates on two primary fronts:

  1. Invariant Representations ($D \perp Z$): Using adversarial training, the model learns a feature extractor that produces representations ($Z$) indistinguishable between the source and target domains ($D$).
  2. Invariant Risks ($D \perp Y | Z$): The model ensures that the optimal predictor for the source domain remains optimal for the target domain. By minimizing the divergence between domain-invariant and domain-specific predictors, LIRR forces the network to rely on features with stable label relationships.
Conceptual overview of LIRR: moving from separate predictors to invariant representations and finally invariant risks.

Experimental Results

The authors evaluated LIRR across diverse benchmarks, including image classification (NICO, OfficeHome, DomainNet, VisDA2017) and regression (WebCamT traffic counting).

Performance Gains

LIRR consistently outperformed state-of-the-art methods like DANN, CDAN, and MME. On the NICO (Animal) dataset with only 1% labeled target data, LIRR achieved 89.67% accuracy, a significant jump from the standard supervised baseline of 70.06%. In regression tasks on the WebCamT dataset, LIRR achieved the lowest Mean Absolute Error (MAE) across various camera-to-camera adaptation pairs, demonstrating its versatility.

Visualizing Model Logic

To verify that LIRR learns more robust features, the authors utilized Grad-CAM visualizations. While baseline methods often fixate on domain-specific background noise (like snow or grass), LIRR consistently focuses on the actual object of interest, such as the anatomical features of an animal.

Grad-CAM visualizations comparing LIRR to baselines. LIRR focuses more accurately on the object (e.g., the dog's face) rather than background elements.

Conclusion

LIRR provides a unified information-theoretic framework for Semi-DA by bridging the gap between feature alignment and risk consistency. By ensuring that both the representations and the predictive logic are domain-invariant, it achieves superior generalization even with minimal target labels. Future work may extend this approach to more complex tasks like object detection and open-set adaptation where target domains contain entirely new classes.

Summary updated

BibTeX
@inproceedings{li2021learning,
  author = {Bo Li and Yezhen Wang and Shanghang Zhang and Dongsheng Li and Kurt Keutzer and Trevor Darrell and Han Zhao},
  title = {{Learning Invariant Representations and Risks for Semi-Supervised Domain Adaptation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00116},
}
Figure