Title: INFERENCE SUBOPTIMALITY IN VARIATIONAL AUTOENCODERS

Abstract: Amortized inference has led to efficient approximate inference for large datasets. The quality of posterior inference is largely determined by two factors: a) the ability of the variational distribution to model the true posterior and b) the capacity of the recognition network to generalize inference over all datapoints. We analyze approximate inference in variational autoencoders in terms of these factors. We find that suboptimal inference is often due to amortizing inference rather than the limited complexity of the approximating distribution. We show that this is due partly to the generator learning to accommodate the choice of approximation. Furthermore, we show that the parameters used to increase the expressiveness of the approximation play a role in generalizing inference rather than simply improving the complexity of the approximation.

1. INTRODUCTION:

There has been significant work on improving inference in variational autoencoders (VAEs) (Kingma & Welling, 2014; Rezende et al., 2014) through the development of expressive approximate posteriors (Rezende & Mohamed, 2015; Kingma et al., 2016; Ranganath et al., 2016; Tomczak & Welling, 2016; 2017) . These works have shown that with more expressive approximate posteriors, the model learns a better distribution over the data.

In this paper, we analyze inference suboptimality in VAEs: the mismatch between the true and approximate posterior. In other words, we are interested in understanding what factors cause the gap between the marginal log-likelihood and the evidence lower bound (ELBO). We refer to this as the inference gap. Moreover, we break down the inference gap into two components: the approximation gap and the amortization gap. The approximation gap comes from the inability of the approximate distribution family to exactly match the true posterior. The amortization gap refers to the difference caused by amortizing the variational parameters over the entire training set, instead of optimizing for each datapoint independently. We refer the reader to Table 1 for detailed definitions and Figure 1 for a simple illustration of the gaps. In Figure 1 , L[q] refers to the ELBO using an amortized distribution q, whereas q * is the optimal q within its variational family. Our experiments investigate how the choice of encoder, posterior approximation, decoder, and model optimization affect the approximation and amortization gaps. We train VAE models in a number of settings on the MNIST, Fashion-MNIST (Xiao et al., 2017) , and CIFAR-10 datasets.

Our contributions are: a) we investigate inference suboptimality in terms of the approximation and amortization gaps, providing insight to guide future improvements in VAE inference, b) we quantitatively demonstrate that the learned true posterior accommodates the choice of approximation, and c) we demonstrate that using parameterized functions to improve the expressiveness of the approximation plays a large role in reducing error caused by amortization.

Term:

Definition VAE Formulation Inference log p(x) -L[q] KL (q(z|x)||p(z|x)) Approximation log p(x) -L[q * ] KL (q * (z|x)||p(z|x)) Amortization L[q * ] -L[q] KL (q(z|x)||p(z|x)) -KL (q * (z|x)||p(z|x))

Table 1 : Summary of Gap Terms. The middle column refers to the general case where our variational objective is a lower bound on the marginal log-likelihood (not necessarily the ELBO). The right most column demonstrates the specific case in VAEs. q * (z|x) refers to the optimal approximation within a family Q, i.e. q * (z|x) = arg min q∈Q KL (q(z|x)||p(z|x)).

2. BACKGROUND 2.1 INFERENCE IN VARIATIONAL AUTOENCODERS:

Let x be the observed variable, z the latent variable, and p(x, z) be their joint distribution. Given a dataset X = {x 1 , x 2 , ..., x N }, we would like to maximize the marginal log-likelihood:

EQUATION

In practice, the marginal log-likelihood is computationally intractable due to the integration over the latent variable z. Instead, VAEs optimize the ELBO of the marginal log-likelihood (Kingma & Welling, 2014; Rezende et al., 2014) :

EQUATION

EQUATION

From the above we can see that the lower bound is tight if q(z|x) = p(z|x). The choice of q(z|x) is often a factorized Gaussian distribution for its simplicity and efficiency. VAEs perform amortized inference by utilizing a recognition network (encoder), resulting in efficient approximate inference for large datasets. The overall model is trained by stochastically optimizing the ELBO using the reparametrization trick (Kingma & Welling, 2014) .

2.2. EXPRESSIVE APPROXIMATE POSTERIORS:

There are a number of strategies for increasing the expressiveness of approximate posteriors, going beyond the original factorized-Gaussian. We briefly summarize normalizing flows and auxiliary variables.

2.2.1. NORMALIZING FLOWS:

Normalizing flow (Rezende & Mohamed, 2015) is a change of variables procedure for constructing complex distributions by transforming probability densities through a series of invertible mappings. Specifically, if we transform a random variable z 0 with distribution q 0 (z), the resulting random variable z T = T (z 0 ) has a distribution:

EQUATION

By successively applying these transformations, we can build arbitrarily complex distributions. Stacking these transformations remains tractable due to the determinant being decomposable: det(AB) = det(A)det(B). An important property of these transformations is that we can take expectations with respect to the transformed density q T (z T ) without explicitly knowing its formula known as the law of the unconscious statistician (LOTUS):

EQUATION

Using the change of variable and LOTUS, the lower bound can be written as:

EQUATION

The main constraint on these transformations is that the determinant of their Jacobian needs to be easily computable.

2.2.2. AUXILIARY VARIABLES:

Deep generative models can be extended with auxiliary variables which leave the generative model unchanged but make the variational distribution more expressive. Just as hierarchical Bayesian models induce dependencies between data, hierarchical variational models can induce dependencies between latent variables. The addition of the auxiliary variable changes the lower bound to:

EQUATION

where r(v|x, z) is called the reverse model. From Eqn. 8, we see that this bound is looser than the regular ELBO, however the extra flexibility provided by the auxiliary variable can result in a higher lower bound. This idea has been employed in works such as auxiliary deep generative models (ADGM, Maaløe et al. (2016) ), hierarchical variational models (HVM, Ranganath et al. (2016) ) and Hamiltonian variational inference (HVI, Salimans et al. (2015) ).

2.3. MARGINAL LOG-LIKELIHOOD ESTIMATION:

We use two bounds to estimate the marginal log-likelihood of a model: IWAE (Burda et al., 2016) and AIS (Neal, 2001) . Here we describe the IWAE bound. See Section 6.5 in the appendix for a description of AIS.

The IWAE bound is a tighter lower bound than the VAE bound. More specifically, if we take multiple samples from the q distribution, we can compute a tighter lower bound on the marginal log-likelihood:

EQUATION

As the number of importance samples approaches infinity, the bound approaches the marginal loglikelihood. This importance weighted bound was introduced along with the Importance Weighted Autoencoder (Burda et al., 2016) , thus we refer to it as the IWAE bound. It is often used as an evaluation metric for generative models (Burda et al., 2016; Kingma et al., 2016) . As shown by Bachman & Precup (2015) and Cremer et al. (2017) , the IWAE bound can be seen as using the VAE bound but with an importance weighted q distribution.

3. METHODS:



3.1. APPROXIMATION AND AMORTIZATION GAPS:

The inference gap G is the difference between the marginal log-likelihood log p(x) and a lower bound L[q]. Given the distribution in the family that maximizes the bound, q * (z|x) = arg max q∈Q L[q], the inference gap decomposes as the sum of approximation and amortization gaps:

EQUATION

)

For VAEs, we can translate the gaps to KL divergences by rearranging (2):

G VAE = KL q * (z|x)||p(z|x) Approximation + KL q(z|x)||p(z|x) -KL q * (z|x)||p(z|x)

Amortization .

(11)

3.2. FLEXIBLE APPROXIMATE POSTERIOR:

Our experimentation compares two families of approximate posteriors: the fully-factorized Gaussian (FFG) and a flexible flow (Flow). Our choice of flow is a combination of the Real NVP (Dinh et al., 2017) and auxiliary variables (Ranganath et al., 2016; Maaløe et al., 2016) . Our model also resembles leap-frog dynamics applied in Hamiltonian Monte Carlo (HMC, Neal et al. (2011) ).

Let z ∈ R n be the variable of interest and v ∈ R n the auxiliary variable. Each flow step involves:

EQUATION

where σ 1 , σ 2 , µ 1 , µ 2 : R n → R n are differentiable mappings parameterized by neural nets and • takes the Hadamard or element-wise product. The determinant of the combined transformation's Jacobian, |det(Df )|, can be easily evaluated. See section 6.2 in the Appendix for a detailed derivation.

Thus, we can jointly train the generative and flow-based inference model by optimizing the bound:

EQUATION

Additionally, multiple such type of transformations can be stacked to improve expressiveness. We refer readers to section 6.1.2 in the Appendix for details of our flow configuration adopted in the experimentation.

3.3. EVALUATION BOUNDS:

