Title: EMERGING DISENTANGLEMENT IN AUTO-ENCODER BASED UNSUPERVISED IMAGE CONTENT TRANSFER

Abstract: We study the problem of learning to map, in an unsupervised way, between domains A and B, such that the samples b ∈ B contain all the information that exists in samples a ∈ A and some additional information. For example, ignoring occlusions, B can be people with glasses, A people without, and the glasses, would be the added information. When mapping a sample a from the first domain to the other domain, the missing information is replicated from an independent reference sample b ∈ B. Thus, in the above example, we can create, for every person without glasses a version with the glasses observed in any face image. Our solution employs a single two-pathway encoder and a single decoder for both domains. The common part of the two domains and the separate part are encoded as two vectors, and the separate part is fixed at zero for domain A. The loss terms are minimal and involve reconstruction losses for the two domains and a domain confusion term. Our analysis shows that under mild assumptions, this architecture, which is much simpler than the literature guided-translation methods, is enough to ensure disentanglement between the two domains. We present convincing results in a few visual domains, such as no-glasses to glasses, adding facial hair based on a reference image, etc.

1. INTRODUCTION:

In the problem of unsupervised domain translation, the algorithm receives two sets of samples, one from each domain, and learns a function that maps between a sample in one domain to the analogous sample in the other domain (Zhu et al., 2017a; Kim et al., 2017; Yi et al., 2017; Benaim & Wolf, 2017; Liu & Tuzel, 2016; Liu et al., 2017; Choi et al., 2017; Conneau et al., 2017; Zhang et al., 2017a; b; Lample et al., 2018) . The term unsupervised means, in this context, that the two sets are unpaired.

In this paper, we consider the problem of domain B, which contains a type of content that is not present at A. As a running example, we consider the problem of mapping between a face without eyewear (domain A) to a face with glasses (domain B). While most methods would map to a person with any glasses, our solution is guided and we attach to an image a ∈ A, the glasses that are present in a reference image b ∈ B.

