Title: ADVERSARIALLY LEARNED INFERENCE

Abstract: We introduce the adversarially learned inference (ALI) model, which jointly learns a generation network and an inference network using an adversarial process. The generation network maps samples from stochastic latent variables to the data space while the inference network maps training examples in data space to the space of latent variables. An adversarial game is cast between these two networks and a discriminative network is trained to distinguish between joint latent/data-space samples from the generative network and joint samples from the inference network. We illustrate the ability of the model to learn mutually coherent inference and generation networks through the inspections of model samples and reconstructions and confirm the usefulness of the learned representations by obtaining a performance competitive with state-of-the-art on the semi-supervised SVHN and CIFAR10 tasks.

1. INTRODUCTION:

Deep directed generative model has emerged as a powerful framework for modeling complex highdimensional datasets. These models permit fast ancestral sampling, but are often challenging to learn due to the complexities of inference. Recently, three classes of algorithms have emerged as effective for learning deep directed generative models: 1) techniques based on the Variational Autoencoder (VAE) that aim to improve the quality and efficiency of inference by learning an inference machine (Kingma & Welling, 2013; Rezende et al., 2014) , 2) techniques based on Generative Adversarial Networks (GANs) that bypass inference altogether (Goodfellow et al., 2014) and 3) autoregressive approaches (van den Oord et al., 2016b; c; a) that forego latent representations and instead model the relationship between input variables directly. While all techniques are provably consistent given infinite capacity and data, in practice they learn very different kinds of generative models on typical datasets. VAE-based techniques learn an approximate inference mechanism that allows reuse for various auxiliary tasks, such as semi-supervised learning or inpainting. They do however suffer from a wellrecognized issue of the maximum likelihood training paradigm when combined with a conditional independence assumption on the output given the latent variables: they tend to distribute probability mass diffusely over the data space (Theis et al., 2015) . The direct consequence of this is that image samples from VAE-trained models tend to be blurry (Goodfellow et al., 2014; Larsen et al., 2015) . Autoregressive models produce outstanding samples but do so at the cost of slow sampling speed and foregoing the learning of an abstract representation of the data. GAN-based approaches represent a good compromise: they learn a generative model that produces higher-quality samples than the best VAE techniques (Radford et al., 2015; Larsen et al., 2015) without sacrificing sampling speed and also make use of a latent representation in the generation process. However, GANs lack an efficient inference mechanism, which prevents them from reasoning about data at an abstract level. For instance, GANs don't allow the sort of neural photo manipulations showcased in (Brock et al., 2016) . Recently, efforts have aimed to bridge the gap between VAEs and GANs, to learn generative models with higher-quality samples while learning an efficient inference network (Larsen et al.,

x ∼ q(x) ẑ ∼ q(z | x) D(x, z) x ∼ p(x | z) z ∼ p(z) Gz(x) Gx(z) (x, ẑ) ( x, z)

Figure 1 : The adversarially learned inference (ALI) game.

2015; Lamb et al., 2016; Dosovitskiy & Brox, 2016) . While this is certainly a promising research direction, VAE-GAN hybrids tend to manifest a compromise of the strengths and weaknesses of both approaches.

In this paper, we propose a novel approach to integrate efficient inference within the GAN framework.

Our approach, called Adversarially Learned Inference (ALI), casts the learning of both an inference machine (or encoder) and a deep directed generative model (or decoder) in an GAN-like adversarial framework. A discriminator is trained to discriminate joint samples of the data and the corresponding latent variable from the encoder (or approximate posterior) from joint samples from the decoder while in opposition, the encoder and the decoder are trained together to fool the discriminator. Not only are we asking the discriminator to distinguish synthetic samples from real data, but we are requiring it to distinguish between two joint distributions over the data space and the latent variables.

With experiments on the Street View House Numbers (SVHN) dataset (Netzer et al., 2011) , the CIFAR-10 object recognition dataset (Krizhevsky & Hinton, 2009) , the CelebA face dataset (Liu et al., 2015) and a downsampled version of the ImageNet dataset (Russakovsky et al., 2015) , we show qualitatively that we maintain the high sample fidelity associated with the GAN framework, while gaining the ability to perform efficient inference. We show that the learned representation is useful for auxiliary tasks by achieving results competitive with the state-of-the-art on the semi-supervised SVHN and CIFAR10 tasks.

2. ADVERSARIALLY LEARNED INFERENCE:

Consider the two following probability distributions over x and z:

• the encoder joint distribution q(x, z) = q(x)q(z | x),

• the decoder joint distribution p(x, z) = p(z)p(x | z).

These two distributions have marginals that are known to us: the encoder marginal q(x) is the empirical data distribution and the decoder marginal p(z) is usually defined to be a simple, factorized distribution, such as the standard Normal distribution p(z) = N (0, I). As such, the generative process between q(x, z) and p(x, z) is reversed.

ALI's objective is to match the two joint distributions. If this is achieved, then we are ensured that all marginals match and all conditional distributions also match. In particular, we are assured that the conditional q(z | x) matches the posterior p(z | x).

In order to match the joint distributions, an adversarial game is played. Joint pairs (x, z) are drawn either from q(x, z) or p(x, z), and a discriminator network learns to discriminate between the two, while the encoder and decoder networks are trained to fool the discriminator.

The value function describing the game is given by:

min G max D V (D, G) = E q(x) [log(D(x, G z (x)))] + E p(z) [log(1 -D(G x (z), z))] = q(x)q(z | x) log(D(x, z))dxdz + p(z)p(x | z) log(1 -D(x, z))dxdz.

(1)

Algorithm 1 The ALI training procedure. θ g , θ d ← initialize network parameters repeat x (1) , . . . , x (M ) ∼ q(x) Draw M samples from the dataset and the prior z (1) , . . . , z (M ) ∼ p(z)

ẑ(i) ∼ q(z | x = x (i) ), i = 1, . . . , M Sample from the conditionals x(j) ∼ p(x | z = z (j) ), j = 1, . . . , M ρ (i) q ← D(x (i) , ẑ(i) ), i = 1, . . . , M Compute discriminator predictions ρ (j) p ← D( x(j) , z (j) ), j = 1, . . . , M L d ← -1 M M i=1 log(ρ (i) q ) -1 M M j=1 log(1 -ρ (j) p )

Compute discriminator loss

L g ← -1 M M i=1 log(1 -ρ (i) q ) -1 M M j=1 log(ρ (j) p ) Compute generator loss θ d ← θ d -∇ θ d L d Gradient update on discriminator network θ g ← θ g -∇ θg L g

Gradient update on generator networks until convergence An attractive property of adversarial approaches is that they do not require that the conditional densities can be computed; they only require that they can be sampled from in a way that allows gradient backpropagation. In the case of ALI, this means that gradients should propagate from the discriminator network to the encoder and decoder networks.

This can be done using the the reparametrization trick (Kingma, 2013; Bengio et al., 2013b; a) . Instead of sampling directly from the desired distribution, the random variable is computed as a deterministic transformation of some noise such that its distribution is the desired distribution. For instance, if q(z | x) = N (µ(x), σ 2 (x)I), one can draw samples by computing

EQUATION

More generally, one can employ a change of variable of the form

EQUATION

where is some random source of noise.

The discriminator is trained to distinguish between samples from the encoder (x, ẑ) ∼ q(x, z) and samples from the decoder ( x, z) ∼ p(x, z). The generator is trained to fool the discriminator, i.e., to generate x, z pairs from q(x, z) or p(x, z) that are indistinguishable one from another. See Figure 1 for a diagram of the adversarial game and Algorithm 1 for an algorithmic description of the procedure.

In such a setting, and under the assumption of an optimal discriminator, the generator minimizes the Jensen-Shannon divergence (Lin, 1991) between q(x, z) and p(x, z). This can be shown using the same proof sketch as in the original GAN paper (Goodfellow et al., 2014) .

2.1. RELATION TO GAN:

ALI bears close resemblance to GAN, but it differs from it in the two following ways:

• The generator has two components: the encoder, G z (x), which maps data samples x to z-space, and the decoder G x (z), which maps samples from the prior p(z) (a source of noise) to the input space. • The discriminator is trained to distinguish between joint pairs (x, ẑ = G x (x)) and ( x = G x (z), z), as opposed to marginal samples x ∼ q(x) and x ∼ p(x).

2.2. ALTERNATIVE APPROACHES TO FEEDFORWARD INFERENCE IN GANS:

The ALI training procedure is not the only way one could learn a feedforward inference network in a GAN setting.

In recent work, Chen et al. ( 2016) introduce a model called InfoGAN which minimizes the mutual information between a subset c of the latent code and x through the use of an auxiliary distribution Q(c | x). However, this does not correspond to full inference on z, as only the value for c is inferred. Additionally, InfoGAN requires that Q(c | x) is a tractable approximate posterior that can be sampled from and evaluated. ALI only requires that inference networks can be sampled from, allowing it to represent arbitrarily complex posterior distributions.

One could learn the inverse mapping from GAN samples: this corresponds to learning an encoder to reconstruct z, i.e. finding an encoder such that

E z∼p(z) [ z -G z (G x (z)) 2 2 ] ≈ 0.

We are not aware of any work that reports results for this approach. This resembles the InfoGAN learning procedure but with a fixed generative model and a factorial Gaussian posterior with a fixed diagonal variance.

Alternatively, one could decompose training into two phases. In the first phase, a GAN is trained normally. In the second phase, the GAN's decoder is frozen and an encoder is trained following the ALI procedure (i.e., a discriminator taking both x and z as input is introduced). We call this post-hoc learned inference. In this setting, the encoder and the decoder cannot interact together during training and the encoder must work with whatever the decoder has learned during GAN training. Post-hoc learned inference may be suboptimal if this interaction is beneficial to modeling the data distribution.

2.3. GENERATOR VALUE FUNCTION:

As with GANs, when ALI's discriminator gets too far ahead, its generator may have a hard time minimizing the value function in Equation 1. If the discriminator's output is sigmoidal, then the gradient of the value function with respect to the discriminator's output vanishes to zero as the output saturates.

As a workaround, the generator is trained to maximize

EQUATION

which has the same fixed points but whose gradient is stronger when the discriminator's output saturates.

The adversarial game does not require an analytical expression for the joint distributions. This means we can introduce variable changes without having to know the explicit distribution over the new variable. For instance, sampling from p(z) could be done by sampling ∼ N (0, I) and passing it through an arbitrary differentiable function z = f ( ).

However, gradient propagation into the encoder and decoder networks relies on the reparametrization trick, which means that ALI is not directly applicable to either applications with discrete data or to models with discrete latent variables.

2.4. DISCRIMINATOR OPTIMALITY:

Proposition 1. Given a fixed generator G, the optimal discriminator is given by

EQUATION

)

Proof. For a fixed generator G, the complete data value function is

EQUATION

The result follows by the concavity of the log and the simplified Euler-Lagrange equation first order conditions on (x, z) → D(x, z).

2.5. RELATIONSHIP WITH THE JENSEN-SHANNON DIVERGENCE:

Proposition 2. Under an optimal discriminator D * , the generator minimizes the Jensen-Shanon divergence which attains its minimum if and only if q(x, z) = p(x, z).

Proof. The proof is a straightforward extension of the proof in Goodfellow et al. (2014) . 

x is determin- istic, then G x = G -1 z and G z = G -1 x almost everywhere. Sketch of proof. Consider the event R = {x : x -(G x • G z )(x)) > } for some positive .

This set can be seen as a section of the (x, z) space over the elements z such that z = G z (x).

The generator being optimal, the probabilities of R under p(x, z) and q(x, z) are equal. Now

p(x | z) = δ x-Gx(z)

, where δ is the Dirac delta distribution. This is enough to show that there are no x satisfying the event R and thus G x = G -1 z almost everywhere. By symmetry, the same argument can be applied to show that G z = G -1

x . The complete proof is given in (Donahue et al., 2016) , in which the authors independently examine the same model structure under the name Bidirectional GAN (BiGAN).

3. RELATED WORK:

Other recent papers explore hybrid approaches to generative modeling. One such approach is to relax the probabilistic interpretation of the VAE model by replacing either the KL-divergence term or the reconstruction term with variants that have better properties. The adversarial autoencoder model (Makhzani et al., 2015) replaces the KL-divergence term with a discriminator that is trained to distinguish between approximate posterior and prior samples, which provides a more flexible approach to matching the marginal q(z) and the prior. Other papers explore replacing the reconstruction term with either GANs or auxiliary networks. Larsen et al. (2015) collapse the decoder of a VAE and the generator of a GAN into one network in order to supplement the reconstruction loss with a learned similarity metric. Lamb et al. (2016) use the hidden layers of a pre-trained classifier as auxiliary reconstruction losses to help the VAE focus on higher-level details when reconstructing. Dosovitskiy & Brox (2016) combine both ideas into a unified loss function.

ALI's approach is also reminiscent of the adversarial autoencoder model, which employs a GAN to distinguish between samples from the approximate posterior distribution q(z | x) and prior samples. However, unlike adversarial autoencoders, no explicit reconstruction loss is being optimized in ALI, and the discriminator receives joint pairs of samples (x, z) rather than marginal z samples. Donahue et al. (2016) proposes the same model under the name Bidirectional GAN (BiGAN), in which the authors emphasize the learned features' usefulness for auxiliary supervised and semi-supervised tasks. The main difference in terms of experimental setting is that they use a deterministic q(z | x) network, whereas we use a stochastic network. In our experience, this does not make a big difference when x is a deterministic function of z as the stochastic inference networks tend to become determinstic as training progresses. When using stochastic mappings from z to x, the additional flexiblity of stochastic posteriors is critical.

Independent work by:



4. EXPERIMENTAL RESULTS:

We applied ALI to four different datasets, namely CIFAR10 (Krizhevsky & Hinton, 2009) , SVHN (Netzer et al., 2011) , CelebA (Liu et al., 2015) and a center-cropped, 64 × 64 version of the ImageNet dataset (Russakovsky et al., 2015) . 1 Transposed convolutions are used in G x (z). This operation corresponds to the transpose of the matrix representation of a convolution, i.e., the gradient of the convolution with respect to its inputs. For more details about transposed convolutions and related operations, see Dumoulin & Visin (2016) ; Shi et al. (2016) ; Odena et al. (2016) .

4.1. SAMPLES AND RECONSTRUCTIONS:

For each dataset, samples are presented (Figures 2a, 3a 4a and 5a). They exhibit the same image fidelity as samples from other adversarially-trained models. We also qualitatively evaluate the fit between the conditional distribution q(z | x) and the posterior distribution p(z | x) by sampling ẑ ∼ q(z | x) and x ∼ p(x | z = ẑ) (Figures 2b, 3b, 4b and 5b) . This corresponds to reconstructing the input in a VAE setting. Note that the ALI training objective does not involve an explicit reconstruction loss.

We observe that reconstructions are not always faithful reproductions of the inputs. They retain the same crispness and quality characteristic to adversarially-trained models, but oftentimes make mistakes in capturing exact object placement, color, style and (in extreme cases) object identity. The extent to which reconstructions deviate from the inputs varies between datasets: on CIFAR10, which arguably constitutes a more complex input distribution, the model exhibits less faithful reconstructions. This leads us to believe that poor reconstructions are a sign of underfitting.

This failure mode represents an interesting departure from the bluriness characteristic to the typical VAE setup. We conjecture that in the underfitting regime, the latent variable representation learned by ALI is potentially more invariant to less interesting factors of variation in the input and do not devote model capacity to capturing these factors.

4.2. LATENT SPACE INTERPOLATIONS:

As a sanity check for overfitting, we look at latent space interpolations between validation set examples (Figure 6 ). We sample pairs of validation set examples x 1 and x 2 and project them into z 1 and z 2 by sampling from the encoder. We then linearly interpolate between z 1 and z 2 and pass the intermediary points through the decoder to plot the input-space interpolations.

We observe smooth transitions between pairs of examples, and intermediary images remain believable. This is an indicator that ALI is not concentrating its probability mass exclusively around training examples, but rather has learned latent features that generalize well.

