Variational Domain Adaptation

This paper proposes variational domain adaptation , a unified , scalable , simple framework for learning multiple distributions through variational inference . Unlike the existing methods on domain transfer through deep generative models , such as StarGAN ( Choi et al. , 2017 ) and UFDN ( Liu et al. , 2018 ) , the variational domain adaptation has three advantages . Firstly , the samples from the target are not required . Instead , the framework requires one known source as a prior p ( x ) and binary discriminators , p ( Di|x ) , discriminating the target domain Di from others . Consequently , the framework regards a target as a posterior that can be explicitly formulated through the Bayesian inference , p ( x|Di ) ∝ p ( Di|x ) p ( x ) , as exhibited by a further proposed model of dual variational autoencoder ( DualVAE ) . Secondly , the framework is scablable to large-scale domains . As well as VAE encodes a sample x as a mode on a latent space : µ ( x ) ∈ Z , DualVAE encodes a domain Di as a mode on the dual latent space µ∗ ( Di ) ∈ Z∗ , named domain embedding . It reformulates the posterior with a natural paring 〈 , 〉 : Z × Z∗ → R , which can be expanded to uncountable infinite domains such as continuous domains as well as interpolation . Thirdly , DualVAE fastly converges without sophisticated automatic/manual hyperparameter search in comparison to GANs as it requires only one additional parameter to VAE . Through the numerical experiment , we demonstrate the three benefits with multi-domain image generation task on CelebA with up to 60 domains , and exhibits that DualVAE records the state-of-the-art performance outperforming StarGAN and UFDN . 1 INTRODUCTION . “ ... we hold that all the loveliness of this world comes by communion in Ideal-Form . All shapelessness whose kind admits of pattern and form , as long as it remains outside of Reason and Idea , is ugly from that very isolation from the Divine-Thought. ” — Plato ( 427 – 347 bc ) Agents that interact in various environments have to handle multiple observation distributions . Domain adaptation ( Bengio , 2012 ) is a methodology employed to exploit deep generative models , such as adversarial learning ( Goodfellow et al. , 2014 ) and variational inference ( Kingma & Welling , 2013 ) , that can handle distributions that vary with environments and other agents . Further , multi-task learning and domain transfer are examples of how domain adaptation methodology is used . We focus on domain transfer involving transfers across a distribution between domains . For instance , pix2pix ( Isola et al. , 2017 ) outputs a sample from the target domain that corresponds to the input sample from the source domain . This can be achieved by learning the pair relation of samples from the source and target domains . CycleGAN ( Zhu et al. , 2017a ) transfers the samples between two domains using samples obtained from both domains . Similarly , UNIT ( Liu et al. , 2017 ) , DiscoGAN ( Kim et al. , 2017 ) , and DTN ( Taigman et al. , 2016 ) have been proposed in previous studies . However , the aforementioned method requires samples that are obtained from the target domains , and because of this requirement , it can not be applied to domains for which direct sampling is expensive or often impossible . For example , the desired , continuous , high-dimensional action in the environment , intrinsic reward ( e.g. , preference and curiosity ) and the policy of interacting agents other than itself can not be sampled from inside , and they can only discriminate the proposed input . Even for ourselves , the concept of beauty or interest in our conscious is subjective , complex , and difficult to be sampled from the inside , although it is easy to discriminate on the outside . In this study , we propose variational domain adaptation , which is a framework for targets that pose challenges with respect to direct sampling . One solution is multi-domain semi-supervision , which converts the problem to semi-supervised learning , thereby making is possible to perform variational inference . In this supervision , a source domain is regarded as a prior p ( x ) and a target domain is considered to be a posterior p ( x|Di ) by referring to the label given by a supervised discriminator p ( Di|x ) that distinguishes the target domain from others . Our model imitates the behavior of the discriminator and models the target domain using a simple conclusion of the Bayesian theorem , pθ ( x|Di ) ∝ pθ ( Di|x ) pθ ( x ) . The end-to-end learning framework also makes it possible to learn good prior pθ ( x ) with respect to all the domains . After the training was completed , the posterior pθ ( x|Di ) succeeded in deceiving the discriminator p ( Di|x ) . This concept is similar to rejection sampling in the Monte Carlo methods . Further , variational domain adaptation is the first important contribution from this study . The second contribution from this study is a model of dual variational autoencoder ( DualVAE ) , which is a simple extension of the conditional VAE ( Kingma et al. , 2014 ) , employed to demonstrate our concept of multi-domain semi-supervision . DualVAE learns multiple domains in one network by maximizing the variational lower bound of the total negative KL-divergence between the target domain and the model . DualVAE uses VAE to model the prior p ( x ) and an abstract representation for the discriminator p ( Di|x ) . The major feature of DualVAE is domain embedding that states that all the posteriors are modeled as a normal distributionN ( z|µi , σ2 ) in the same latent space Z using the conjecture distribution of the prior . Here , µi is the domain embedding that represents the domainDi . This enables us to sample from pθ ( x|Di ) . Our major finding was that the discriminator of DualVAE was a simple inner product between the two means of domain embedding and the VAE output : log pθ ( Di|x ) pθ ( Di ) = log ∫ N ( z|µi , σ2 ) N ( z|µφ ( x ) , σ2 ) N ( z|0 , I ) dz = µTi µφ ( x ) σ2 , that acts as a natural paring between the sample and the domain . The probabilistic end-to-end model learns multiple domains in a single network , making it possible to determine the effect of transfer learning and to learn data that multi-domains can not observe from sparse feedback . Domain embedding is a powerful tool and allows us to use VAEs instead of GANs . The third contribution of this study is that DualVAE was validated for use in a recommendation task using celebA ( Liu et al. , 2015 ) . In the experiment , using celebA and face imaging data obtained based on evaluations by 60 users , an image was generated based on the prediction of user evaluation and an ideal image that was determined to be good by multiple users . We demonstrated that the image could be modified to improve the evaluation by interpolating the image , and the image was evaluated using the domain inception score ( DIS ) , which is the score of the model that has learned the preference of each user . We present the beauty inside each evaluator by simply sampling pθ ( x|Di ) . The DIS of DualVAE is higher than that of a single domain , and the dataset and code are available online . 2 RELATED WORK . The existing literature related to the domain transfer is based on the assumption that the samples are obtained from the target domain . For example , pix2pix ( Isola et al. , 2017 ) can output the samples from the target domain that corresponds to the input samples from the source domain by learning the pair relation between the samples of the source and target domains . CycleGAN ( Zhu et al. , 2017a ) , which differs from pix2pix , does not require sample pairs from both domains . Similarly , UNIT ( Liu et al. , 2017 ) , DiscoGAN ( Kim et al. , 2017 ) , and DTN ( Taigman et al. , 2016 ) also do not require sample pairs . Furthermore , because there are few cases in which samples from the source and target domains form a one-to-one pair in real world research after being extended to the conversion of one-to-many relationships , including BicycleGAN ( Zhu et al. , 2017b ) and MUNIT ( Huang et al. , 2018 ) . Several studies were conducted to model multiple distributions in a semi-supervised manner . StarGAN ( Choi et al. , 2017 ) , UFDN ( Liu et al. , 2018 ) , and RegCGAN ( Mao & Li , 2018 ) are extensions of the aforementioned models and are frameworks that can convert the source domain samples into samples for various target domains with a single-network structure . However , the problem with these methods is associated with hyperparameter tuning , which arises from the characteristics of adversarial learning . DualVAE is a simple extension of a conditional VAE in a multi-domain situation . Conditional VAEs utilizes VAE for semi-supervised learning . Although the model is quite simple , it is powerful and scalable making it possible to learn multiple distributions with domain embedding . In fact , we demonstrated that DualVAE quickly converged for more than 30 domains without sophisticated hyperparameter tuning . In the experiment conducted in this study , Eω [ J ( θ|ω ) ] was evaluated instead of J ( θ|ω̂ ) to demonstrate that our method required less hyperparameter tuning . 3 METHOD . 3.1 PROBLEM DEFINITION . With regard to n domains D1 , . . . , Dn , and a sample x on an observation space X , the objective of unsupervised domain adaptation is to minimize the KL-divergence between the target distribution and the model , DKL ( p ( i ) ( x ) ‖p ( i ) ( x , θ ) ) , over all the domains Di . From the perspective of optimizing θ , minimizing the KL divergence is equivalent to maximizing the cross-entropy . As p ( i ) ( x , θ ) = p ( i ) ( x|θ ) p ( θ ) , the unsupervised domain adaptation can be formulated as a maximizing problem for the weighted average of cross-entropy over the domains : Maximizeθ : J ( θ ) = 1 n n∑ i=1 γi Ex∼p ( i ) [ log p ( i ) θ ( x ) ] + γ log p ( θ ) , ( 1 ) where p ( i ) θ ( x ) = p ( i ) ( x|θ ) , γi ∈ [ 0 , 1 ] is the importance of each domain Di and γ = ∑n i=1 γi/n . If γi = 1 for all the i ’ s , the objective function is simply the mean , and if γi = 0 for certain i ’ s , the domain Di is ignored . The difficulty arises from the fact that it is not possible to directly sample x from p ( i ) x can be directly sampled from the likelihood p ( Di|x ) . This challenge was the motivation for considering multi-domain semi-supervision . 3.2 MULTI-DOMAIN SEMI-SUPERVISION . Multi-domain semi-supervision assumes a prior p ( x ) and models each the domain as a posterior p ( i ) = p ( x|Di ) . As the Bayesian inference , we reformulate the cross-entropy Ex∼p ( i ) [ log pθ ( x|Di ) ] in Eq . ( 1 ) as follows : Ex∼p ( i ) [ log pθ ( x|Di ) ] = ∫ p ( x|Di ) log pθ ( x|Di ) dx = ∫ p ( Di|x ) p ( x ) p ( Di ) log pθ ( Di|x ) pθ ( x ) pθ ( Di ) dx = Ex∼p [ p ( Di|x ) p ( Di ) log pθ ( Di|x ) pθ ( Di ) ] + Ex∼p [ p ( Di|x ) p ( Di ) log pθ ( x ) ] = Ex∼p [ f ( Di|x ) log fθ ( Di|x ) ] + Ex∼p [ f ( Di|x ) log pθ ( x ) ] , ( 2 ) where f ( Di|x ) = p ( Di|x ) /p ( Di ) and fθ ( Di|x ) = pθ ( Di|x ) /pθ ( Di ) . By letting γi = p ( Di ) , the objective is identical to : J ( θ ) = Ex∼p , i∼ [ n ] [ p ( Di|x ) log fθ ( Di|x ) ] ︸ ︷︷ ︸ discriminator +Ex∼p [ log pθ ( x ) ] ︸ ︷︷ ︸ prior + γ log p ( θ ) ︸ ︷︷ ︸ regularizer , ( 3 ) where [ n ] is a uniform distribution over { 1 , . . . , n } and f ( D̄|x ) = Ei∼ [ n ] [ f ( Di|x ) ] . The first term is the likelihood from the discriminator ; the second term is the prior learned by a generative model , including VAE ; and the last term is the regularizer . Because the equation is intractable , we use Monte Carlo sampling to estimate the function . During the estimation , we initially sample x1 , . . . , xm from the prior p ( x ) and subsequently obtain the binary labels yij ∈ { 0 , 1 } from each discriminator yij ∼ p ( Di|xj ) . Since the number of labels from supervises is nm , the situation that the sparse labels : k < < nm is considered . Further , some discriminators only provide parts of the labels . In the situation , the missing values are 0-padded : yij = 0 . J ( θ ) ≈ 1 n n∑ i=1 m∑ j=1 yij log fθ ( yij |xj ) + 1 m m∑ j=1 log pθ ( xj ) + ȳ log p ( θ ) , ( 4 ) where ≈ indicates Monte Carlo estimation and ȳ = ∑n i=1 ∑m j=1 yij/k . In the limit of n → ∞ , the right side of the equation is identical to the left side .

Summary: In this paper, the authors propose a variational domain adaptation framework for learning multiple distributions through variational inference. The proposed framework assumes a prior, and models each domain as a posterior. A multi-domain variational auto-encoder is then proposed to implement the concept of multi-domain semi-supervision. Experimental studies are done to show the effectiveness of the proposed framework.