In comparison to other guided image to image translation methods, our method is considerably simpler. It relies on having a latent space with two parts: (i) a shared part that is common to both A and B, and (ii) a specific part that encodes the added content in B. By setting the second part to be the zero vector for all samples in A, a disentanglement emerges. Our analysis shows that this Table 1 : A comparison to other unsupervised guided image to image translation methods. † k = 5 is the number of pre-segmented face parts. ‡ Used for domain confusion, not on the output. MUNIT (Huang, 2018) EG-UNIT (Ma, 2018) DRIT (Lee, 2018) PairedCy-cleGAN (Chang' leads to the ability to train with a simple, straightforward domain confusion term, while enjoying the generalization guarantees that would otherwise require a more elaborate loss.

1.1. PREVIOUS WORK:

In image to image translation, the transformations are often captured by multi-layered networks of an encoder-decoder architecture. The existing solutions often assume a one to one mapping between the domains, i.e., that there exists a function y such that given a sample a in domain A, maps it to an analog sample in domain B. In fact, the circularity based constraints by Zhu et al. (2017a) ; Kim et al. (2017) ; Yi et al. (2017) are based on this assumption, since going from one domain to the other and back, it is assumed that the original sample is obtained, which requires no loss of information. However, to employ an example made popular by Zhu et al. (2017a) , when going from a zebra to a horse, the stripes are lost, which results in an ambiguity when mapping in the other direction.

This shortcoming was identified by the literature, and a few contributions present many to many mappings. These include the augmented CycleGAN Almahairi et al. (2018) , which adds a random vector to each domain. A completely different approach is taken by the NAM method (Hoshen & Wolf, 2018) , in which multiple solutions are obtained by considering multiple random initializations.

In our work, multiplicity of outcomes arises from using a reference (guide) image.

A powerful way to capture relations between the two domains, is by employing separate autoencoders for the two domains, but which share many of the weights (Liu & Tuzel, 2016; Liu et al., 2017) . This leads to a shared representation: while the low-level image properties, such as texture and color, are domain-specific and encoded/decoded separately, the mid-and top-level properties are common to both domains and are processed by identical replicas of the same layers. In our work, we rely on a shared encoder for both domains in order to enforce a shared representation.

Our method performs one-sided mapping, from A to B, and does not learn the mapping in the other direction. Benaim & Wolf (2017) perform one-sided mapping using a distance based constraint, which we do not employ. That method is symmetric in the two domains and in many experiments, the distance constraint is used in tandem with the cycle constraint. In our case, the two domains are asymmetric and one domain contains an added content. Our method is inherently asymmetric, reflecting the asymmetry between the source image and the guide image, which contains the additional content. The work by Taigman et al. (2017) ; Hoshen & Wolf (2018) map in an asymmetric way, but rely on the existence of a perceptual distance, which we do not employ.

Guided Translation:

The most relevant work contains very recent and concurrent methods in which the mapping between the domains employs two inputs: a source image a and a reference (guide or attribute) image b. Tab. 1 compares these methods to ours along two axes: (i) where sharing occurs in the architecture, and (ii) the number of trained sub-networks of each type. The sharing can be of layers between different encoders and decoders, following, e.g., Liu & Tuzel (2016) ; sharing of a common part of a latent space; and using the same encoder or decoder for multiple domains. The networks are of four types: encoders, which map images to a latent space, generators (also known as decoders), which generate images from a latent representation, discriminators that are used as part of an adversarial loss, and other, less-standard, networks.

It is apparent that our method is considerably simpler than the literature methods. The main reason is that our method is based on the emergence of disentanglement, as detailed in Sec. 4. This allows us to to train with many less parameters and without the need to apply excessive tuning, in order to balance or calibrate the various components of the compound loss.

The MUNIT architecture by Huang et al. (2018) , like our architecture, employs a shared latent space, in addition to a domain specific latent space. Their architecture is not limited to two domains1 and unlike ours, employs separate encoders and decoders for the various domains. The type of guiding that is obtained from the target domain in MUNIT is referred to as style, while in our case, the guidance provides content. Therefore, MUNIT, as can be seen in our experiments, cannot add specific glasses, when shifting from the no-glasses domain to the faces with eyewear domain.

The EG-UNIT architecture by Ma et al. (2018) presents a few novelties, including an adaptive method of masking-out a varying set of the features in the shared latent space. In our latent representation of domain A, some of the features are constantly zero, which is much simpler. This method also focuses on guiding for style and not for content, as is apparent form their experiments.

The very recent DRIT work by Lee et al. (2018) learns to map between two domains using a disentangled representation. Unlike our work, this work seems to focus on style rather than content. The proposed solution differs from us in many ways: (1) it relies on two-way mapping, while we only map from A to B.

(2) it relies on shared weights in order to ensure that the common representation is shared. (3) it adds a VAE-like (Kingma & Welling, 2014) statistical characterization of the latent space, which results in the ability to sample random attributes. As can be seen in Tab. 1, the solution of Lee et al. (2018) is considerably more involved than our solution.

DRIT (and also MUNIT) employ two different types of encoders that enforce a separation of the latent space representations to either style or content vectors. For example, the style encoder, unlike the content encoder, employs spatial pooling and it also results in a smaller representation than the content one. This is important, in the context of these methods, in order to ensure that the two representations encode different aspects of the image. If DRIT or MUNIT were to use the same type of encoder twice, then one encoder could capture all the information, and the image-based guiding (mixing representations from two images) would become mute. In contrast, our method (i) does not separate style and content, and (ii) has a representation that is geared toward capturing the additional content.

The work most similar to us in its goal, but not in method, is the PairedCycleGAN work by Chang et al. (2018) . This work explores the single application of applying the makeup of a reference face to a source face image. Unfortunately, the method was only demonstrated on a proprietary unshared dataset and the code is also not publicly available, making a direct comparison impossible at this time. The method itself is completely different from ours and does not employ disentanglement. Instead, a generator with two image inputs is used to produce an output image, where the makeup is transfered between the input images, and a second generator is trained to remove makeup. The generation is done separately to k = 5 pre-segmented facial regions, and the generators do not employ an encoder-decoder architecture.

Lastly, there are guided methods, which are trained in the supervised domain, i.e., when there are matches between domain A and B. Unlike the earlier one-to-one work, such as pix2pix Isola et al. (2017b) , these methods produce multiple outputs based on a reference image in the target domain.

Examples include the Bicycle GAN by Zhu et al. (2017b) , who also applied, as baseline in their experiments, the methods of Bao et al. (2017); Gonzalez-Garcia et al. (2018) .

Other Disentanglement Work InfoGAN (Chen et al., 2016) 

2. PROBLEM SETUP:

We consider a setting with two domains A = (X A , D A ) and B = (X B , D B ). Here, X A , X B ⊂ R M and D A , D B are distributions over them (resp.). The algorithm is provided with two independent datasets S A = {a i } m1 i=1 and S B = {b j } m2 j=1 of samples from the two domains that were sampled in the following manner: Note that within Eq. 2, there is an assumption on the underlying distributions D A and D B . Using the concrete example, our framework assumes that the distribution of images of persons with sunglasses and the distribution of images of persons without them is the same, except for the sunglasses. Otherwise, the distribution of the samples generated by y when resampling a would not be the same as D B . Note that we do not enforce this assumption on the data, and only employ it for our theoretical results, to avoid additional terms.

EQUATION

For two functions f 1 , f 2 : X → R and a distribution D over X, we define the generalization risk between f 1 and f 2 as follows:

EQUATION

For a loss function : 

EQUATION

: X A × X B → X B .

3. METHOD:

In order to learn the mapping y, we only use an encoder-decoder architecture, in which the encoder receives two input samples and the decoder produces a single output sample that borrows from both input samples. As we discuss in Sec. 2, the goal of the algorithm is to learn a mapping h

= g •f ∈ H such that: g • f (a, b) ≈ y(a, b).

Here, f serves as an encoder and g as a decoder. The encoder f in our framework is a member of a set of encoders F, each decomposable into two parts and takes the following form: where e 1 : R M → R E1 serves as an encoder of shared content and e 2 : R M → R E2 serves as an encoder of specific content.

f (a, b) = (e 1 (a), e 2 (b)) (5) e1(a) ∼ e1 • D A e1(b) ∼ e1 • D B a ∼ D A b ∼ D B 0 e2(b) f (a,

Here, E 1 and E 2 are the dimensions of the encodings. The decoder, g is a member of a set of decoders M. Each member of M is a function g : R E1+E2 → R M . In order to learn the functions f and g, we apply the following min-max optimization:

EQUATION

for some weight parameter λ > 0, of the following training losses (see Fig. 1 ):

EQUATION

where 0 E2 is the vector of zeros of length E 2 , d is a discriminator network, and l(p, q) = -(q log(p) + (1 -q) log(1 -p)) is the binary cross entropy loss for p ∈ [0, 1] and q ∈ {0, 1}.

The discriminator d is a member of a set of discriminators C that locates functions d :

R M → [0, 1].

The discriminator d is trained to minimize L D and Eq. 9 is a domain confusion term (Ganin et al., 2016) encouraging the distribution e 1 • D A to be similar to the distribution e 1 • D B . Here and elsewhere, the composition f • D of a function f and a distribution D denotes the distribution of f (x) for x ∼ D.

4. ANALYSIS:

In this section, we provide a theoretical analysis for the success of the proposed method. For this purpose, we recall a few technical notations (Cover & Thomas, 2006) : the expectation and probability operators symbols E, P, the Shannon entropy (discrete or continuous)

H(X) := -E X [log P[X]], the conditional entropy H(X|Y ) := H(X, Y ) -H(Y ), the (conditional) mutual information (dis- crete or continuous) I(X; Y |Z) := H(X|Z) -H(X|Y, Z), the Kullback-Leibler (KL) divergence D KL (p q) := E x∼p [log(p(x)/q(x))],

and the total correlation T C(z) := D KL (P[z] i P[z i ]), where P[z i ] is the marginal distribution of the i'th component of z. In particular, T C(z) is zero if and only if the components of z are independent, in which case we say that z is disentangled. For two distributions D 1 and D 2 , we define the C-discrepancy between them to be disc

C (D 1 , D 2 ) := sup c1,c2∈C |R D1 [c 1 , c 2 ]-R D2 [c 1 , c 2 ]| = sup c1,c2 |E x∼D1 (c 1 (x), c 2 (x))-E x∼D2 (c 1 (x), c 2 (x))|.

The discrepancy behaves as an adversarial distance measure between two distributions, where d(x) = (c 1 (x), c 2 (x)) is the discriminator that tries to differentiate between D 1 and D 2 , for c 1 , c 2 ∈ C. This quantity is being employed in Chazelle (2000) ; Ben-david et al. (2006) ; Mansour et al. (2009) ; Cortes & Mohri (2014) .

4.1. GENERALIZATION BOUND:

Thm. 1 upper bounds the generalization risk, based on terms that can be minimized during training, as well as on approximation terms. It is similar in fashion to the classic domain adaptation bounds proposed by Ben-David et al. (2010) ; Mansour et al. (2009) . Theorem 1. Assume that the loss function is symmetric and obeys the triangle inequality. Then, for any autoencoder h = g • f ∈ H, such that f (x 1 , x 2 ) = (e 1 (x 1 ), e 2 (x 2 )) ∈ F is an encoder and g ∈ M is a decoder, the following holds,

R D A,B [h, y] ≤R D B, B [h, y] + min g * ∈M R D A,B [g * • f, y] + R D B, B [g * • f, y] + disc M (f • D A,B , f • D B, B ) (10) where D B, B is the distribution of (b, b) where b ∼ D B .

(The proofs can be found in the appendix.) Thm. 1 provides an upper bound on the generalization risk R D A,B [h, y], which is the argument that we would like to minimize. The upper bound is decomposed of three terms: a reconstruction error, an approximation error and a discrepancy term. The first term,

EQUATION

is the reconstruction error for samples b ∼ D B . Since we do not have full access to D B , we minimize its empirical version (see Eq. 8).

The second term, (Ben-David et al., 2010; Mansour et al., 2009) , this term is assumed to be small and is decreased as While one can minimize the discrepancy term explicitly, by minimizing it with respect to e 1 and e 2 , using a discriminator, we found empirically that this confusion term, which involves both parts of the embedding, is highly unstable. Instead, we show theoretically and empirically that there is a high likelihood for a disentangled representation (where e 1 (b) and e 2 (b) are independent) to emerge, and the discrepancy term can be replaced with the following discrepancy disc M (e 1 • D A , e 1 • D B ), which measures the closeness between the distributions of e 1 (a) and of e 1 (b) for a ∼ D A and b ∼ D B , as is done in Eq. 9. Here, M is a set of discriminators that are similar in complexity to the ones in M. This discrepancy is simpler than the one in Eq. 10, since it does not involve a comparison of e 2 between two distributions, nor the interaction between e 1 and e 2 .

min g∈M R D A,B [g • f, y] + R D B, B [g • f, y] , measures the minimal error obtained by a best fit- ting g ∈ M, such that g • f ≈ y for inputs (a, b) ∼ D A,B and for inputs (b, b) ∼ D B, B . Similar to

M's capacity is increased. The third term, disc M (f • D A,B , f • D B, B ),

In Lem. 1, we show that if e 1 (b) and e 2 (b) are independent, then, disc(f

• D A,B , f • D B, B ) ≤ disc(e 1 •D A , e 1 •D B ). Therefore, if a disentangled representation occurs, we can minimize disc(f • D A,B , f • D B, B ), by minimizing disc(e 1 • D A , e 1 • D B ) instead. Lemma 1. Let M be the set of neural networks of the form: c(x) = φ(W r . . . φ(W 2 φ(W 1 x + q))), where, W i ∈ R di×di+1 for i ∈ {1, . . . , r -1}, q ∈ R d2 and d 1 = E 1 + E 2 . In addition, φ(x 1 , . . . , x k ) = (φ 1 (x 1 ), . . . , φ 1 (x k )), for k ∈ N, (x 1 , . . . , x k ) ∈ R k and a non-linear activation function φ 1 : R → R. Let M be the same as M with d 1 = E 1 (instead of d 1 = E 1 + E 2 ). Let f (x) = (e 1 (x

), e 2 (x)) be an encoder and assume that:

EQUATION

4.2. EMERGENCE OF DISENTANGLED REPRESENTATIONS:

The following results are very technical and inherit many of the assumptions used by previous work. We therefore state the results informally here and leave the complete exposition to the appendix. Under some assumptions on the weights of the encoder, there is a monotonically decreasing function q(α) for α > 0 such that:

EQUATION

Eq. 13 bounds the total correlation of f (b), which measures the amount of dependence between the components of the encoder on samples in B. The bounds has three terms:

d 1 • q(α), -I(h(b), b)

and O (d 1 /d 2 ). In this formulation, α denotes the amount of regularization in the weights of f . In addition, q(α) is monotonically increasing as α tends to zero. The term I(h(b); b) measures the mutual information between the input b and output h(b) of the autoencoder h. Since the mutual information is subtracted in the right hand side, the larger it is, the smaller T C(f (b)) should be. The last term, O(d 1 /d 2 ) measures the ratio between the dimension of the output of f and the dimension of the previous layer of f . Thus, this quantity is small whenever there is a significance reduction in the dimension in the application of the last layer of f .

Therefore, there is a tradeoff between the amount of regularization in the weights of f and the mutual information I(h(b); b). If there is small regularization, then, the autoencoder is able to produce better reconstruction h(b) ≈ b, and therefore, a larger value of I(h(b); b). On the other hand, small regularization leads to a higher value of q(α).

The bound relies on the mutual information between the inputs and outputs of the autoencoder to be large. The following lemma provides an argument why this is the case when the expected reconstruction error of the autoencoder is small. Lemma 3 (Informal). Let b ∼ D B be a distribution over a discrete set X B and h = g • f an autoencoder. Assume that

EQUATION

The above lemma asserts that if the samples in D B are well separated, whenever the autoencoder has a small expected reconstruction error, E[ h(b) -b 1 ], then, the mutual information I(h(b); b) is at least a large portion of H(b). Therefore, we conclude that if the autoencoder generalizes well, then, it also maximizes the mutual information I(h(b); b). To conclude the analysis: for a small enough reconstruction error, when training the autoencoder, the mutual information between the autoencoder's input and output is high (Lem. 10), which implies that the individual coordinates of the representation layer are almost independent of each other (Lem. 9). When using part of the representation to encode the information that exists in domain A (the shared part), the other part would contain coordinates that are weakly dependent of the features encoded in A. In such a case, we can train with a GAN that involves only the shared representation (Lem. 1). That way, we can upper bound the generalization error expressed in Thm. 1, using relatively simple loss terms, as is done in Sec. 3.

5. EXPERIMENTS:

We evaluate our method on three additive facial attributes: eyewear, facial hair, and smile. Images from the celebA face image dataset by Yang et al. (2015) were used, since these are conveniently annotated as having the attribute or not. The images without the attribute (no glasses, or no facialhair, or no smile) were used as domain A in each of the experiments. Note that three different A domains were used. As the second domain B, we used the images labeled as having glasses, having facial hair, or smiling, according to the experiment.

Our underlying network architecture adapts the architecture used by Lample et al. (2017) , which is based on (Isola et al., 2017a) , where we use Instance Normalization (Ulyanov et al., 2016) instead of Batch Normalization (Ioffe & Szegedy, 2015) , and without dropout. Let C k denote a Convolution-InstanceNorm-ReLU layer with k filters, where a kernel size of 4 × 4, with a stride of 2, and a padding of 1 is used. The activations of the encoders e 1 , e 2 are leaky-ReLUs with a slope of 0.2 and the deocder g employs ReLUs. e 1 has the following layers C 32 , C 64 , C 128 , C 256 , C 512 , C 512-d ; e 2 has a slightly lower capacity C 32 , C 64 , C 128 , C 128 , C 128 , C d , where d = 25. The input images have a size of 128 × 128, and the encoding is of size 512 × 2 × 2 (split between the e 1 and e 2 ). g is symmetric to the encoders and employs transposed convolutions for the upsampling.

In the first set of experiments, we add the relevant content from a random image b ∈ B into an image from a. The results are given in Fig. 2 , and appendix Fig. 7 and 8 . We compare with two guided image translation baselines: MUNIT (Huang et al., 2018) and DRIT (Lee et al., 2018) . We used the published code for each method and despite our best effort, these methods fail on the task of content addition. In almost all cases, the baseline methods apply the style of the guide and not the added content.

It should be noted that the simplicity of our approach directly translates to more efficient training than the two baselines methods. Our method has one weighting hyperparameter, which is fixed throughout the experiments. MUNIT and DRIT each has several weighting hyperparameters (since they use more loss terms) and these require attention and, need to change between the experiments, both in our runs and in the authors' own experiments. In addition, our method has a lower memory footprint and a much shorter duration of each iteration. The statistics are reported in Tab. 2 and as can be seen, the runtime and memory footprint of our method are much closer to the Fader network by Lample et al. (2017) , which cannot perform guided mapping, than to MUNIT and DRIT.

Since the performance of the baselines is clearly inferior in the current setting, we did not hold a user study comparing different algorithms. Instead, we compare the output of our method directly with real images. Two experiments are conducted: (i) can users tell the difference between an image from domain B and an image from domain A that was translated to domain B, and (ii) can users tell The results are reported in Tab. 3. As can be seen, users are able to detect the real image over the generated one, in most of the cases. However, the success ratio varies between the three image translation tasks and between the two types of comparisons. The most successful experiments, i.e., those where the users were confused the most, were in the facial hair ("beard") category. In contrast, when replacing a person's glasses with those of a random person, the users were able to tell the real image 74% of the time.

Fig. 3 and appendix Fig. 9 and 10 show the type of images shown in the experiment where users were asked to tell an image from domain B from an hybrid image that contains a face of one image from this domain, and the attribute content from another image from it. As can be seen, most mixand-match combinations seem natural. However, going over the rows, which should have a fixed attribute (e.g., the same glasses), one observes some variation. This unwanted variation arises from the need to fit the content to the new face.

The method does have, as can be expected, difficulty dealing with low quality inputs. Examples are shown in Fig. 4 , including a misaligned source or guide image. Also shown is an example in which the added content in the target domain is very subtle. These challenges result in a lower quality output. However, the output in each case does indicate some ability to overcome the challenging input.

To evaluate the linearity of the latent representation e 2 (b), we performed interpolation experiments.

The results are presented in Fig. 5 . As can be seen, the change is gradual as we interpolate linearly between the e 2 encoding of the two guide images shown on the left and on the right.

In the supplementary appendix, we provide many more translation examples, see Fig. 11 , 12, and 13.

Table 3 : User study results. In each cell is the ratio of images, were users selected a real image as more natural than a generated one. Closer to 50% is better for the method. While the previous experiments focused on the guided addition of content (mapping from A to B), our method can also be applied in the other direction, from B to A. This way, the specific content in image b ∈ B is removed. In our method, this is achieved simply by decoding a representation of the form (e 1 (b), 0).

The advantage of mapping in this direction is the availability of additional literature methods to compare with, since no guiding is necessary. In Fig. 6 , we compare the results we obtain for removing a feature with the Fader network method of Lample et al. (2017) . As can be seen, the removal process of our method results in less residuals.

To verify that we obtain a better quality in comparison with that of the published implementation of Fader networks, we have applied both an automatic classifier and a user study. The classifier is trained on the training set of domain A and B, using the same architecture that is used by Lample et al. (2017) to perform model selection.

Tab. 4 presents the mean probability of class B provided by the classifier for the output of both Fader network and our method. As can be seen, the probability to belong to the class of the image before the transformation is, as desired, low for both methods. It is somewhat lower on average in our method, despite the fact that our method does not use such a network during training. The user study was conducted on n = 20 users, each examining 20 random test set triplets from each experiment. Each triplet showed the original image (with the feature) and the results of the two algorithms, where the feature is removed. The users preferred our method over fader 92% of the time for glasses removal, 89% of the time for facial hair removal, and 91% of the time for the removal of a smile.

6. CONCLUSIONS:

When converting between two domains, there is an inherent ambiguity that arises from the domainspecific information in the target domain. In guided translation, the reference image in the target domain provides the missing information. Previous work has focused on the missing information that is highly tied to the texture of the image. For example, when translating between paintings and photos, DRIT adds considerable content from the reference photo. However, this is unstructured content, which is not well localized and is highly related to subsets of the image patches that exist in the target domain. In addition, the content from the reference photo that is out of the domain of paintings is not guaranteed to be fully present in the output.

Our work focuses on transformations in which the domain specific content is well structured, and guarantees to replicate all of the domain specific information from the reference image. This is done using a small number of networks and a surprisingly simple set of loss terms, which, due to the emergence of a disentangled representation, solves the problem convincingly. Since conditioning does not increase entropy,

H(1 1 X=F (Y ) |F (Y )) ≤ H(1 1 X=F (Y ) ) ≤ H(q). In addition, H(X|1 1 X=F (Y ) , F (Y )) =P[1 1 X=F (Y ) = 0] • H(X|1 1 X=F (Y ) = 0, F (Y )) + P[1 1 X=F (Y ) = 1] • H(X|1 1 X=F (Y ) = 1, F (Y )) =P[1 1 X=F (Y ) = 0] • H(X|1 1 X=F (Y ) = 0, F (Y )) ≤(1 -q)H(X|1 1 X=F (Y ) = 0, F (Y )) ≤(1 -q)H(X) (18)

Therefore, we conclude that, I(X; Y ) ≥ qH(X) -H(q). Lemma 7. Let b ∼ D B be a distribution over a discrete set

X B ⊂ R M and h v : R M → R M is a (possibly random) function. Assume that ∀x 1 = x 2 ∈ X B : x 1 -x 2 1 > ∆. Let P[ h v (b)-b 1 ≤ ∆] ≥ q ≥ 1/2. Then, I(h v (b); b) ≥ qH(b) -H(q). Proof. Let F (u) := arg min x∈X B u -x 1 . Since the members of X B are ∆-distant from each other, if h v (b) -b 1 ≤ ∆, then, F (h v (b)) = b

. Therefore, we have:

EQUATION

By Lem. 6, for X :← b, Y :← h v (b) and F :← F , we have:

I(h v (b); b) ≥ qH(b) -H(q).

The following lemma is an example of three uncorrelated variables X, Y, Z, such that there is a dimensionality reducing linear transformation over them that preserves all of their information.

Lemma 8. Let X and Y be two independent uniform distributions over [-1, 1] and Z = (X + Y ) 2 . Then, the transformation T (x, y, z) = (x, y) satisfies

I(X, Y, Z; T (X, Y, Z)) = H(X, Y, Z) and Cov(X, Y ) = Cov(X, Z) = Cov(Y, Z).

Proof. Since X and Y are independent, their covariance is zero. By the definition of X and Y , we have:

EQUATION

Finally, we consider that T is a homeomorphic transformation T : (x, y, (x + y) 2 ) → (x, y) (between the manifolds {(x, y, z) | x, y ∈ [-1, 1], z = (x + y) 2 } and [-1, 1] 2 ) and mutual information is invariant to applications of homeomorphic transformations, i.e., I(X; Y ) = I(µ(X); ν(Y )) for homeomorphisms µ and ν over the sample spaces of X and Y (resp.). Therefore, I(X, Y, Z; T (X, Y, Z)) = I(X, Y, Z; X, Y, Z) = H(X, Y, Z).

C PROOFS OF THE MAIN RESULTS:

Theorem 1. Assume that the loss function is symmetric and obeys the triangle inequality. Then, for any autoencoder h = g • f ∈ H, such that f (x 1 , x 2 ) = (e 1 (x 1 ), e 2 (x 2 )) ∈ F is an encoder and g ∈ M is a decoder, the following holds, 

EQUATION

EQUATION

By the definition of discrepancy,

R D A,B [g • f, y] ≤ R D B, B [g • f, g * • f ] + R D A,B [g * • f, y] + disc M (f • D A,B , f • D B, B ) (22)

Again, by the triangle inequality,

EQUATION

Lemma 1. Let M be the set of neural networks of the form: c(x) = φ(W r . . . φ(W 2 φ(W 1 x + q))), where, W i ∈ R di×di+1 for i ∈ {1, . . . , r -1}, q ∈ R d2 and d 1 = E 1 + E 2 . In addition, φ(x 1 , . . . , x k ) = (φ 1 (x 1 ), . . . , φ 1 (x k )), for k ∈ N, (x 1 , . . . , x k ) ∈ R k and a non-linear activation function φ 1 : R → R. Let M be the same as M with

d 1 = E 1 (instead of d 1 = E 1 + E 2 ). Let f (x) = (e 1 (x

), e 2 (x)) be an encoder and assume that:

EQUATION

Proof. By the definition of discrepancy, and since e 1 (b) |= e 2 (b), we have: 

disc M (f • D A,B , f • D B, B ) = sup c1,c2∈M

By

EQUATION

By the definition of M, for any c ∈ M and a fixed vector, y ∈ R E2 , there is a function u ∈ M , such that for every x ∈ R E1 , we have: c(x, y) = u(x). Therefore, we can rewrite the last equation as follows:

EQUATION

C.1 EMERGENCE OF DISENTANGLED REPRESENTATIONS

In this section, we employ the theory of (Achille & Soatto, 2018) in order to show the emergence of disentangled representations, when an autoencoder h = g • f generalizes well. Our analysis shows that by learning an autoencoder such that the encoder f has log-normal regularization, there is a high likelihood of learning disentangled representations. We note that until now, we treated the autoencoder h as a function of two variables (a, b or b, b). From now on, if the two variables are the same, then, we simply write h v (b). In addition, by Eq. 11, instead of writing,

R D B, B [g • f, y] we can simply write R D B [h, Id] := E f E b∼D B [ (g • f (b), b)].

The framework of Achille & Soatto (2018) relies on a few assumptions, which are imported to our case. The algorithm is provided with m i.i.d samples S B = {b i } m i=1 from the distribution D B and trains an encoder-decoder neural network h v = g u • f w , such that the parameters of the encoder, f v , have log-normal perturbations. Formally, we learn a mapping h v of the form h

v (x) = φ(W 2t φ(W 2t-1 . . . φ(W 1 x))), where W i ∈ R di+1×di , for i ∈ {1, . . . , 2t -1}, d 1 = d 2t = M , w = (W t , . . . , W 1 ), u = (W 2t , . . . , W t+1

) and v = (W 2t , . . . , W 1 ). Here, φ(x 1 , . . . , x m ) = (φ 1 (x 1 ), . . . , φ 1 (x k )) is a non-linear activation function φ 1 : R → R extended for all m ∈ N and (x 1 , . . . , x k ) ∈ R k . We assume that φ 1 : R → R is a homeomorphism (i.e., φ 1 is invertible, continuous and φ -1 1 is also continuous). The encoder f w is the composition of the first t layers and the decoder g u is composed of the last t layers of h v . Following Achille & Soatto (2018) , we assume that the posterior distribution p(W k i,j |S B ) is defined as a Gaussian dropout,

EQUATION

where i ∈ R di+1×di and k i,j ∼ log N (-α/2, α), for k ∈ {1, . . . , t}. We consider that the mean and variance of log N (-α/2, α) are 1 and exp(α) -1 respectively. Here, Ŵ k is a learned mean of the k'th layer of the encoder. We denote the output of the k'th layer of f w by z k , i.e.,

z k = φ(W k φ(W k-1 . . . φ(W 1 x))).

Implicit Emergence of Disentangled Representations:

The following lemma is a corollary of Proposition 5.2 in (Achille & Soatto, 2018) for our model.

Lemma 9. Let k ∈ {1, . . . , t}, y k = W k φ(W k-1 . . . φ(W 1 b)) and z k = φ(y k ), for W k = k Ŵ k , where k i,j ∼ log N (α k /2, α k ).

Further, assume that the marginals of P[y k ] and P[y k |z k-1 ] are Gaussians, the components of z k-1 are uncorrelated and that their kurtosis is uniformly bounded. Let q(α) := -1 2 log (1 -exp (-α)). Then,

EQUATION

Proof. By Proposition 5.2 in Achille & Soatto (2018) , we have:

EQUATION

Finally, by the data processing inequality, for X

1 := b, X 2 := z k-1 , X 3 := y k and X 4 := h v (b), we have, I(h v (b); b) ≤ I(y k ; z k-1

). The bound follows from Eq. 30 and the last observation.

Lem. 9 provides an upper bound on the total correlation of the k'th layer of the autoencoder h v (b). This bound assumes that the marginal distributions of y k and y k |z k-1 are Gaussians. This is a reasonable assumption if dim(z k-1 ) is large by the central limit theorem. We also assume that there are no pair-wise linear correlations between the components of z k-1 . In some sense, this assumption can be viewed as minimality of z k-1 . Informally, if there is a strong linear correlation between two components of z k-1 , then, we can throw away one of them and keep most of the information.

On the other hand, if the components of z k-1 are uncorrelated, the existence of a dimensionality reducing linear transformation W such that I(W z k-1 ; z k-1 ) = H(z k-1 ) is still a possibility (for a concrete example, see Lem. 8). Hence, the next layer, z k , is still useful, in order to compress the representation and can still preserve all the information. We also assume that the kurtosis of the components of z k-1 is uniformly bounded. This is a technical hypothesis that is always satisfied, if the components of z k-1 are sub-Gaussian or with uniformly bounded support.

The function q(α k ) is monotonically increasing as α k tends to 0. Therefore, this bound realizes a trade-off between the mutual information of h v (b) and b and the amount of perturbations in the encoder. If the perturbations in the encoder are stronger, then, the ability of the autoencoder to reconstruct b decays. On the other hand, if the perturbations are small, then, q(α) increases.

We consider that the bound decreases, as I(h v (b); b) increases. It is reasonable to believe that since h v (b) is an autoencoder that is being trained to reconstruct b, I(h v (b); b) is maximized implicitly.

The problem of training an autoencoder that maintains a reconstruction that has high mutual information with respect to the input has recently attracted considerable attention. Several methods for maximizing this term explicitly were proposed in (Zhao et al., 2017; Phuong et al., 2018) . In the following lemma, we show that if the samples of D B are well separated, then, the mutual information I(h v (b); b) is implicitly maximized as the reconstruction, h v (b) ≈ b improves.

Lemma 10. Let b ∼ D B be a random vector over a discrete set X B ⊂ R M and h v : R M → R M an autoencoder. Assume that ∀x 1 = x 2 ∈ X B : b) , Id] ≤ ∆ 2 . Then,

x 1 -x 2 1 > ∆ and R D B [h v (

EQUATION

Proof. First, assume by contradiction that:

EQUATION

In other words, b) , Id]/∆. In particular, we arrive at a contradiction:

P[ h v (b) -b 1 > ∆] > R D B [h v (

EQUATION

By the above contradiction and the hypothesis that ≥ 1/2. Therefore, by Lem. 7,

EQUATION

Additionally, by Lem. 5, we have:

EQUATION

Finally,

EQUATION

The above lemma asserts that if the samples in D B are well separated, whenever the autoencoder has a small expected reconstruction error R D B [h v (b), Id], then, the mutual information I(h v (b); b) is at least a large portion of H(b). Therefore, we conclude that if the autoencoder generalizes well, then, it also maximizes the mutual information I(h v (b); b). Finally, we note that we cannot directly apply Lem. 10 to bound the mutual information in Lem. 9. That is because, in Lem. 9, we assume that the components of y k are distributed normally, which implies that the distribution of b must be continuous. On the other hand, in Lem. 10 we assume that b is distributed according to a discrete distribution. In order to reduce this friction, instead of assuming that the each component of z k is distributed according to a normal distribution, we can assume that it is distributed according to a discrete approximation of a normal distribution.

:

Ours method can be readily extended to multiple target domains B1, . . . , B k , but this is not explored here.

Figures and Tables:

1) We denote, D A,B := D A × D B the distribution of sampling (a, b) for a ∼ D A and b ∼ D B independently. We assume a generative model, in which b is specified by a sample a and a specification c from a third unknown domain C = (X C , D C ) of specifications where D C is a distribution over the metric space X C ⊂ R N . Formally, there is an invertible function u(b) = (u 1 (b), u 2 (b)) ∈ X A ×X C that takes a sample b ∈ X B and returns the content u 1 (b) of b and the specification u 2 (b) of b. The goal is to learn a target function y : X A × X B → X B such that: y(a, b) ∼ D B where: a ∼ D A , b ∼ D B , a |= b and u(y(a, b)) = (a, u 2 (b)) (2) Informally, the function y takes two samples a and b and returns the analog of a in B that has the specification of b. For example, A is the domain of images of persons, B is the domain of images of persons with sunglasses and C is the domain of images of sunglasses. The function y takes an image of a person and an image of a person with sunglasses and returns an image of the first person with the specified sunglasses. For simplicity, we assume that the target function is extended to inputs (b 1 , b 2 ) ∈ X 2 B and u(y(b 1 , b 2 )) = (u 1 (b 1 ), u 2 (b 2 )). In other words, b 1 and b 2 are mapped to a third b that has the content of b 1 and the specification of b 2 . In particular, u(y(b, b)) = (u 1 (b), u 2 (b)) = u(b) and, therefore, y(b, b) = b.

This quantity measures the expected loss of h in mapping two samples a ∼ D A and b ∼ D B to the analog y(a, b) of a, that has the specification u 2 (b) of b. The main challenge is that the algorithm does not observes paired examples of the form ((a, b), y(a, b)) as a direct supervision for learning the mapping y

Figure 1: An illustration of the domains and functions employed in our work. D A and D B are the distributions of images in the two domains. e 1 and e 2 the two pathways of the encoder, g is the decoder, which is applied to f , which aggregates the output of the two encoder pathways. There are only three constraints used while training, shown in red: (i) a reconstruction loss in domain A, comparing g • f (a, a) with a, (ii) a reconstruction loss in domain B, and (iii) a measure of the discrepancy between the distributions e 1 • D A and e 1 • D B , measured with a domain confusion term.

is the discrepancy between the distributions f • D A,B and f • D B, B . This term is small, if the distributions of (e 1 (a), e 2 (b)) (for a ∼ D A and b ∼ D B independently) and (e 1 (b), e 2 (b)) (for b ∼ D B ) are close to each other. Since e 1 (a) and e 2 (b) are independent of each other (from the factorization D A,B = D A × D B ), if this term is small, then, e 1 (b) and e 2 (b) weakly depend on each other. Moreover, if the discrepancy term is zero, then, e 1 (b) and e 2 (b) are independent of each other.

extend Proposition 5.2 ofAchille & Soatto (2018) from the case of multiclass classification to the case of autoencoders. In their work, the aim is to show the conditions in which a mid-level representation f of a multi-class classification neural network h = c • f is both disentangled, i.e., T C(f (b)) is small, and is minimal, i.e., I(f (b); b) is small, where b is an input random variable. In their Proposition 5.2, they focus on a linear representation, i.e., f = W is a linear transformation, and they introduce a tight upper bound on the sum T C(W b) + I(W b; b).In the general case, their goal is to show that for a neural network h = c•f , both quantities T C(f (b)) and I(f (b); b) are small, when f that is a high level representation of the input. Unfortunately, they were unable to show that both terms are small simultaneously. Therefore, in their Cor. 5.3, they extend the bound of their Proposition 5.2 to show that only the mutual information I(f (b); b) is small and assume that the components of each mid-level representation of b in the layers of f are uncorrelated, which is a very restrictive assumption.In our Lem. 2, we provide an upper bound for T C(f (b)) that is similar in fashion to their bounds. The main differentiating factor is that we deal with an autoencoder h = g •f . In this case, the mutual information I(h(b); b) is expected to be large, since h(b) is trained to recover b and by the dataprocessing inequality, I(f (b); b) ≥ I(h(b); b) and therefore, I(f (b); b) is also large in this case. As a result, no upper bound is given on the mutual information term I(f (b); b). This is unlike the information bottleneck principle, which guides the classification setting ofAchille & Soatto (2018).Our upper bound on T C(f (b)) includes the term -I(h(b); b), and consequently, T C(f (b)) tends to be smaller (increased disentanglement) as I(h(b); b) increases. Additionally, the upper bound sums a term d 1 • q(α). Here, d 1 is the dimension of f (b), α denotes the amount of regularization in the weights of f and q(α) is monotonically increasing as α tends to zero. Therefore, the disentanglement tends to be larger for an autoencoder h = g •f , such that f is regularized and the mutual information I(h(b); b) is large. In our analysis, we do not require f to be a linear transformation and we do not assume that the components of each mid-level representation of b in the layers of f are uncorrelated. Lemma 2 (Informal). Let b ∼ D B be a distribution and h = g • f an autoencoder. Let d 1 be the dimension of f (b) and d 2 the dimension of the layer previous to f (b).

Figure 2: Glasses transfer. Our method vs literature baselines. Each image combines the domain A image in the top row, with the content of the guide image on the left column.

Figure 3: A mix and match experiment for glasses, using only domain B images. Each image is a combination of the source image in the top row and the guide image on the left column.

Figure 4: Some failure cases. (a) the source image is not well aligned. (b) the guide image is not well aligned. (c) the guide image has a very subtle content.

Figure 5: Interpolation experiments, where the content representation is linearly mixed between the one extracted from the left image and the one extracted from the right image.

Figure 6: A comparison to the Fader networks of Lample et al. (2017) for the task of removing a feature. (a) Glasses. (b) Facial hair. (c) Mouth opening.

Figure 11: More eyewear transfer examples.

Figure 12: More smile transfer examples.

Figure 13: More facial hair transfer examples.

) where D B, B is the distribution of (b, b) where b ∼ D B . Proof. Let g * ∈ arg min g∈M R D A,B [g • f, y] + R D B, B [g • f, y] . Since the loss obeys the triangle inequality,