4.3. SEMI-SUPERVISED LEARNING:

We investigate the usefulness of the latent representation learned by ALI through semi-supervised benchmarks on SVHN and CIFAR10.

We first compare with GAN on SVHN by following the procedure outlined in Radford et al. (2015) .

We train an L2-SVM on the learned representations of a model trained on SVHN. The last three hidden layers of the encoder as well as its output are concatenated to form a 8960-dimensional feature vector. A 10,000 example held-out validation set is taken from the training set and is used for model selection. The SVM is trained on 1000 examples taken at random from the remainder of the training set. The test error rate is measured for 100 different SVMs trained on different random 1000-example training sets, and the average error rate is measured along with its standard deviation.

Figure 6 : Latent space interpolations on the CelebA validation set. Left and right columns correspond to the original pairs x 1 and x 2 , and the columns in between correspond to the decoding of latent representations interpolated linearly from z 1 to z 2 . Unlike other adversarial approaches like DCGAN (Radford et al., 2015) , ALI allows one to interpolate between actual data points.

Using ALI's inference network as opposed to the discriminator to extract features, we achieve a misclassification rate that is roughly 3.00 ± 0.50% lower than reported in Radford et al. (2015) (Table 1 ), which suggests that ALI's inference mechanism is beneficial to the semi-supervised learning task.

We then investigate ALI's performance when label information is taken into account during training.

We adapt the discriminative model proposed in Salimans et al. (2016) . The discriminator takes x and z as input and outputs a distribution over K + 1 classes, where K is the number of categories. When label information is available for q(x, z) samples, the discriminator is expected to predict the label.

When no label information is available, the discriminator is expected to predict K + 1 for p(x, z) samples and k ∈ {1, . . . , K} for q(x, z) samples.

Interestingly, Salimans et al. (2016) found that they required an alternative training strategy for the generator where it tries to match first-order statistics in the discriminator's intermediate activations with respect to the data distribution (they refer to this as feature matching). We found that ALI did not require feature matching to obtain comparable results. We achieve results competitive with the state-of-the-art, as shown in Tables 1 and 2 . (Zhao et al., 2015) 23.56 DCGAN + L2-SVM (Radford et al., 2015) 22.18 SDGM (Maaløe et al., 2016) 16.61

GAN (feature matching) (Salimans et al., 2016) We are still investigating the differences between ALI and GAN with respect to feature matching, but we conjecture that the latent representation learned by ALI is better untangled with respect to the classification task and that it generalizes better.

4.4. CONDITIONAL GENERATION:

We extend ALI to match a conditional distribution. Let y represent a fully observed conditioning variable. In this setting, the value function reads

min G max D V (D, G) = E q(x) p(y) [log(D(x, G z (x, y), y))] + E p(z) p(y) [log(1 -D(G x (z, y), z, y))]

(7) We apply the conditional version of ALI to CelebA using the dataset's 40 binary attributes. The attributes are linearly embedded in the encoder, decoder and discriminator. We observe how a single element of the latent space z changes with respect to variations in the attributes vector y. Conditional samples are shown in Figure 7 . 

4.5. IMPORTANCE OF LEARNING INFERENCE JOINTLY WITH GENERATION:

To highlight the role of the inference network during learning, we performed an experiment on a toy dataset for which q(x) is a 2D gaussian mixture with 25 mixture components laid out on a grid. The covariance matrices and centroids have been chosen such that the distribution exhibits lots of modes separated by large low-probability regions, which makes it a decently hard task despite the 2D nature of the dataset.

We trained ALI and GAN on 100,000 q(x) samples. The decoder and discriminator architectures are identical between ALI and GAN (except for the input of the discriminator, which receives the concatenation of x and z in the ALI case). Each model was trained 10 times using Adam (Kingma & Ba, 2014) with random learning rate and β 1 values, and the weights were initialized by drawing from a gaussian distribution with a random standard deviation.

