Source-linked AI summary
Domain-Adversarial Neural Networks
Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand
TL;DR
Domain adaptation seeks low target-domain error from labeled source data and unlabeled target data whose distributions differ. DANN trains a neural network representation to preserve classification information while suppressing domain discriminability, and experiments report better sentiment-classification performance than standard baselines, including with mSDA features.
Problem
Domain adaptation seeks a classifier with low target risk when labeled source data and unlabeled target data come from different but related distributions.
Method
DANN uses an adversarial neural-network objective that makes the hidden representation predictive of source labels but uninformative about domain membership.
Results
DANN outperforms a regular neural network and an SVM on sentiment analysis and reaches state-of-the-art performance when combined with mSDA.
Takeaways & Limitations
Explicitly minimizing domain discriminability complements robustness-based mSDA representation learning for cross-domain transfer.
Takeaways & Limitations
The target-domain data available during training has no labels.
Abstract
from arXiv · showhide
We introduce a new representation learning algorithm suited to the context of domain adaptation, in which data at training and test time come from similar but different distributions. Our algorithm is directly inspired by theory on domain adaptation suggesting that, for effective domain transfer to be achieved, predictions must be made based on a data representation that cannot discriminate between the training (source) and test (target) domains. We propose a training objective that implements this idea in the context of a neural network, whose hidden layer is trained to be predictive of the classification task, but uninformative as to the domain of the input. Our experiments on a sentiment analysis classification benchmark, where the target domain data available at training time is unlabeled, show that our neural network for domain adaption algorithm has better performance than either a standard neural network or an SVM, even if trained on input features extracted with the state-of-the-art marginalized stacked denoising autoencoders of Chen et al. (2012).
1. Introduction
Domain adaptation addresses transfer between similar but different distributions using unlabeled target data. DANN explicitly makes neural-network representations predictive for classification while uninformative about domain, outperforming standard baselines on sentiment analysis.
- Motivation: Domain adaptation transfers knowledge from labeled source data to a related target problem using unlabeled target examples.The motivating example transfers sentiment classification from labeled movie reviews to unlabeled book reviews.
- Related approach: mSDA learns representations robust to input corruption that are also more stable across domain changes.It had demonstrated state-of-the-art performance for this problem before DANN.
- Proposed approach: DANN explicitly controls cross-domain representation stability by making the hidden layer predictive of labels but unable to identify input domain.Its objective adds adversarial domain-membership prediction to neural-network training.
- Results: DANN achieves better performance than a regular neural network and an SVM on a sentiment-analysis classification benchmark.It also reaches state-of-the-art performance when using mSDA representations as input.
2. Domain Adaptation
Domain adaptation learns a classifier from labeled source data and unlabeled target data, seeking low target risk despite distribution differences. Theory motivates minimizing source error while making source and target representations indistinguishable.
- Problem setting: The setting provides labeled source samples from D_S and unlabeled target samples from the target input marginal, with the goal of low target risk.The task is framed for binary classification over X and Y = {0, 1}.
- Theory: Domain-adaptation bounds combine source risk with a distribution-distance term, here the H-divergence between source and target inputs.The bound also includes a complexity term and a joint-error term.
- Theory: H-divergence measures how well a hypothesis class can distinguish examples generated by the two domains.Its empirical estimate is difficult to compute exactly in some hypothesis classes.
- Proxy A-distance: Proxy A-distance approximates empirical H-divergence by training a classifier to discriminate source examples labeled 1 from target examples labeled 0.The experiments use a linear SVM and evaluate its error on a held-out subset.
- Implication: A representation that makes source and target examples indistinguishable can support low target risk when source risk is low.DANN directly exploits this representation-learning strategy.
3. A Domain-Adversarial Neural Network
DANN embeds domain adaptation theory in a neural network by preserving source classification while suppressing domain information in its hidden representation. An adversarial domain regressor and gradient-based optimization implement this trade-off.
- Architecture: DANN learns a hidden representation that preserves source-label predictiveness while removing discriminative information about whether inputs come from source or target.This explicitly implements the theoretical strategy of controlling domain divergence through representation learning.
- Source risk minimization: The hidden layer h(·) serves as the network’s internal representation, while the output f(·) assigns class probabilities and is trained with source classification loss.The standard neural-network objective uses the negative log-probability of the correct source label.
- Domain adaptation regularizer: A logistic domain regressor o(·) predicts whether a hidden representation came from the source or target domain.It operates on representations h(x) from labeled source and unlabeled target samples.
- Domain adaptation regularizer: The objective trades off source-risk minimization against empirical domain divergence using λ > 0.λ tunes the balance between the two terms during learning.
- Architecture: The hidden layer, classifier, and domain regressor compete adversarially: classification remains accurate while domain prediction becomes ineffective.This interaction is depicted in the DANN architecture.
- Optimization: DANN is optimized with stochastic gradient descent, reversing the update direction for adversarial domain-regressor parameters.The experiments use early stopping based on a validation split of the labeled source sample.
4. Related Work
Prior domain-adaptation work largely learned linear representations, while later work also studied nonlinear neural representations. DANN differs by directly optimizing the H-divergence-inspired criterion in a neural network.
- Representation learning: Much domain-adaptation research focused on linear hypotheses, although nonlinear representations including neural networks were increasingly studied.mSDA is identified as a nonlinear representation-learning approach with state-of-the-art performance.
- Theoretical distinction: DANN is distinguished by directly optimizing the H-divergence motivated by Ben-David et al.’s domain-adaptation theory.Related HMM work was also theory-inspired but addressed word tagging rather than sentiment classification.
- Adjacent work: Fair-representation methods also seek auxiliary-label indiscrimination, but their algorithms are different and not directly derived from H-divergence.The auxiliary label concerns membership in identified groups.
- Adversarial learning: Earlier minimax approaches learned classifiers robust to input-distribution changes while assuming a suitable feature representation was already available.They did not address learning that representation.
5. Experiments
Experiments show that DANN learns representations that support target-domain classification while reducing domain discriminability. On toy and Amazon reviews tasks, DANN outperforms standard neural networks and SVMs, including when combined with mSDA representations.
- Toy Problem: DANN perfectly classifies both source and target examples in the rotated inter-twinning moons problem, whereas NN is not fully adapted to the target sample.Both algorithms use the same 15-neuron hidden-layer architecture, but NN disables adversarial back-propagation into the hidden layer.
- Toy Problem: DANN spreads target points among source points in PCA space, while NN produces visible target-only clusters, making target labeling easier for DANN.The DANN representation also separates difficult boundary points into the appropriate source-class clusters.
- Toy Problem: DANN’s domain regressor fails to discriminate source from target distributions, while NN’s regressor remains an imperfect but better discriminator.This behavior corroborates that DANN’s hidden representation contains less domain-discriminative information.
- Toy Problem: DANN suppresses hidden-layer neurons that capture the target rotation angle, unlike NN neurons that encode both label boundaries and domain geometry.The adaptation regularizer removes two predominant parallel-line patterns observed among NN neurons.
- Sentiment Analysis Dataset: 0.90 and 0.97 are the probabilities that DANN significantly outperforms NN and SVM, respectively, on the original Amazon reviews representations.With mSDA representations, the corresponding probabilities are 0.82 and 0.88; DANN also lowers PAD relative to raw data and NN.
6. Conclusion and Future Work
DANN learns representations that preserve source-label predictiveness while suppressing domain information, and its combination with mSDA achieves state-of-the-art performance. The authors identify DANN and mSDA as complementary representation-learning approaches and propose several extensions.
- DANN learns hidden representations predictive of source labels but uninformative about whether inputs come from the source or target domain.
- Combining DANN with mSDA achieved state-of-the-art performance in experiments on the inter-twinning moons problem and Amazon reviews sentiment analysis.
- DANN and mSDA are characterized as two complementary representation learning approaches.
- Future work includes deeper networks, multi-source adaptation, tasks beyond binary classification, and integrating DANN with denoising autoencoders.