Multiple Source Domain Adaptation with Adversarial Training of Neural Networks

Han Zhao, Shanghang Zhang, Guanhang Wu, João Paulo Costeira, José M. F. Moura, Geoffrey J. Gordon

Abstract

While domain adaptation has been actively researched in recent years, most theoretical results and algorithms focus on the single-source-single-target adaptation setting. Naive application of such algorithms on multiple source domain adaptation problem may lead to suboptimal solutions. As a step toward bridging the gap, we propose a new generalization bound for domain adaptation when there are multiple source domains with labeled instances and one target domain with unlabeled instances. Compared with existing bounds, the new bound does not require expert knowledge about the target distribution, nor the optimal combination rule for multisource domains. Interestingly, our theory also leads to an efficient learning strategy using adversarial neural networks: we show how to interpret it as learning feature representations that are invariant to the multiple domain shifts while still being discriminative for the learning task. To this end, we propose two models, both of which we call multisource domain adversarial networks (MDANs): the first model optimizes directly our bound, while the second model is a smoothed approximation of the first one, leading to a more data-efficient and task-adaptive model. The optimization tasks of both models are minimax saddle point problems that can be optimized by adversarial training. To demonstrate the effectiveness of MDANs, we conduct extensive experiments showing superior adaptation performance on three real-world datasets: sentiment analysis, digit classification, and vehicle counting.

Introduction

Machine learning models are notoriously brittle when faced with "domain shift"—where a model trained on one distribution (e.g., Amazon book reviews) fails when applied to another (e.g., kitchen appliance reviews). Domain Adaptation (DA) aims to mitigate this by transferring knowledge from a labeled source to an unlabeled target. However, most DA research focuses on the "single-source-single-target" setting. In practice, we often have multiple labeled datasets from different sensors, cities, or product categories. Naively merging these sources often leads to suboptimal results because some sources may be significantly more divergent from the target than others. This paper introduces a solid theoretical framework and efficient deep learning algorithms for Multi-Source Domain Adaptation (MSDA).

Theoretical Framework: A New Generalization Bound

Building on existing PAC-learning theories, the authors derive a new generalization bound for target domain risk. Unlike previous work, this bound does not require prior knowledge of the target distribution or a predefined "optimal combination" of source domains. A key insight from this theory is that target performance is fundamentally limited by the worst-case empirical error among the source domains. This suggests that adaptation must focus on the most difficult domain shifts to ensure robust generalization.

Multisource Domain Adversarial Networks (MDANs)

To operationalize this theory, the authors propose Multisource Domain Adversarial Networks (MDANs). The architecture employs a shared feature extractor, a task classifier, and multiple domain discriminators—one for each source-target pair.

The MDAN architecture featuring a shared feature extractor and multiple domain classifiers with gradient reversal.

As shown in Figure 1, MDANs utilize a Gradient Reversal Layer (GRL) to train the feature extractor to "fool" the discriminators. This process effectively strips away domain-specific information, leaving only features that are invariant across all domains. Two versions are introduced:

  • Hard-Max MDAN: Directly optimizes the theoretical bound by focusing on the source domain with the highest error or divergence in each iteration.
  • Soft-Max MDAN: A smoothed version using a log-sum-exp loss. This version is more data-efficient as it adaptively weights gradients from all source domains, prioritizing the most difficult shifts while still learning from the entire dataset.

Experimental Evaluation

The effectiveness of MDANs was evaluated across three distinct real-world challenges:

  1. Sentiment Analysis: Using Amazon Reviews across four categories (Books, DVDs, Electronics, Kitchen), the Soft-Max MDAN achieved the highest accuracy in nearly all transfer tasks, such as 78.63% when adapting to the "Books" domain.
  2. Digit Classification: On a collection of four datasets (MNIST, MNIST-M, SVHN, and Synthetic Digits), MDANs significantly outperformed naive source combinations, particularly on the difficult SVHN dataset.
  3. Vehicle Counting: In the WebCamT dataset, which features low-resolution footage from 12 different city cameras, the Soft-Max MDAN achieved a Mean Absolute Error (MAE) as low as 1.1942, demonstrating high precision in complex, unseen environments.

Key Insights and Conclusion

The research highlights that in MSDA, the "weakest link" (the most divergent source) matters most. MDANs address this by minimizing maximum divergence. Furthermore, the authors found that adding more source domains is not a guaranteed benefit; if new sources are highly divergent, they can degrade performance unless handled by a robust architecture like MDAN.

While MDANs provide a powerful generalization of the popular Domain-Adversarial Neural Network (DANN), they do introduce computational overhead due to the multiple discriminators. Future work may explore automated source selection to prune harmful domains and formal theoretical extensions for continuous loss functions in regression tasks.

Summary updated

Abstract

While domain adaptation has been actively researched in recent years, most theoretical results and algorithms focus on the single-source-single-target adaptation setting. Naive application of such algorithms on multiple source domain adaptation problem may lead to suboptimal solutions. As a step toward bridging the gap, we propose a new generalization bound for domain adaptation when there are multiple source domains with labeled instances and one target domain with unlabeled instances. Compared with existing bounds, the new bound does not require expert knowledge about the target distribution, nor the optimal combination rule for multisource domains. Interestingly, our theory also leads to an efficient learning strategy using adversarial neural networks: we show how to interpret it as learning feature representations that are invariant to the multiple domain shifts while still being discriminative for the learning task. To this end, we propose two models, both of which we call multisource domain adversarial networks (MDANs): the first model optimizes directly our bound, while the second model is a smoothed approximation of the first one, leading to a more data-efficient and task-adaptive model. The optimization tasks of both models are minimax saddle point problems that can be optimized by adversarial training. To demonstrate the effectiveness of MDANs, we conduct extensive experiments showing superior adaptation performance on three real-world datasets: sentiment analysis, digit classification, and vehicle counting.
BibTeX
@inproceedings{zhao2018multiple,
  author = {Han Zhao and Shanghang Zhang and Guanhang Wu and João Paulo Costeira and José M. F. Moura and Geoffrey J. Gordon},
  title = {{Multiple Source Domain Adaptation with Adversarial Training of Neural Networks}},
  booktitle = {Workshops @ ICLR},
  year = {2018},
  url = {https://openreview.net/forum?id=DSR_zxShHwj},
}
Figure