We measured the extent to which the trained models covered all 25 modes by drawing 10,000 samples from their p(x) distribution and assigning each sample to a q(x) mixture component according to the mixture responsibilities. We defined a dropped mode as one that wasn't assigned to any sample. Using this definition, we found that ALI models covered 13.4 ± 5.8 modes on average (min: 8, max: 25) while GAN models covered 10.4 ± 9.2 modes on average (min: 1, max: 22). The ALI model in (a) does a much better job of covering the latent space (second row) and producing good samples than the two GAN models (b, c) augmented with an inference mechanism.

We then selected the best-covering ALI and GAN models, and the GAN model was augmented with an encoder using the learned inverse mapping and post-hoc learned inference procedures outlined in subsection 2.2. The encoders learned for GAN inference have the same architecture as ALI's encoder. We also trained a VAE with the same encoder-decoder architecture as ALI to outline the qualitative differences between ALI and VAE models.

We then compared each model's inference capabilities by reconstructing 10,000 held-out samples from q(x). Figure 8 summarizes the experiment. We observe the following:

• The ALI encoder models a marginal distribution q(z) that matches p(z) fairly well (row 2, column a). The learned representation does a decent job at clustering and organizing the different mixture components.

• The GAN generator (row 5, columns b-c) has more trouble reaching all the modes than the ALI generator (row 5, column a), even over 10 runs of hyperparameter search.

• Learning an inverse mapping from GAN samples does not work very well: the encoder has trouble covering the prior marginally and the way it clusters mixture components is not very well organized (row 2, column b). As discussed in subsection 2.2, reconstructions suffer from the generator dropping modes.

• Learning inference post-hoc doesn't work as well as training the encoder and the decoder jointly. As had been hinted at in subsection 2.2, it appears that adversarial training benefits from learning inference at training time in terms of mode coverage. This also negatively impacts how the latent space is organized (row 2, column c). However, it appears to be better at matching q(z) and p(z) than when inference is learned through inverse mapping from GAN samples.

• Due to the nature of the loss function being optimized, the VAE model covers all modes easily (row 5, column d) and excels at reconstructing data samples (row 3, column d).

However, they have a much more pronounced tendency to smear out their probability density (row 5, column d) and leave "holes" in q(z) (row 2, column d). Note however that recent approaches such as Inverse Autoregressive Flow (Kingma et al., 2016) may be used to improve on this, at the cost of a more complex mathematical framework.

In summary, this experiment provides evidence that adversarial training benefits from learning an inference mechanism jointly with the decoder. Furthermore, it shows that our proposed approach for learning inference in an adversarial setting is superior to the other approaches investigated.

5. CONCLUSION:

We introduced the adversarially learned inference (ALI) model, which jointly learns a generation network and an inference network using an adversarial process. The model learns mutually coherent inference and generation networks, as exhibited by its reconstructions. The induced latent variable mapping is shown to be useful, achieving results competitive with the state-of-the-art on the semisupervised SVHN and CIFAR10 tasks.

A HYPERPARAMETERS:

Operation Kernel Strides Feature maps BN? Dropout Nonlinearity Optimizer Adam (α = 10 -4 , β 1 = 0.5, β 2 = 10 -3 ) Batch size 100 Epochs 100 Leaky ReLU slope 0.01 Weight, bias initialization Isotropic gaussian (µ = 0, σ = 0.01), Constant(0) 

G z (x) -3 × 32 × 32 input Convolution 5 × 5 1 × 1 32 √ 0.0 Leaky ReLU Convolution 4 × 4 2 × 2 64 √ 0.0 Leaky ReLU Convolution 4 × 4 1 × 1 128 √ 0.0 Leaky ReLU Convolution 4 × 4 2 × 2 256 √ 0.0 Leaky ReLU Convolution 4 × 4 1 × 1 512 √ 0.0 Leaky ReLU Convolution 1 × 1 1 × 1 512 √ 0.0 Leaky ReLU Convolution 1 × 1 1 × 1 128 × 0.0 Linear G x (z) -64 × 1 × 1 input Transposed convolution 4 × 4 1 × 1 256 √ 0.

:

The code for all experiments can be found at https://github.com/IshmaelBelghazi/ALI. Readers can also consult the accompanying website at https://ishmaelbelghazi.github.io/ALI.