e1(a),e2(b) (c 1 (e 1 (a), e 2 (b)), c 2 (e 1 (a), e 2 (b))) -E e1(b),e2(b) (c 1 (e 1 (b), e 2 (b)), c 2 (e 1 (b), e 2 (be2(b) E e1(a) (c 1 (e 1 (a), e 2 (b)), c 2 (e 1 (a), e 2 (b))) -E e1(b) (c 1 (e 1 (b), e 2 (b)), c 2 (e 1 (b), e 2 (b)))

Runtime and memory footprint statistics for our method, the two guided translation methods from the literature (MUNIT and DRIT), and the Fader network disentangled representation method.

Table content: <table><tr><td>Measure</td><td>MUNIT</td><td>DRIT</td><td>Fader</td><td>Our</td></tr><tr><td>Performs guided mapping?</td><td>Yes</td><td>Yes</td><td>No</td><td>Yes</td></tr><tr><td>Number of iterations</td><td>1.0M</td><td>0.5M</td><td>1.5M</td><td>1.0M</td></tr><tr><td>Time per iteration</td><td>0.78s</td><td>1.05s</td><td>0.14s</td><td>0.15s</td></tr><tr><td>Memory footprint</td><td>4.35 GB</td><td>6.03 GB</td><td colspan="2">1.83 GB 1.23 GB</td></tr><tr><td colspan="5">Number of weighting parameters 3 (require tuning) 6 (require tuning) 1 (fixed) 1 (fixed)</td></tr></table>

Classifier results for the image obtained after removing the desired feature. Results are the mean probability of domain B for images that were transformed to domain A.

Table content: <table><tr><td colspan="2">Probability of class B</td><td/><td colspan="3">Glasses Smile Facial Hair</td></tr><tr><td colspan="3">Fader networks (Lample et al., 2017)</td><td>0.066</td><td>0.064</td><td>0.182</td></tr><tr><td>Our</td><td/><td/><td>0.011</td><td>0.052</td><td>0.119</td></tr><tr><td>Original Fader</td><td>Our</td><td>Original Fader</td><td>Our</td><td/><td>Original Fader</td><td>Our</td></tr><tr><td>(a)</td><td/><td>(b)</td><td/><td/><td>(c)</td></tr></table>

Peer review (iclr2019):
 This paper tackles the task of content transfer. For a given type of images (frontal face shots), the goal is to transfer a particular localized property (e.g. glasses or facial hair) extracted from one image to another image of the same type (difference face). This is also known as the problem of guided image-to-image translation. The problem is formalized as the one of learning to map two different domains, one domain being composed of images with the property/attribute of interest, the other one containing images without it. The problem is said to be ‘unsupervised’, i.e. there is no pairwise correspondences between images of the two domains (with/without attributes). The novelty of the approach lies on - the loss, which is composed of three terms: two reconstruction losses and a domain confusion loss - the overall architecture and in particular the fact that images are represented as a combination of the output of two encoders: one encodes the face and the other encodes the property (e.g. glasses). Overall comments: + a theoretical part discusses generalization bounds and the emergence of disentangled representations + visual results are appealing showing the suitability of the method to the considered task - the discussion of the advantages of the proposed method could be improved - the motivation for some of the experimental results is unclear (choice of experimental protocol and baselines). - the scope of the method seems limited Detailed comments: I personally like the described model. The disentanglement mechanism is intuitive to understand, and seems well suited for this particular task, as qualitative evidence suggests. I am not sure if this approach would be applicable beyond the very specific scenario considered in the paper. The paper emphasizes that the strength of the method lies on its simplicity w.r.t. competitors, and its better results. These two aspects could be better discussed. Simplicity: In several places the paper claims that the proposed approach is considerably simpler. Some parts hint to criteria for the ‘complexity’ comparison, such as Table 1 or a few sentences (e.g. “this allows us to train with many less parameters and without the need to applying excessive tuning”). It would be more convincing to have a dedicated discussion of the practical advantages of the simplicity claimed by this method, discussing e.g. training/testing time, memory footprint of the models, convergence properties, stability, etc. Comparison: The chosen baselines, i.e. MUNIT and DRIT are experimentally shown to perform poorly on the considered task. Yet although these methods were also developed for guided image translation, they were designed for a rather different application: style transfer. I am not sure these comparisons bring much insight on the performance of the method. Experiments are conducted for a very specific task, on a single dataset. Would the method have broader application? Experimental protocol: I understand that such an approach is difficult to evaluate quantitatively but I am not sure what there is to learn from experiments reported in Table 3, as there is no point of comparison on this task. This could be clarified. Additional comments: - The paper relies on the assumption that the distribution of persons with sunglasses and that of persons without them is the same, except for the sunglasses. This sounds like a strong requirement for the data used to train the network; it would be interesting to discuss the practical impact of this assumption, especially on the data requirement for the method to perform well - I found Figure 1 quite useful. A visual representation of the architecture and its associated description help follow the technical part. - I got confused with some of the claims in section 4.2. More generally, I found the technical part hard to follow. - The user study seems small: only 10 pairs of images are considered. How were those pair chosen? Is the set representative?