Auto-Encoding Variational Bayes

Download PDF

Auto-Encoding Variational Bayes

Metadata

Compute Setup

The paper explicitly reports CPU-era compute rather than accelerator training. In the experimental section, the authors state that computation took around 20-40 minutes per million training samples on "a Intel Xeon CPU running at an effective 40 GFLOPS." No GPU, TPU, or cluster setup is listed. The experiments are therefore best read under the project rule as 2013 neural-network research sized for single-machine CPU stochastic optimization, not large-batch accelerator training.

The training configuration is correspondingly small and update-efficient. The AEVB algorithm uses minibatches of M = 100 and only L = 1 Monte Carlo sample per datapoint in the reported experiments. For the lower-bound experiments, MNIST models use encoder and decoder networks with 500 hidden units, while Frey Face models use 200 hidden units to reduce overfitting on the smaller dataset. For marginal-likelihood comparisons, the paper uses 100 hidden units and 3 latent variables because the MCMC estimator becomes unreliable at higher latent dimension.

Bottleneck

The compute bottleneck is inference, not matrix size. The paper targets latent-variable models where the marginal likelihood integral, the true posterior, and the expectations needed by mean-field variational Bayes are intractable, especially when the likelihood is parameterized by a neural network with nonlinear hidden layers. EM is not available if the posterior cannot be computed, and naive Monte Carlo gradients for the variational parameters have high variance.

The paper also treats large datasets as a compute constraint: batch optimization is too costly, while sampling-based methods such as Monte Carlo EM require an expensive sampling loop per datapoint. Appendix E gives the concrete cost of the MCEM baseline: each update cycle uses 10 HMC leapfrog steps with an automatically tuned stepsize, followed by 5 weight updates using the acquired sample. That is a poor fit for online or minibatch neural-network training, especially on the CPU setup the paper reports.

Method Adaptation

The method is a compute adaptation of variational inference to ordinary backpropagation. The recognition model q_phi(z|x) amortizes posterior inference: instead of optimizing separate variational parameters for every datapoint, one neural encoder maps each input to the parameters of an approximate posterior. The reparameterization trick then rewrites a latent sample as z = g_phi(epsilon, x), where epsilon is drawn from a fixed noise distribution. This moves stochasticity outside the differentiable path, so the lower-bound estimator can be differentiated with respect to both encoder and decoder parameters by standard automatic differentiation.

The estimator is designed to keep the sampling budget tiny. The paper notes that the KL term can often be integrated analytically, so only the expected reconstruction term needs sampling. In practice, L = 1 is enough when the minibatch is large enough, such as M = 100. That choice is central to the compute story: instead of nested posterior sampling inside every datapoint update, training becomes a minibatch forward/backward pass through two small neural networks plus one noise draw per example. The method therefore trades per-example iterative inference for a single amortized encoder evaluation.

Evidence

The empirical evidence is about convergence per training sample evaluated. On MNIST and Frey Faces, Figure 2 compares AEVB with wake-sleep across several latent dimensions. The caption states that AEVB "converged considerably faster and reached a better solution in all experiments"; estimator variance for the plotted lower bound was small, less than 1, and omitted. The horizontal axis is the number of training points evaluated, which is the right axis for the paper's CPU-era compute budget because it measures how much data-flow and gradient work is needed.

The marginal-likelihood comparison also supports the compute claim. Figure 3 compares AEVB, wake-sleep, and Monte Carlo EM on MNIST with small and larger training set sizes. The paper states that Monte Carlo EM is not an online algorithm and cannot be applied efficiently to the full MNIST dataset, unlike AEVB and wake-sleep. This matters because the VAE result is not just a better bound; it is a way to keep a latent-variable model inside the same stochastic-gradient loop used by neural networks.

The architecture and optimization choices reinforce that point. All parameters are jointly optimized with Adagrad, small weight decay, M = 100 minibatches, and L = 1 sample per datapoint. The method is presented as approximate MAP optimization of a lower bound whose gradient can be computed directly, not as a separate inference engine wrapped around a neural model.

Historical Effect

The VAE changed the compute structure of deep generative modeling by making approximate posterior inference look like standard supervised neural-network training. Earlier latent-variable methods often spent their compute inside per-example inference or sampling. AEVB moved most of that work into an amortized encoder and a differentiable stochastic objective, making latent generative models compatible with minibatches, automatic differentiation, and later accelerator-backed training loops. This is why the paper sits in the generative-media lineage even though its own experiments are small CPU runs: it supplied the training primitive that later scaled.

Limits

The limits are also compute-related. The reported experiments are small by later standards, use shallow MLP encoders and decoders, and run on an Intel Xeon CPU rather than accelerators. The estimator is for continuous latent variables; discrete variables and richer posterior families need additional machinery. The marginal-likelihood estimator is only reliable for very low-dimensional latent spaces, with the paper saying estimates became unreliable beyond the 3-latent-variable setup used in that comparison. Finally, using a simple approximate posterior and small L keeps training cheap, but it can leave posterior expressiveness and sample quality behind later generative models.

Links

  • Compute regime: history/compute_regimes/generative_media_compute/README.md
  • Source PDF and extracted text are listed in metadata above.
  • Queue status: read_complete.
  • Method index: generative_models
  • Ledger updates: compute bottlenecks