Figures and Tables:

(a) SVHN samples. (b) SVHN reconstructions.

Figure 2: Samples and reconstructions on the SVHN dataset. For the reconstructions, odd columns are original samples from the validation set and even columns are corresponding reconstructions (e.g., second column contains reconstructions of the first column's validation set samples).

Figure 3: Samples and reconstructions on the CelebA dataset. For the reconstructions, odd columns are original samples from the validation set and even columns are corresponding reconstructions.

Figure 4: Samples and reconstructions on the CIFAR10 dataset. For the reconstructions, odd columns are original samples from the validation set and even columns are corresponding reconstructions.

Figure 5: Samples and reconstructions on the Tiny ImageNet dataset. For the reconstructions, odd columns are original samples from the validation set and even columns are corresponding reconstructions.

Figure 7: Conditional generation sequence. We sample a single fixed latent code z. Each row has a subset of attributes that are held constant across columns. The attributes are male, attractive, young for row I; male, attractive, older for row II; female, attractive, young for row III; female, attractive, older for Row IV. Attributes are then varied uniformly over rows across all columns in the following sequence: (b) black hair; (c) brown hair; (d) blond hair; (e) black hair, wavy hair; (f) blond hair, bangs; (g) blond hair, receding hairline; (h) blond hair, balding; (i) black hair, smiling; (j) black hair, smiling, mouth slightly open; (k) black hair, smiling, mouth slightly open, eyeglasses; (l) black hair, smiling, mouth slightly open, eyeglasses, wearing hat.

Figure 8: Comparison of (a) ALI, (b) GAN with an encoder learned to reconstruct latent samples (c) GAN with an encoder learned through ALI, (d) variational autoencoder (VAE) on a 2D toy dataset.The ALI model in (a) does a much better job of covering the latent space (second row) and producing good samples than the two GAN models (b, c) augmented with an inference mechanism.

, z) -1024 × 1 × 1 input Concatenate D(x) and D(z) along the channel axis Convolution 1 α = 10 -4 , β 1 = 0.5, β 2 = 10 -3 ) Batch size 100 Epochs 6475 Leaky ReLU slope, maxout pieces 0.1, 2 Weight, bias initialization Isotropic gaussian (µ = 0, σ = 0.01), Constant(0)

Table 2 shows that ALI offers a modest improvement over Salimans et al. (2016), more specifically for 1000 and 2000 labeled examples.

Table content: <table><tr><td colspan="2">Table 1: SVHN test set missclassification rate</td></tr><tr><td>Model</td><td>Misclassification rate</td></tr><tr><td>VAE (M1 + M2) (Kingma et al., 2014)</td><td>36.02</td></tr><tr><td>SWWAE with dropout</td><td/></tr><tr><td>.</td><td/></tr></table>

CIFAR10 test set missclassification rate for semi-supervised learning using different numbers of trained labeled examples. For ALI, error bars correspond to 3 times the standard deviation.

Table content: <table><tr><td>8.11 ± 1.3</td></tr></table>

CIFAR10 model hyperparameters (unsupervised). Maxout layers(Goodfellow et al., 2013) are used in the discriminator.

