Skip to main content

Domain-Adversarial Training of Neural Networks

  • Chapter
  • First Online:
Domain Adaptation in Computer Vision Applications

Abstract

We introduce a representation learning approach for domain adaptation, in which data at training and test time come from similar but different distributions. Our approach is directly inspired by the theory on domain adaptation suggesting that, for effective domain transfer to be achieved, predictions must be made based on features that cannot discriminate between the training (source) and test (target) domains. The approach implements this idea in the context of neural network architectures that are trained on labeled data from the source domain and unlabeled data from the target domain (no labeled target-domain data is necessary). As the training progresses, the approach promotes the emergence of features that are (i) discriminative for the main learning task on the source domain and (ii) indiscriminate with respect to the shift between the domains. We show that this adaptation behavior can be achieved in almost any feed-forward model by augmenting it with few standard layers and a new Gradient Reversal Layer. The resulting augmented architecture can be trained using standard backpropagation, and can thus be implemented with little effort using any of the deep learning packages. We demonstrate the success of our approach for image classification, where state-of-the-art domain adaptation performance on standard benchmarks is achieved. We also validate the approach for descriptor learning task in the context of person re-identification application.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    As mentioned in [31], the same analysis holds for multi-class setting. However, to obtain the same results when \(|Y|>2\), one should assume that \({\mathcal {H}}\) is a symmetrical hypothesis class. That is, for all \(h\in {\mathcal {H}}\) and any permutation of labels \(c:Y\rightarrow Y\), we have \(c(h)\in {\mathcal {H}}\). Note that this is the case for most commonly used neural network architectures.

  2. 2.

    For brevity of notation, we will sometimes drop the dependence of \(G_f\) on its parameters \(({\mathbf W},{\mathbf b})\) and shorten \(G_f(\mathbf{x }; {\mathbf W}, {\mathbf b})\) to \(G_f(\mathbf{x })\).

  3. 3.

    To create the source sample S, we generate a lower moon and an upper moon labeled 0 and 1 respectively, each of which containing 150 examples. The target sample T is obtained by (1) generating a sample \(S'\) the same way S has been generated; (2) rotating each example by \(35^\circ \); and (3) removing all the labels. Thus, T contains 300 unlabeled examples.

  4. 4.

    A 2-layer domain classifier (\(x{\rightarrow }1024{\rightarrow }1024{\rightarrow }2\)) is attached to the 256-dimensional bottleneck of fc7.

  5. 5.

    Equivalently, one can use the same \(\lambda _p\) for both feature extractor and domain classification components, but use a learning rate of \(\mu /\lambda _p\) for the latter.

Acknowledgements

This work has been supported by National Science and Engineering Research Council (NSERC) Discovery grants 262067 and 0122405 as well, as the Russian Ministry of Science and Education grant RFMEFI57914X0071. We also thank the Graphics & Media Lab, Faculty of Computational Mathematics and Cybernetics, Lomonosov Moscow State University for providing the synthetic road signs data set. Most of the work of this paper was carried out while P. Germain was affiliated with Département d’informatique et de génie logiciel, Université Laval, Québec, Canada.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yaroslav Ganin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this chapter

Cite this chapter

Ganin, Y. et al. (2017). Domain-Adversarial Training of Neural Networks. In: Csurka, G. (eds) Domain Adaptation in Computer Vision Applications. Advances in Computer Vision and Pattern Recognition. Springer, Cham. https://doi.org/10.1007/978-3-319-58347-1_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-58347-1_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-58346-4

  • Online ISBN: 978-3-319-58347-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics