A DVERSARIAL I NFORMATION F ACTORIZATION
Anonymous authors
Paper under double-blind review
A BSTRACT
We propose a novel generative model architecture designed to learn representations for images that factor out a single attribute from the rest of the representation.
A single object may have many attributes which when altered do not change the identity of the object itself.
Consider the human face; the identity of a particular person is independent of whether or not they happen to be wearing glasses.
The attribute of wearing glasses can be changed without changing the identity of the person.
However, the ability to manipulate and alter image attributes without altering the object identity is not a trivial task.
Here, we are interested in learning a representation of the image that separates the identity of an object (such as a human face) from an attribute (such as ‘wearing glasses’).
We demonstrate the success of our factorization approach by using the learned representation to synthesize the same face with and without a chosen attribute.
We refer to this speciﬁc synthesis process as image attribute manipulation.
We further demonstrate that our model achieves competitive scores, with state of the art, on a facial attribute classiﬁcation task.
I NTRODUCTION
Latent space generative models, such as generative adversarial networks (GANs) (Goodfellow et al., 2014; Radford et al., 2015) and variational autoencoders (VAEs) (Kingma & Welling, 2013), learn a mapping from a latent encoding space to a data space, for example, the space of natural images.
It has been shown that the latent space learned by these models is often organized in a near-linear fashion (Radford et al., 2015; Kingma & Welling, 2013), whereby neighbouring points in latent space map to similar images in data space.
Certain “directions” in latent space correspond to changes in the intensity of certain attributes.
In the context of faces, for example, directions in latent space would correspond to the extent to which someone is smiling.
This may be useful for image synthesis where one can use the latent space to develop new design concepts (Dosovitskiy et al., 2017; Zhu et al., 2016), edit an existing image (Zhu et al., 2016) or synthesize avatars (Wolf et al., 2017;
Taigman et al., 2016).
This is because semantically meaningful changes may be made to images by manipulating the latent space (Radford et al., 2015; Zhu et al., 2016; Larsen et al., 2015).
One avenue of research for latent space generative models has been class conditional image synthesis (Chen et al., 2016; Odena et al., 2016; Mirza & Osindero, 2014), where an image of a particular object category is synthesized.
Often, object categories may be sub-divided into ﬁne-grain subcategories.
For example, the category “dog” may be split into further sub-categories of different dog breeds.
Work by Bao et al.
(2017) propose latent space generative models for synthesizing images from ﬁne-grained categories, in particular for synthesizing different celebrities’ faces conditional on the identity of the celebrity.
Rather than considering ﬁne-grain categories, we propose to take steps towards solving the different, but related problem of image attribute manipulation.
To solve this problem we want to be able to synthesize images and only change one element or attribute of its content.
For example, if we are synthesizing faces we would like to edit whether or not a person is smiling.
This is a different problem to ﬁne-grain synthesis; we want to be able to synthesize two faces that are similar, with only a single chosen attribute changed, rather than synthesizing two different faces.
The need to synthesis two faces that are similar makes the problem of image attribute manipulation more difﬁcult than the ﬁne-grain image synthesis problem; we need to learn a latent space representation that separates an object category from its attributes.
In this paper, we propose a new model that learns a factored representation for faces, separating attribute information from the rest of the facial representation.
We apply our model to the CelebA (Liu et al., 2015) dataset of faces and control several facial attributes.
Our contributions are as follows:
Our core contribution is the novel cost function for training a VAE encoder to learn a latent representation which factorizes binary facial attribute information from a continuous identity representation (Section 3.2).
We provide an extensive quantitative analysis of the contributions of each of the many loss components in our model (Section 4.2).
We obtain classiﬁcation scores that are competitive with state of the art (Zhuang et al., 2018) using the classiﬁer that is already incorporated into the encoder of the VAE (Section 4.3).
We provide qualitative results demonstrating that our latent variable, generative model may be used to successfully edit the ‘Smiling’ attribute in more than 90% of the test cases (Section 4.4).
We discuss and clarify the distinction between conditional image synthesis and image attribute editing (Section 5).
We present code to reproduce experiments shown in this paper: (provided after review).
L ATENT SPACE GENERATIVE MODELS
Latent space generative models come in various forms.
Two state-of-art generative models are
Variational Autoencoders (VAE) (Kingma & Welling, 2013) and Generative Adversarial Networks (GAN).
Both models allow synthesis of novel data samples from latent encodings, and are explained below in more detail.
2. V ARIATIONAL A UTOENCODER (VAE)
Variational autoencoders (Kingma & Welling, 2013) consist of an encoder q φ ( z | x ) and decoder p θ ( x | z ) ; oftentimes these can be instantiated as neural networks, E φ ( · ) and D θ ( · ) respectively, with learnable parameters, φ and θ .
A VAE is trained to maximize the evidence lower bound (ELBO) on log p ( x ) , where p ( x ) is the data-generating distribution.
The ELBO is given by:
[Equation]
where p ( z ) is a chosen prior distribution such as p ( z ) =
N ( 0 , I ) .
The encoder predicts, µ φ ( x ) and σ φ ( x ) for a given input x and a latent sample, ˆ z , is drawn from q φ ( z | x ) as follows: (cid:15) ∼ N ( 0 , I ) then ˆ z = µ φ ( x ) + σ φ ( x ) (cid:12) (cid:15) .
By choosing a multivariate Gaussian prior, the KL -divergence may be calculated analytically (Kingma & Welling, 2013).
The ﬁrst term in the loss function is typically approximated by calculating the reconstruction error between many samples of x and ˆ x =
D θ
( E φ ( x )) .
New data samples, which are not present in the training data, are synthesised by ﬁrst drawing latent samples from the prior, z ∼ p ( z ) , and then drawing data samples from p θ ( x | z ) .
This is equivalent to passing the z samples through the decoder, D θ ( z ) .
VAEs offer both a generative model, p θ ( x | z ) , and an encoding model, q φ ( z | x ) , which are useful as starting points for image editing in the latent space.
However, samples drawn from a VAE are often blurred (Radford et al., 2015).
2. G ENERATIVE A DVERSARIAL N ETWORKS (GAN)
An alternative generative model, which may be used to synthesize much sharper images, is the Generative Adversarial Network (GAN) (Goodfellow et al., 2014;
Radford et al., 2015).
GANs consist of two models, a generator, G θ ( · ) , and a discriminator, C χ ( · ) , both of which may be implemented using convolutional neural networks (Radford et al., 2015; Denton et al., 2015).
GAN training involves these two networks engaging in a mini-max game.
The discriminator, C χ , is trained to classify samples from the generator, G θ , as being ‘fake’ and to classify samples from the data-generating distribution, p ( x ) , as being ‘real’.
The generator is trained to synthesize samples that confuse the discriminator; that is, to synthesize samples that the discriminator cannot distinguish from the ‘real’ samples.
The objective function is given by:
[Equation]
where p g ( x ) is the distribution of synthesized samples, sampled by:
z ∼ p ( z ) , then x = G θ ( z ) , where p ( z ) is a chosen prior distribution such as a multivariate Gaussian.
2. B EST OF BOTH GAN AND VAE
The vanilla GAN model does not provide a simple way to map data samples to latent space.
Although there are several variants on the GAN that do involve learning an encoder type model (Dumoulin et al., 2016; Donahue et al., 2016; Li et al., 2017), only the approach presented by Li et al.
(2017) allows data samples to be faithfully reconstructed.
The approach presented by Li et al.
(2017) requires adversarial training to be applied to several high dimensional distributions.
Training adversarial networks on high dimensional data samples remains challenging (Arjovsky & Bottou, 2017) despite several proposed improvements (Salimans et al., 2016; Arjovsky et al., 2017).
For this reason, rather than adding a decoder to a GAN, we consider an alternative latent generative model that combines a VAE with a GAN.
In this arrangement, the VAE may be used to learn an encoding and decoding process, and a discriminator may be placed after the decoder to ensure higher quality of the data samples outputted from the decoder.
Indeed, there have been several suggestions on how to combine VAEs and GANs (Bao et al., 2017; Larsen et al., 2015; Mescheder et al., 2017)
each with a different structure and set of loss functions, however, none are designed speciﬁcally for attribute editing.
The content of image samples synthesized from a vanilla VAE or GAN depends on the latent variable z , which is drawn from a speciﬁed random distribution, p ( z ) .
For a well-trained model, synthesised samples will resemble samples in the training data.
If the training data consists of images from multiple categories, synthesized samples may come from any, or possibly a combination, of those categories.
For a vanilla VAE, it is not possible to choose to synthesize samples from a particular category.
However, conditional VAEs (and GANs) (Chen et al., 2016; Odena et al., 2016; Mirza & Osindero, 2014) provide a solution to this problem as they allow synthesis of class-speciﬁc data samples.
2. C ONDITIONAL VAE S
Autoencoders may be augmented in many different ways to achieve category-conditional image synthesis (Bao et al., 2017).
It is common to append a one-hot label vector, y , to inputs of the encoder and decoder (Sohn et al., 2015).
However, for small label vectors, relative to the size of the inputs to the encoder and the decoder model, it is possible for the label information, y , to be ignored..
A more interesting approach, for conditional (non-variational and semi-supervised) autoencoders is presented by Makhzani et al.
(2015), where the encoder outputs both a latent vector, ˆ z , and an attribute vector, ˆ y .
The encoder is updated to minimize a classiﬁcation loss between the true label, y , and ˆ y .
We incorporate a similar architecture into our model with additional modiﬁcations to the training of the encoder for the reasons explained below.
There is a drawback to incorporating attribute information in the way described above (Makhzani et al., 2015; Perarnau et al., 2016) when the purpose of the model is to edit speciﬁc attributes, rather than to synthesize samples from a particular category.
We observe that in this naive implementation of conditional VAEs, varying the attribute (or label) vector, ˆ y , for a ﬁxed ˆ z can result in unpredictable changes in synthesized data samples, ˆ x .
Consider for example the case where, for a ﬁxed ˆ z , modifying ˆ y does not result in any change in the intended corresponding attribute.
This suggests that information about the attribute one wishes to edit, y , is partially contained in ˆ z rather than solely in ˆ y .
Similar problems have been discussed and addressed to some extent in the GAN literature (Chen et al., 2016; Mirza & Osindero, 2014; Odena et al., 2016), where it has been observed that label information in ˆ y is often ignored during sample synthesis.
In general, one may think that ˆ z and ˆ y should be independent.
However, if attributes, y , that should be described by ˆ y remain unchanged for a reconstruction where only ˆ y is changed, this suggests that ˆ z contains most of the information that should have been encoded within ˆ y .
We propose a process to separate the information about y from ˆ z using a mini-max optimization involving y , ˆ z , the encoder
E φ , and an auxiliary network A ψ .
We refer to our proposed process as ‘Adversarial Information
Factorization’.
2. A DVERSARIAL I NFORMATION F ACTORIZATION
For a given image of a face, x , we would like to describe the face using a latent vector, ˆ z , that captures the identity of the person, along with a single unit vector, ˆ y ∈ [0 , 1] , that captures the presence, or absence, of a single desired attribute, y .
If a latent encoding, ˆ z , contains information about the desired attribute, y , that should instead be encoded within the attribute vector, ˆ y , then a classiﬁer should be able to accurately predict y from ˆ z .
Ideally, ˆ z contains no information about y and so, ideally, a classiﬁer should not be able to predict y from ˆ z .
We propose to train an auxiliary network to predict y from ˆ z accurately while updating the encoder of the VAE to output ˆ z values that cause the auxiliary network to fail.
If ˆ z contains no information about the desired attribute, y , that we wish to edit, then the information can instead be conveyed in ˆ y since ˆ x must still contain that information in order to minimize reconstruction loss.
We now formalize these ideas.
M ETHOD
In what follows, we explain our novel approach to training the encoder of a VAE, to factor (separate) out information about y from ˆ z , such that H ( y | ˆ z )
≈ H ( y ) .
We integrate this novel factorisation method into a VAE-GAN.
The GAN component of the model is incorporated only to improve image quality.
Our main contribution is our proposed adversarial method for factorising the label information, y , out of the latent encoding, ˆ z .
3. M ODEL A RCHITECTURE
A schematic of our architecture is presented in Figure 1.
In addition to the encoder, E φ , decoder, D θ , and discriminator, C χ , we introduce an auxiliary network, A ψ : ˆ z → ˜ y , whose purpose is described in detail in Section 3.2.
We use ˆˆ y ∈ [0 , 1] to indicate the predicted label of a reconstructed data sample.
Additionally, the encoder also acts as a classiﬁer, outputting an attribute vector, ˆ y , along side a latent vector, ˆ z .
The parameters of the decoder, θ , are updated with gradients from the following loss function:
[Equation]
where β and δ are regularization coefﬁcients, L rec =
L bce (ˆ x, x ) is a reconstruction loss and ˆ L class =
L bce (ˆˆ y, y ) is a classiﬁcation loss on reconstructed data samples.
The classiﬁcation loss, ˆ L class , provides a gradient containing label information to the decoder, which otherwise the decoder would not have (Chen et al., 2016).
The GAN loss is given by L gan =
[ L bce ( y real , C χ
( x ))
+
L bce ( y fake , C χ
( D θ ( E φ ( x ))))
+ L bce ( y fake , C χ
( D θ ( z, y )))]
Bao et al.
(2017), where y real and y fake are vectors of ones and zeros respectively and z ∼ p ( z ) .
Note that L bce is the binary crossentropy loss given by L bce ( a, b )
=
1 M (cid:80) M i =1 a log b + (1 − a ) log(1 − b ) .
The discriminator parameters, χ , are updated to minimize L gan .
The parameters of the encoder, φ , intended for use in synthesizing images from a desired category , may be updated by minimizing the following function:
[Equation]
[Figure]
where α and ρ are additional regularization coefﬁcients;
L KL = KL [ q φ (
z | x ) || p ( z )] and L class =
L bce (ˆ y, y ) is the classiﬁcation loss on the input image.
Unfortunately, the loss function in Equation (4) is not sufﬁcient for training an encoder used for attribute manipulation.
For this we propose an additional network and cost function as described below.
3. A DVERSARIAL I NFORMATION F ACTORISATION
To factor label information, y , out of ˆ z we introduce an additional auxiliary network, A ψ , that is trained to correctly predict y from ˆ z .
The encoder, E φ , is simultaneously updated to promote
A ψ to make incorrect classiﬁcations.
In this way, the encoder is encouraged not to place attribute information, y , in ˆ z .
This may be described by the following mini-max objective:
[Equation]
where E z,φ ( x ) is the latent output of the encoder.
Training is complete when the auxiliary network, A ψ , is maximally confused and cannot predict y from ˆ z
= E z,φ ( x ) , where y is the true label of x .
The encoder loss is therefore given by:
[Equation]
We call the conditional VAE-GAN trained in this way an Information Factorization cVAE-GAN (IFcVAE-GAN).
The training procedure is presented in Algorithm 1.
3. A TTRIBUTE M ANIPULATION
To edit an image such that it has a desired attribute, we encode the image to obtain a ˆ z , the identity representation, append it to our desired attribute label, ˆ y ← y , and pass this through the decoder.
We use ˆ y = 0 and ˆ y = 1 to synthesize samples in each mode of the desired attribute e.g. ‘Smiling’
1: procedure T RAINING C
2: for i in range ( N ) do
4: x ∼ D
5: z ∼ p ( z ) 6: ˆ z, ˆ y ← E φ ( x ) 7: ˆ x ← D θ
(ˆ y, ˆ z ) 8: ˜
y ← A ψ ( z )
9: # Calculate updates, u 10: # do
11: θ ← RMSprop ( θ, −∇ θ L dec ) 12: φ ← RMSprop ( φ, −∇ φ L IFcV AE − GAN ) (cid:46) the to max.
L aux 13: χ ← RMSprop ( χ, + ∇ χ L gan ) 14: ψ ← RMSprop ( ψ, −∇ ψ L aux )
aux 15: end for 16: end procedure and ‘Not Smiling’.
Thus, attribute manipulation becomes a simple ‘switch ﬂipping’ operation in the representation space.
R ESULTS
In this section, we show both quantitative and qualitative results to evaluate our proposed model.
We begin by quantitatively assessing the contribution of each component of our model in an ablation study.
Following this we perform facial attribute classiﬁcation using our model.
We use a standard deep convolutional GAN, DCGAN, architecture for the ablation study (Radford et al., 2015), and subsequently incorporate residual layers (He et al., 2016) into our model in order to achieve competitive classiﬁcation results compared with a state of the art model (Zhuang et al., 2018).
We ﬁnish with a qualitative evaluation of our model, demonstrating how our model may be used for image attribute editing.
For our qualitative results we continue to use the same residual networks as those used for classiﬁcation, since these also improved visual quality.
We refer to any cVAE-GAN that is trained without an L aux term in the cost function as a naive cVAE-GAN and a cVAE-GAN trained with the L aux term as an Information Factorization cVAEGAN (IFcVAE-GAN).
4. Q UANTITATIVE E VALUATION O F (E DITED ) I MAGE S AMPLES
When performing image attribute manipulation, there are two important things that we would like to quantify.
The ﬁrst, is reconstruction quality, approximated by the mean squared error, MSE, between x and ˆ x
= D θ
( E y,φ ( x ) , E z,φ ( x ) ) .
The second, is the proportion of edited images that have a desired attribute.
To approximate this, we train an independent classiﬁer on real images to classify the presence ( y = 1 ) or absence ( y = 0 ) of a desired attribute.
We apply the trained classiﬁer to edited images, synthesized using ˆ y = 1 and ˆ y = 0 to obtain classiﬁcation scores, ˆ C Smiling and ˆ C Not − Smiling respectively.
4. Q UANTIFYING CONTRIBUTIONS OF EACH COMPONENT TO THE FINAL MODEL
Table 1 shows the contributions of each component of our novel function (Equation 6).
We consider reconstruction error and classiﬁcation scores on edited image samples.
Smaller reconstruction error indicates better reconstruction, and larger classiﬁcation scores ( ˆ C Smiling and ˆ C Not − Smiling ) suggest better control over attribute changes.
Note that all input test images for this experiment were from the ‘Smiling’ category.
From Table 1, we make the following observations:
(1) Our model: Our model is able to successfully edit an image to have the ‘Not Smiling’ attribute in 81 .
3% of cases and the ‘Smiling’ attribute in all cases.
(2) Effect of ˆ L class : Using ˆ L class does not provide any clear beneﬁt.
We explored the effect of including this term since a similar approach had been proposed in the GAN literature Chen et al.
(2016); Odena et al.
for conditional image synthesis (rather than attribute editing).
To the best of our knowledge, this approach has not been used in the VAE literature.
This term is intended to maximise I ( x ; y ) by providing a gradient containing label information to the decoder, however, it does not contribute to the factorization of attribute information, y , from ˆ z .
(3 & 4) Effect of Removing Information Factorization:
Without our proposed L aux term in the encoder loss function, the model fails completely to perform attribute editing.
Since ˆ C Smiling + ˆ C Not − Smiling ≈ 100% , this strongly suggests that samples are synthesized independently of ˆ y and that the synthesized images are the same for ˆ y = 0 and ˆ y = 1 .
(4) Effect of ˆ L class on its own: For completeness, we also evaluated our model without L aux but with ˆ L class to test the effect of ˆ L class on its own.
Though similar approaches have been successful for category conditional image synthesis, it was not as successful on the attribute editing task.
ˆ
C Not − Smiling = 0 . 0 , which suggests that none of the synthesized images have the desired attribute ˆ y = 0 (‘Not Smiling’).
This supports the use of L aux , when training models for attribute editing, over ˆ L class despite the promotion of the latter in the GAN literature Chen et al.
; Odena et al.
(2016) for category speciﬁc sample synthesis.
= 0 .
1 , δ = 0 . 1 , α = 0 .
2 , β = 0 . 0 } .
[Table]
(1) Ours (without ˆ L class )
[Table]
(2) With ˆ L class
[Table]
(3) Without L aux , without ˆ L class
[Table]
(4) Without L aux , with ˆ L class
[Table]
4. F ACIAL A TTRIBUTE C LASSIFICATION
We have proposed a model that learns a representation, { ˆ z, ˆ y } , for faces such that the identity of the person, encoded in ˆ z , is factored from a particular facial attribute.
We achieve this by minimizing the mutual information between the identity encoding and the facial attribute encoding to ensure that H ( y | ˆ z ) ≈ H ( y ) , while also training E y,φ as an attribute classiﬁer.
Our training procedure encourages the model to put all label information into ˆ y , rather than ˆ z .
This suggests that our model may be useful for facial attribute classiﬁcation.
To further illustrate that our model is able to separate the representation of particular attributes from the representation of the person’s identity, we can measure the model’s ability, speciﬁcally the encoder, to classify facial attributes.
We proceed to use E y,φ directly for facial attribute classiﬁcation and compare the performance of our model to that of a state of the art classiﬁer proposed by Zhuang et al.
Results in Figure 2 show that our model is highly competitive with a state of the art facial attribute classiﬁer Zhuang et al.
We outperformed by more than 1% on 2 out ofcategories, underperformed by more than 1% on only 1 category and remained competitive with all other attributes.
These results demonstrate that the model is effectively factorizing out information about the attribute from the identity representation.
4. Q UALITATIVE R ESULTS
In this section, we focus on attribute manipulation (described previously in Section 3.3).
Brieﬂy, this involves reconstructing an input image, x , for different attribute values, ˆ y ∈ { 0 , 1 } .
We begin by demonstrating how a cVAE-GAN (Bao et al.
Bao et al.
(2017)) may fail to edit desired attributes, particularly when it is trained to achieve low reconstruction error.
The work of Bao et al.
Bao et al.
(2017) focused solely on the ability to synthesise images with a desired attribute, rather than to reconstruct a particular image and edit a speciﬁc attribute.
It is challenging to learn a representation that both preserves identity and allows factorisation Higgins et al.
Figure 3(c,e) shows edited images, setting ˆ y = 0 for ‘Not Smiling’ and
ˆ y
=
1 for ‘Smiling’.
We found that the cVAE-GAN (Bao et al.
Bao et al.
(2017)) failed to edit samples for the y =
(‘Not Smiling’) case.
This failure demonstrates the need for models that learn a factored latent representation, while maintaining good reconstruction quality.
Note that we achieve good reconstruction by reducing weightings on the KL and GAN loss terms, using α = 0 .
005 and δ = 0 .
005 respectively.
We trained the model using RMSProp Tieleman & Hinton (2012) with momentum = 0 .
5 in the discriminator.
We train our proposed IFcVAE-GAN model using the same optimiser and hyper-parameters that were used for the Bao et al.
(2017) model above.
We also used the same number of layers (and residual layers) in our encoder, decoder and discriminator networks as those used by Bao et al.
Under this set-up, we used the following additional hyper-parameters: { β = 0 . 0 , ρ = 1 . 0 } in our model.
Figure 3 shows reconstructions when setting ˆ y = 0 for ‘Not Smiling’ and ˆ y =for ‘Smiling’.
In contrast to the naive cVAE-GAN (Bao et al., 2017), our model is able to achieve good reconstruction, capturing the identity of the person, while also being able to change the desired attribute.
Table 2 shows that the model was able to synthesize images with the ‘Not Smiling’ attribute with a 98% success rate, compared with a 22% success rate using the naive cVAE-GAN Bao et al.
C Smiling and ˆ C Not − Smiling denote the proportion of edited samples that have the
We see that both models achieve comparable (MSE) reconstruction errors, however, only our model is able to synthesize images of faces without smiles.
A complete ablation study for this model (with residual layers) is given in the appendix (Table 3).
[Table]
4. E DITING O THER F ACIAL A TTRIBUTES
In this section we apply our proposed method to manipulate other facial attributes where the initial samples, from which the ˆ z ’s are obtained, are test samples whose labels are y = 1 indicating the
[Figure]
presence of the desired attribute (e.g. ‘Blonde Hair’).
In Figure 4, we observe that our model is able to both achieve high quality reconstruction and edit the desired attributes.
We have presented the novel IFcVAE-GAN model, and (1) demonstrated that our model learns to factor attributes from identity, (2) performed an ablation study to highlight the beneﬁts of using an auxiliary classiﬁer to factorize the representation and (3) shown that our model may be used to achieve competitive scores on a facial attribute classiﬁcation task.
We now discuss this work in the context of other related approaches.
C OMPARISON TO R ELATED W ORK
We have used adversarial training (involving an auxiliary classiﬁer) to factor attribute label information, y , out of the encoded latent representation, ˆ z .
Schmidhuber (2008) and Lample et al.
(2017) perform similar factorization of the latent space.
Similarly to us, Lample et al.
(2017) incorporate this factorisation technique into the encoder of a generative model, however, unlike in our model, their encoder does not predict attribute information and so may not be used as a classiﬁer.
Our work has the closest resemblance to the cVAE-GAN architecture (see Figure 1) proposed by
Bao et al.
cVAE-GAN is designed for synthesizing samples of a particular class, rather than manipulating a single attribute of an image from a class.
In short, their objective is to synthesize a “Hathway” face, whereas our objective would be to make “Hathway smiling” or “Hathway not smiling”, which has different demands on the type of factorization in the latent representation.
Separating categories is a simpler problem since it is possible to have distinct categories and changing categories may result in more noticeable changes in the image.
Changing an attribute requires a speciﬁc and targeted change with minimal changes to the rest of the image.
Additionally, our model simultaneously learns a classiﬁer for input images unlike the work by Bao et al.
In a similar vein to our work, Antipov et al.
(2017) acknowledge the need for “identity preservation” in the latent space.
They achieve this by introducing an identity classiﬁcation loss between an input data sample and a reconstructed data sample, rather than trying to separate information in the encoding itself.
Similar to our work, Larsen et al.
(2015) use a VAE-GAN architecture.
However, they do not condition on label information and their image “editing” process is not done in an endto-end fashion (likewise with Upchurch et al.
Our work highlights an important difference between category conditional image synthesis (Bao et al., 2017) and attribute editing in images (Lample et al., 2017; Perarnau et al., 2016): what works for category conditional image synthesis may not work for attribute editing.
Furthermore, we have shown (Section 4.2) that for attribute editing to be successful, it is necessary to factor label information out of the latent encoding.
In this paper, we have focused on latent space generative models, where a small change in latent space results in a semantically meaningful change in image space.
Our approach is orthogonal to a class of image editing models, called “image-to-image” models, which aim to learn a single latent representation for images in different domains.
Recently, there has been progress in image-to-image domain adaptation, whereby an image is translated from one domain (e.g. a photograph of a scene) to another domain (e.g. a painting of a similar scene)
(Zhu et al., 2017; Liu et al., 2017; Liu &
Tuzel, 2016).
Image-to-image methods may be used to translate smiling faces to non-smiling faces, however, these models (Liu et al., 2017; Liu & Tuzel, 2016) require signiﬁcantly more resources than ours 2 .
By performing factorization in the latent space, we are able to use a single generative model, to edit an attribute by simply changing a single unit of the encoding, y , from 0 to 1 or vice versa.
Finally, while we use labelled data to learn representations, we acknowledge that there are many other models that learn factored, or disentangled, representations from unlabelled data including several VAE variants (Higgins et al., 2016; Kumar et al., 2018).
The β -VAE (Higgins et al., 2016) objective is similar to the information bottleneck (Burgess et al., 2018), minimizing mutual information, I ( x ; z ) , which forces the model to exploit regularities in the data and learn a disentangled representation.
In our approach we perform a more direct, supervised, factorisation of the latent space, using a mini-max objective, which has the effect of approximately minimizing I ( z ; y ) .
C ONCLUSION
We have proposed a novel perspective and approach to learning representations of images which subsequently allows elements, or attributes, of the image to be modiﬁed.
We have demonstrated our approach on images of the human face, however, the method is generalisable to other objects.
We modelled a human face in two parts, with a continuous latent vector that captures the identity of a person and a binary unit vector that captures a facial attribute, such as whether or not a person is smiling.
By modelling an image with two separate representations, one for the object and the other for the object’s attribute, we are able to change attributes without affecting the identity of the object.
To learn this factored representation we have proposed a novel model aptly named
Information Factorization conditional VAE-GAN.
The model encourages the attribute information to be factored out of the identity representation via an adversarial learning process.
Crucially, the representation learned by our model both captures identity faithfully and facilitates accurate and easy attribute editing without affecting identity.
We have demonstrated that our model performs better than pre-existing models intended for category conditional image synthesis (Section 4.4), and have performed a detailed ablation study (Table 1) which conﬁrms the importance and relevance of our proposed method.
Indeed, our model is highly effective as a classiﬁer, achieving state of the art accuracy on facial attribute classiﬁcation for several attributes (Figure 2).
Our approach to learning factored representations for images is both a novel and important contribution to the general ﬁeld of representation learning.
A PPENDIX A BLATION S TUDY F OR O UR M ODEL W ITH R ESIDUAL L AYERS
For completeness we include a table (Table 3) demonstrating an ablation study for our model with the residual network architecture discussed in Section 4.4, note that this is the same architecture that was used by Bao et al.
Table 3 and additionally, Figure 5, demonstrate the need for the L aux loss and shows that increased regularisation reduces reconstruction quality.
The table also shows that there is no signiﬁcant beneﬁt to using the ˆ L class loss.
These ﬁndings are consistent with those of the ablation study in the main body of the text for the IFcVAE-GAN with a the GAN architecture of Radford et al.
[Figure]