We use several bounds to compute the inference gaps. To estimate the marginal log-likelihood, log p(x), we take the maximum of our tightest lower bounds, specifically the maximum between the IWAE and AIS bounds. To compute the AIS bound, we use 100 chains, each with 500 intermediate distributions, where each transition consists of one HMC trajectory with 10 leapfrog steps. The initial distribution for AIS is the prior, so that it is encoder-independent.

For our experiments, we test two different variational distributions: the fully-factorized Gaussian q F F G and the flexible approximation q F low as described in section 3.2. When computing L VAE [q] and L IWAE [q], we use 5000 samples. To compute L VAE [q * ], we optimize the parameters of the variational distribution for every datapoint. See Section 6.4 for details of the local optimization and stopping criteria.

4. RELATED WORK:

Much of the earlier work on variational inference focused on optimizing the variational parameters locally for each datapoint, e.g. the original Stochastic Variational Inference scheme (SVI, Hoffman et al. ( 2013)) specifies the variational parameters to be optimized locally in the inner loop. Salakhutdinov & Larochelle (2010) perform such local optimization when learning deep Boltzmann machines. More recent work has applied this idea to improve approximate inference in directed Belief networks (Hjelm et al., 2015) .

Most relevant to our work is the recent work of Krishnan et al. (2017) Even though it is clear that failed inference would lead to a failed generative model, little quantitative assessment has been done showing the effect of the approximate posterior on the true posterior. Burda et al. (2016) visually demonstrate that when trained with an importance-weighted approximate posterior, the resulting true posterior is more complex than those trained with fully-factorized Gaussian approximations. We extend this observation quantitatively in the setting of flow-based approximate inference.

5. EXPERIMENTAL RESULTS:



5.1. INTUITION THROUGH VISUALIZATION:

To begin, we would like to gain some insight into the properties of inference in VAEs by visualizing different distributions in the latent space. To this end, we trained a VAE with a two-dimensional latent space on MNIST. We show contour plots of various distributions in the latent space in Fig. 2 . The first row contains contour plots of the true posteriors p(z|x) for four different training datapoints (columns). We have selected these four examples to highlight different inference phenomena.

The amortized FFG row refers to the output of the recognition net, in this case, a fully-factorized Gaussian (FFG) approximation. Optimal FFG is the FFG that best fits the posterior of the datapoint. Optimal Flow is the optimal fit of a flexible distribution to the same posterior, where the flexible distribution we use is described in Section 3.2.

Posterior A is an example of a distribution where FFG can fit well. Posterior B is an example of dependence between dimensions, demonstrating the limitation of having a factorized approximation.

Posterior C highlights a shortcoming of performing amortization with a limited-capacity recognition network, where the amortized FFG shares little support with the true posterior. Posterior D is a bimodal distribution which demonstrates the ability of the flexible approximation to fit to complex distributions, in contrast to the simple FFG approximation. These observations raise the following question: in more typical VAEs, is the amortization of inference the leading cause of the distribution mismatch, or is it the choice of approximation?

MNIST Fashion-MNIST CIFAR-10

q F F G q F low q F F G q F low q F F G q F low log p(x)

-89. Table 2 : Inference Gaps. The columns q F F G and q F low refer to the variational distribution used for training the model. All numbers are in nats.

5.2. AMORTIZATION VS APPROXIMATION GAP:

Here we will compare the influence that the approximation and amortization errors have on the total inference gap. Table 2 are results from training on MNIST, Fashion-MNIST and CIFAR-10.

For each dataset, we trained two different approximate posterior distributions: a fully-factorized Gaussian, q F F G , and a flexible distribution, q F low . Due to the computational cost of optimizing the local parameters for each datapoint, our evaluation is performed on a subset of 1000 datapoints for MNIST and Fashion-MNIST and a subset of 100 datapoints for CIFAR-10.

For MNIST, we see that the amortization and approximation gaps each account for nearly half of the inference gap. On Fashion-MNIST, which is a more difficult dataset to model, the amortization gap becomes larger than the approximation gap. Similarly for CIFAR-10, we see that the amortization gap is much more significant than the approximation gap. Thus, for the three datasets and model architectures that we tested, the amortization gap seems to be the prominent cause of inference suboptimality, especially when the difficulty of the dataset increases. This analysis indicates that improvements in inference will likely be a result of reducing amortization error, rather than approximation errors.

