Unsupervised Domain Adaptation (UDA) (1)

1. Definition

1. Unsupervised domain adaptation Unsupervised domain adaptation

Classical machine learning assumes that the training and test sets come from the same distribution.

However, this assumption may not always hold true in real-world applications, e.g., where data sources vary.

In this case, there will be differences between the domain distributions, and directly applying the trained model to a new dataset may lead to performance degradation.

This post mainly discusses unsupervised domain adaptation (labeled source domain, unlabeled target domain). 

2. Domain composition

A domain consists of a feature space and marginal probability distributions (i.e., the features of the data and the distribution of those features in the dataset). According to this definition, changes in the domain may be caused by changes in the feature space or changes in the marginal probability distributions. When text mining is used to classify documents, the change in feature space may be due to a change in language (e.g., English to Spanish), while the change in the marginal probability distribution may be due to a change in the topic of the document (e.g., computer science to English literature ).

Homogeneous domain adaptation Homogeneous feature space is the same

heterogeneous domain adaptation uneven feature space is different

2. Related issues

Introduce related issues to better define the research scope of domain adaptation.

Multi- domain learning : How to train data from multiple related channels together so that they can promote each other instead of interfering with each other. Generally, this is done when the amount of data is not very large.

Domain generalization : training a model on multiple source domains with labeled data and then testing it on additional target domains not seen during training . This is in contrast to domain adaptation, where target examples (possibly unlabeled) are available during training .

A transfer learning problem may be transferring knowledge from a source domain to a different target domain , or transferring knowledge from a source task to a different target task (or a combination of both). A domain consists of a feature space and marginal probability distributions (i.e., the features of the data and the distribution of those features in the dataset). The task consists of a label space and an objective prediction function (i.e., the set of labels and the prediction function learned from the training data). Domain adaptation is a special class of transfer learning.

3. Background

1、Generative adversarial networks(GANs)

1) Theoretical basis

By pitting two well-matched neural networks against each other, playing the roles of data discriminator and data generator , the duo can refine the capabilities of each player (data discriminator, data generator) to perform functions such as synthetic data generation.

The input to the generator is a noise vector containing random values ​​drawn from some distribution such as normal or uniform.

The goal of the generator network is to output a vector that is indistinguishable from the real training data.

The input to the discriminator is either real samples from the training data or fake samples from the generator as input.

The goal of the discriminator is to determine the probability that an input sample is real.

During training, the two networks play a minimax game in which the generator tries to fool the discriminator, and the discriminator tries not to be fooled. The optimization objective is as follows, where D(G(z)) is the probability that the generated data G(z) is true:

 The ultimate goal, we hope that the discriminator can identify the authenticity, that is, the above formula is maximized; ideally, the real judgment is true,

D(x) is 1; false is judged as false, and logD(G(z)) is 0; log is a monotonically increasing function, and the above formula obtains the maximum value;

The goal of the generator is to confuse the result and minimize the above formula; ideally, the true judgment is false, and D(x) is 0; the false judgment is true, and logD(G(z)) is 1; log It is a monotonically increasing function, and the above formula obtains the minimum value;

Through such a max-min confrontation, samples enough to confuse the generator are generated and a good classification effect is achieved.

2) Facing problems

Based on the idea of ​​confrontation, problems such as difficulty in convergence, mode collapse (the generator only learns to generate real samples of a few specific modes of the data distribution) and gradient disappearance may occur during the training process .

3) Evaluation indicators

Generator Evaluation Metrics : Parzen Window Estimation, Memory Detection, Methods for Determining Diversity, Measuring Reality, Approximate Log-Likelihood. 

Evaluation indicators for tasks : segmentation task AUC, classification task Accuracy, etc.

More often, task-specific evaluation indicators are used.

4. Method

Combining domain adaptation and neural networks, several research directions have emerged:

4.1, Domain-Invariant Feature Learning domain invariant feature learning

Such methods assume that such feature representations exist and that the marginal label distributions do not differ significantly.

Align the source and target domains by creating a domain-invariant feature representation, usually in the form of a feature extractor neural network.

A general network setup for a domain-adaptive approach to learning domain-invariant features is shown in the figure below. (a) Methods differ in how the domains are aligned (alignment components) during training and whether the feature extractors used on each domain share no, some or all weights between domains. (b) Feed the target data into a domain-invariant feature extractor and then into a task classifier.

 The various feature alignments are discussed below.

4.1.1 Divergence. 

4.1.2 Reconstruction.

4.1.3 Adversarial.

Introduced here are feature-level adversarial domain adaptation methods . The different methods are mainly due to the different composition of the alignment components. In most cases, the alignment component consists of a domain classifier , although it is also possible a network or GAN that learns to approximate the Wasserstein distance.

The main role of a domain classifier is to judge whether the output features are from the source domain or the target domain.

Contrast that with the discriminator in GANs, which tries to accurately predict whether a sample comes from the real data distribution or from the generator. In other words, the discriminator distinguishes between two distributions, one real and one fake.

The goal of a domain classifier is to correctly classify the domain (source or target). In this case, the feature extractor is trained such that the domain classifier cannot classify which domain the feature representation comes from.

Typically, these networks are trained adversarially by alternating between these two steps. Maximally confuses the domain classifier by training the feature extractor such that the gradient of the domain classifier with the gradient inversion layer is negative when performing backpropagation to update the feature extractor weights, thereby making the domain classifier underperform ( when it outputs a uniform distribution on binary labels), or invert labels.

Since data distributions are often multimodal, results can be improved by conditioning domain classifiers on a multilinear map of feature representations and task classifier predictions, which takes into account the multimodal nature of the distribution .

5. References

1、Wilson G, Cook D J. A survey of unsupervised deep domain adaptation[J]. ACM Transactions on Intelligent Systems and Technology (TIST), 2020, 11(5): 1-46.

2、Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. 2018. Learning from synthetic data: Addressing domain shift for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

3、

[Migration Learning] Analysis of Domain Adaptation series of papers (continuously updated) bzdww

[Migration Learning] Analysis of Domain Adaptation Series Papers (2) bzdww

Guess you like

Origin blog.csdn.net/u014655960/article/details/130554309