Table content: <table><tr><td>G z (x) -3 × 32 × 32 input Convolution 5 × 5 Convolution 4 × 4 Convolution 4 × 4 Convolution 4 × 4 Convolution 4 × 4 Convolution 1 × 1</td><td>1 × 1 2 × 2 1 × 1 2 × 2 1 × 1 1 × 1</td><td>32 64 128 256 512 512</td><td>√ √ √ √ √ √</td><td>0.0 0.0 0.0 0.0 0.0 0.0</td><td>Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU</td></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>512</td><td>×</td><td>0.0</td><td>Linear</td></tr><tr><td>G x (z) -256 × 1 × 1 input Transposed convolution 4 × 4 Transposed convolution 4 × 4 Transposed convolution 4 × 4 Transposed convolution 4 × 4 Transposed convolution 5 × 5 Convolution 1 × 1</td><td>1 × 1 2 × 2 1 × 1 2 × 2 1 × 1 1 × 1</td><td>256 128 64 32 32 32</td><td>√ √ √ √ √ √</td><td>0.0 0.0 0.0 0.0 0.0 0.0</td><td>Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU</td></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>3</td><td>×</td><td>0.0</td><td>Sigmoid</td></tr><tr><td>D(x) -3 × 32 × 32 input</td><td/><td/><td/><td/><td/></tr><tr><td>Convolution 5 × 5 Convolution 4 × 4 Convolution 4 × 4 Convolution 4 × 4 Convolution 4 × 4</td><td>1 × 1 2 × 2 1 × 1 2 × 2 1 × 1</td><td>32 64 128 256 512</td><td>× √ √ √ √</td><td>0.2 0.2 0.2 0.2 0.2</td><td>Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU Leaky ReLU</td></tr><tr><td>D(z) -256 × 1 × 1 input</td><td/><td/><td/><td/><td/></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>512</td><td>×</td><td>0.2</td><td>Leaky ReLU</td></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>512</td><td>×</td><td>0.2</td><td>Leaky ReLU</td></tr><tr><td>D(x, z) -1024 × 1 × 1 input</td><td/><td/><td/><td/><td/></tr><tr><td colspan="5">Concatenate D(x) and D(z) along the channel axis</td><td/></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>1024</td><td>×</td><td>0.2</td><td>Leaky ReLU</td></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>1024</td><td>×</td><td>0.2</td><td>Leaky ReLU</td></tr><tr><td>Convolution 1 × 1</td><td>1 × 1</td><td>1</td><td>×</td><td>0.2</td><td>Sigmoid</td></tr></table>

SVHN model hyperparameters (unsupervised).

Table content: <table/>

Peer review (iclr2017):
After reading the rebuttal, I decided to increase my score. I think ALI somehow stabilizes the GAN training as demonstrated in Fig. 8 and learns a reasonable inference network. --------------- Initial Review: This paper proposes a new method for learning an inference network in the GAN framework. ALI*s objective is to match the joint distribution of hidden and visible units imposed by an encoder and decoder network. ALI is trained on multiple datasets, and it seems to have a good reconstruction even though it does not have an explicit reconstruction term in the cost function. This shows it is learning a decent inference network for GAN. There are currently many ways to learn an inference network for GANs: One can learn an inference network after training the GAN by sampling from the GAN and learning a separate network to map X to Z. There is also the infoGAN approach (not cited) which trains the inference network at the same time with the generative path. I think this paper should have an extensive comparison with these other methods and have a discussion for why ALI*s inference network is superior to previous works. Since ALI*s inference network is stochastic, it would be great if different reconstructions of a same image is included. I believe the inference network of the BiGAN paper is deterministic which is the main difference with this work. So maybe it is worth highlighting this difference. The quality of samples is very good, but there is no quantitative experiment to compare ALI*s samples with other GAN variants. So I am not sure if learning an inference network has contributed to better generative samples. Maybe including an inception score for comparison can help. There are two sets of semi-supervised results: The first one concatenate the hidden layers of the inference network and uses an L2-SVM afterwards. Ideally, concatenating feature maps is not the best way for semi-supervised learning and one would want to train the semi-supervised path at the same time with the generative path. It would have been much more interesting if part of the hidden code was a categorical distribution and another part of it was a continuous distribution like Gaussian, and the inference network on the categorical latent variable was used directly for classification (like semi-supervised VAE). In this case, the inference network would be trained at the same time with the generative path. Also if the authors can show that ALI can disentangle factors of variations with a discrete latent variable like infoGAN, it will significantly improve the quality of the paper. The second semi-supervised learning results show that ALI can match the state-of-the-art. But my impression is that the significant gain is mainly coming from the adaptation of Salimans et al. (2016) in which the discriminator is used for classification. It is unclear to me why learning an inference network help the discriminator do a better job in classification. How do we know the proposed method is improving the stability of the GAN? My understanding is that one of the main points of learning an inference network is to learn a mapping from the image to the high-level features such as class labels. So it would have been more interesting if the inference path was directly used for semi-supervised learning as I explained above.