With these results in mind, would simply increasing the capacity of the encoder improve the amortization gap? We examined this by training the MNIST and Fashion-MNIST models from above but with larger encoders. See Section 6.1.2 for implementation details. Table 3 are the results of this experiment. Comparing to Table 2 , we see that for both datasets and both variational distributions, the inference gap decreases and the decrease is mainly due to a reduction in the amortization gap. Table 3 : Larger Encoder. The columns q F F G and q F low refer to the variational distribution used for training the model. All numbers are in nats.

MNIST Fashion-MNIST:

q F F G q F low q F F G q F low log p(x

5.2.1. INFLUENCE OF FLOWS ON AMORTIZATION GAP:

The common reasoning for increasing the expressiveness of the approximate posterior is to minimize the difference between the true and approximate, i.e. reduce the approximation gap. However, given that the expressive approximation is often accompanied by many additional parameters, we would like to know if it has an influence on the amortization error.

To investigate this, we trained a VAE in the same manner as Section 5.2. After training, we kept the generator fixed and trained new encoders to fit to the fixed posterior. Specifically, we trained a small encoder with a factorized Gaussian q distribution to obtain a large amortization gap. We then trained a small encoder with a flow distribution. See Section 6.2 for the details of the experiment. The results are shown in Table 4 . As expected, we observe that the small encoder has a very large amortization gap. However, when we use q F low as the approximate distribution, we see the approximation gap decrease, but more importantly, there is a significant decrease in the amortization gap. This indicates that the parameters used for increasing the complexity of the approximation also play a large role in diminishing the amortization error.

Variational Family q F F G q F low log p(x)

- These results are expected given that the parameterization of the Flow distribution can be interpreted as an instance of the RevNet (Gomez et al., 2017) which has demonstrated that Real-NVP like transformations (Dinh et al., 2017) can model complex functions similar to typical MLPs. Thus the flow transformations we employ should also be expected to increase the expressiveness while also increasing the capacity of the encoder. The implication of this observation is that models which improve the flexibility of their variational approximation, and attribute their improved results to the increased expressiveness, may have actually been due to the reduction in amortization error.

5.3. INFLUENCE OF APPROXIMATE POSTERIOR ON TRUE POSTERIOR:

We have seen that increasing the expressiveness of the approximation improves the marginal likelihood of the trained model, but to what amount does it alter the true posterior? Will a factorized Gaussian approximation cause the true posterior to be more like a factorized Gaussian or is the true posterior mostly fixed? Just as it is hard to evaluate a generative model by visually inspecting samples from the model, its hard to say how Gaussian the true posterior is by visual inspection. We can quantitatively determine how close the posterior is to a fully factorized Gaussian (FFG) distribution by comparing the marginal log-likelihood estimate, log p(x), and the Optimal FFG bound,

L VAE [q * F F G ].

In other words, we are estimating the KL divergence between the optimal Gaussian and the true posterior, KL (q * (z|x)||p(z|x)).

In Table 2 on MNIST, the Optimal Flow improves upon the Optimal FFG for the FFG trained model by 0.4 nats. In contrast, on the Flow trained model, the difference increases to 12.5 nats. This suggests that the true posterior of a FFG-trained model is closer to FFG than the true posterior of the Flow-trained model. The same observation can be made on the Fashion-MNIST dataset. This implies that the decoder can learn to have a true posterior that fits better to the approximation. Although the generative model can learn to have a posterior that fits to the approximation, it seems that not having this constraint, ie. using a flexible approximate, results in better generative models.

We can use these observations to help justify our approximation and amortization gap results of Section 5.2. Those results showed that the amortization error is often the main cause of inference suboptimality. One reason for this is that the generator accommodates to the choice of approximation, as shown above, thus reducing the approximation error.

Given that we have seen that the generator could accommodate to the choice of approximation, our next question is whether a generator with more capacity can accommodate more. To this end, we trained VAEs with decoders of different sizes and measured the approximation gaps. Specifically, we trained decoders with 0, 2, and 4 hidden layers on MNIST. See Table 5 for the results. We see that as the capacity of the decoder increases, the approximation gap decreases. This result implies that the more flexible the generator, the less flexible the approximate distribution needs to be. 

5.3.1. ANNEALING THE ENTROPY:

Typical warm-up (Bowman et al., 2015; Sønderby et al., 2016) refers to annealing KL (q(z|x)||p(z))

during training. This can also be interpreted as performing maximum likelihood estimation (MLE) early on during training. This optimization technique is known to help prevent the latent variable from degrading to the prior (Burda et al., 2016; Sønderby et al., 2016) . We employ a similar annealing scheme during training. Rather than annealing the KL divergence, we anneal the entropy of the approximate distribution q:

E z∼q(z|x) [log p(x, z) -λ log q(z|x)] ,

where λ is annealed from 0 to 1 over training. This can be interpreted as maximum a posteriori (MAP) in the initial phase. Due to its similarity, we will also refer to this technique as warm-up.

We find that warm-up techniques, such as annealing the entropy, are important for allowing the true posterior to be more complex. Table 6 are results from a model trained without the entropy annealing schedule. Comparing these results to Table 2 , we observe that the difference between

L VAE [q * F F G ] and L VAE [q *

F low ] is significantly smaller without entropy annealing. This indicates that the true posterior is more Gaussian when entropy annealing is not used. This suggests that, in addition to preventing the latent variable from degrading to the prior, entropy annealing allows the true posterior to better utilize the flexibility of the expressive approximation, resulting in a better trained model.

MNIST:

Fashion-MNIST 6 : Models trained without entropy annealing. The columns q F F G and q F low refer to the variational distribution used for training the model. All numbers are in nats.

q F F G q F low q F F G q F low log p(x

6. CONCLUSION:

In this paper, we investigated how encoder capacity, approximation choice, decoder capacity, and model optimization influence inference suboptimality in terms of the approximation and amortization gaps. We found that the amortization gap is often the leading source of inference suboptimality and that the generator reduces the approximation gap by learning a true posterior that fits to the choice of approximate distribution. We showed that the parameters used to increase the expressiveness of the approximation play a role in generalizing inference rather than simply improving the complexity of the approximation. We confirmed that increasing the capacity of the encoder reduces the amortization error. We also showed that optimization techniques, such as entropy annealing, help the generative model to better utilize the flexibility of the expressive variational distribution.

Computing these gaps can be useful for guiding improvements to inference in VAEs. Future work includes evaluating other types of expressive approximations and more complex likelihood functions.

The activation function is chosen to be the exponential linear unit (ELU, Clevert et al. (2015) ), as we observe improved performance compared to tanh. We follow the same learning rate schedule and train for the same amount of epochs as described by Burda et al. (2016) . All models are trained with the a batch-size of 100 with ADAM.

6.1.3 CIFAR-10 CIFAR-10 consists of a training and test dataset with 50k and 10k datapoints respectively, where each datapoint is a 32 × 32 color image. We rescale individual pixel values to be in the range [0, 1].

We follow the discretized logistic likelihood model adopted by Kingma et al. (2016) , where each input channel has its own scale learned by an MLP. For the latent variable, we use a 32-dimensional factorized Gaussian for q(z|x) following Kingma et al. (2016) . For all neural networks, ELU is chosen to be the activation function. The specific network architecture is shown in Table 9 .

We adopt a gradually decreasing learning rate with an initialize value of 10 -3 . Warm-up is applied with a linear schedule over the first 20 epochs. All models are trained with a batch-size of 100 with ADAM. Early-stopping is applied based on the performance on the held-out set.

For the model with expressive inference, we use four flow steps as opposed to only two in MNIST/Fashion-MNIST experiments.

6.2. INFLUENCE OF FLOWS ON AMORTIZATION GAP EXPERIMENT:

The aim of this experiment is to show that the parameters used for increasing the expressiveness of the approximation also contribute to reducing the amortization error. To show this, we train a VAE on MNIST, discard the encoder, then retrain two encoders on the fixed decoder: one with a factorized Gaussian distribution and the other with a parameterized 'flow' distribution. We use fixed decoder so that the true posterior is constant for both encoders. See 5.2.1 for the results and below for the architecture details.

The architecture of the decoder is: D Z -200 -200 -D X . The architecture of the encoder used to train the decoder is D X -200 -200 -2D Z . The approximate distribution q(z|x) is a factorized Gaussian.

Next, we describe the encoders which were trained on the fixed trained decoder. In order to highlight a large amortization gap, we employed a very small encoder architecture: D X -2D Z . This encoder has no hidden layers, which greatly impoverishes its ability and results in a large amortization gap.

We compare two approximate distributions q(z|x). Firstly, we experiment with the typical fully factorized Gaussian (FFG). The second is what we call a flow distribution. Specifically, we use the transformations of Dinh et al. (2017) . We also include an auxiliary variable so we don't need to select how to divide the latent space for the transformations. The approximate distribution over the latent z and auxiliary variable v factorizes as: q(z, v|x) = q(z|x)q(v). The q(v) distribution is simply a N(0,1) distribution. Since we're using a auxiliary variable, we also require the r(v|z) distribution which we parameterize as r(v|z):

[D Z ] -50 -50 -2D Z .

The flow transformation is the same as in Section 3.2, which we apply twice.

q(v 0 |z 0 ) r(v T |z T ) Input ∈ R 50

Input ∈ R 50 FC. 100-ELU-FC. 100-ELU-FC. 50+50 FC. 100-ELU-FC. 100-ELU-FC. 50+50

q(v t+1 , z t+1 |v t , z t ) σ 1 (•), σ 2 (•) µ 1 (•), µ 2 (•) Input ∈ R 50

Input ∈ R 50 FC. 100-ELU-FC. 100-ELU-FC. 50 FC. 100-ELU-FC. 100-ELU-FC. 50 Table 8 : Flow setting for MNIST/Fashion-MNIST experiments. q(v T , z T |v 0 , z 0 ) consists of two normalizing flows given in the second tabular.

6.6. THE INFERENCE GAP:

How well is inference done in VAEs during training? Are we close to doing the optimal or is there much room for improvement? To answer this question, we quantitatively measure the inference gap: the gap between the true marginal log-likelihood and the lower bound. This amounts to measuring how well inference is being done during training. Since we cannot compute the exact marginal log-likelihood, we estimate it using the maximum of any of its lower bounds, described in 3.3. Fig. 3a shows training curves for a FFG and Flow inference network as measured by the VAE, IWAE, and AIS bounds on the training and test set. The inference gap on the training set with the FFG model is 3.01 nats, whereas the Flow model is 2.71 nats. Accordingly, Fig. 3a shows that the training IWAE bound is slightly tighter for the Flow model compared to the FFG. Due to this lower inference gap during training, the Flow model achieves a higher AIS bound on the test set than the FFG model.

To demonstrate that a very small inference gap can be achieved, even with a limited approximation such as a factorized Gaussian, we train the model on a small dataset. In this experiment, our training set consists of 1000 datapoints randomly chosen from the original MNIST training set. The training curves on this small datatset are show in Fig. 3b . Even with a factorized Gaussian distribution, the inference gap is very small: the AIS and IWAE bounds are overlapping and the VAE is just slightly below. Yet, the model is overfitting as seen by the decreasing test set bounds. AIS provides the tightest lower bound and is independent of encoder overfitting. There is little difference between FFG and Flow models trained on the 1000 datapoints since inference is nearly equivalent.

6.6.1. ENCODER AND DECODER OVERFITTING:

We will begin by explaining how we separate encoder from decoder overfitting. Decoder overfitting is the same as in the regular supervised learning scenario, where we compare the train and test error. To measure decoder overfitting independently from encoder overfitting, we use the AIS bound since it is encoder-independent. Thus we can observe decoder overfitting through the AIS test training curve. In contrast, the encoder can only overfit in the sense that the recognition network becomes unsuitable for computing the marginal likelihood on the test set. Thus, encoder overfitting is computed by: L AIS -L IW on the test set.

For the small dataset of Fig. 3b , it clear that there is significant encoder and decoder overfitting. A model trained in this setting would benefit from regularization. For Fig. 3a , the model is not overfit and would benefit from more training. However, there is some encoder overfitting due to the gap between the AIS and IWAE bounds on the test set. Comparing the FFG and Flow models, it appears that the Flow does not have a large effect on encoder or decoder overfitting.

:



Figures and Tables:

Figure 1: Gaps in Inference

Figure3: Training curves for a FFG and a Flow inference model on MNIST. AIS provides the tightest lower bound and is independent of encoder overfitting. There is little difference between FFG and Flow models trained on the 1000 datapoints since inference is nearly equivalent.

Influence of Flows on the Amortization Gap. The parameters used to increase the flexibility of the approximate distribution also reduce the amortization gap. See Section 5.2.1 for details of the experiment.

Table content: <table><tr><td/><td colspan="2">84.70 -84.70</td></tr><tr><td>L VAE [q  *  ]</td><td colspan="2">-86.61 -85.48</td></tr><tr><td>L VAE [q]</td><td colspan="2">-129.83 -98.58</td></tr><tr><td>Approximation</td><td>1.91</td><td>0.78</td></tr><tr><td>Amortization</td><td>43.22</td><td>13.10</td></tr><tr><td>Inference</td><td>45.13</td><td>13.88</td></tr></table>

Increased decoder capacity reduces approximation gap. All numbers are in nats.

Table content: <table><tr><td>Generator Hidden Layers</td><td>0</td><td>2</td><td>4</td></tr><tr><td>log p(x)</td><td colspan="3">-100.52 -86.61 -83.82</td></tr><tr><td>L VAE [q  *  F F G ]</td><td colspan="3">-104.42 -84.78 -82.19</td></tr><tr><td>Approximation Gap</td><td>3.90</td><td>1.83</td><td>1.63</td></tr></table>

Peer review (iclr2018):
 ======= Update: The new version addresses some of my concerns. I think this paper is still pretty borderline, but I increased my rating to a 6. ======= This article examines the two sources of loose bounds in variational autoencoders, which the authors term “approximation error” (slack due to using a limited variational family) and “amortization error” (slack due to the inference network not finding the optimal member of that family). The existence of amortization error is often ignored in the literature, but (as the authors point out) it is not negligible. It has been pointed out before in various ways, however: * Hjelm et al. (2015; https://arxiv.org/pdf/1511.06382.pdf) observe it for directed belief networks (admittedly a different model class). * The ladder VAE paper by Sonderby et al. (2016, https://arxiv.org/pdf/1602.02282.pdf) uses an architecture that reduces the work that the encoder network needs to do, without increasing the expressiveness of the variational approximation. That this approach works well implies that amortization error cannot be ignored. * The structured VAE paper by Johnson et al. (2016, https://arxiv.org/abs/1603.06277) also proposes an architecture that reduces the load on the inference network. * The very recent paper by Krishnan et al. (posted to arXiv days before the ICLR deadline, although a workshop version was presented at the NIPS AABI workshop last year; http://approximateinference.org/2016/accepted/KrishnanHoffman2016.pdf) examines amortization error as a core cause of training failures in VAEs. They also observe that the gap persists at test time, although it does not examine how it relates to approximation error. Since these earlier results existed, and approximation-amortization decomposition is fairly simple (although important!), the main contributions of this paper are the empirical studies. I will try to summarize the main novel (i.e., not present elsewhere in the literature) results of these: Section 5.1: Inference networks with FFG approximations can produce qualitatively embarrassing approximations. Section 5.2: When trained on a small dataset, training amortization error becomes negligible. I found this surprising, since it’s not at all clear why dataset size should lead to “strong inference”. It seems like a more likely explanation is that the decoder doesn’t have to work as hard to memorize the training set, so it has some extra freedom to make the true posterior look more like a FFG. Also, I think it’s a bit of an exaggeration to call a gap of 2.71 nats “much tighter” than a gap of 3.01 nats. Section 5.3: Amortization error is an important contributor to the slack in the ELBO on MNIST, and the dominant contributor on the more complicated Fashion MNIST dataset. (This is totally consistent with Krishnan et al.’s finding that eliminating amortization error gave a bigger improvement for more complex datasets than for MNIST.) Section 5.4: Using a restricted variational family causes the decoder to learn to induce posteriors that are easier to approximate with that variational family. This idea has been around for a long time (although I’m having a hard time coming up with a reference). These results are interesting, but given the empirical nature of this paper I would have liked to see results on more interesting datasets (Celeb-A, CIFAR-10, really anything but MNIST). Also, it seems as though none of the full-dataset MNIST models have been trained to convergence, which makes it a bit difficult to interpret some results. A few more specific comments: 2.2.1: The .cdot seems extraneous to me. 5.1: What dataset/model was this experiment done on? Figure 3: This can be inferred from the text (I think), but I had to remind myself that “IW train” and “IW test” refer only to the evaluation procedure, not the training procedure. It might be good to emphasize that you don’t train on the IWAE bound in any experiments. Table 2: It would be good to see standard errors on these numbers; they may be quite high given that they’re only evaluated on 100 examples. “We can quantitatively determine how close the posterior is to a FFG distribution by comparing the Optimal FFG bound and the Optimal Flow bound.”: Why not just compare the optimal with the AIS evaluation? If you trust the AIS estimate, then the result will be the actual KL divergence between the FFG and the true posterior.