Skip to main content
QUICK REVIEW

[Paper Review] Tensor Monte Carlo: particle methods for the GPU era

Laurence Aitchison|arXiv (Cornell University)|Jun 22, 2018
Tensor decomposition and applicationsMathematics34 references4 citations
TL;DR

This paper introduces Tensor Monte Carlo (TMC), a differentiable, GPU-parallelizable method that generates exponentially many importance samples by independently drawing K samples for each of n latent variables and efficiently computing their joint expectation via tensor operations. TMC achieves tighter variational bounds and better uncertainty estimates than IWAE and SMC, with training time comparable to IWAE despite considering up to 3.2 million samples in experiments on MNIST.

ABSTRACT

Multi-sample, importance-weighted variational autoencoders (IWAE) give tighter bounds and more accurate uncertainty estimates than variational autoencoders (VAE) trained with a standard single-sample objective. However, IWAEs scale poorly: as the latent dimensionality grows, they require exponentially many samples to retain the benefits of importance weighting. While sequential Monte-Carlo (SMC) can address this problem, it is prohibitively slow because the resampling step imposes sequential structure which cannot be parallelised, and moreover, resampling is non-differentiable which is problematic when learning approximate posteriors. To address these issues, we developed tensor Monte-Carlo (TMC) which gives exponentially many importance samples by separately drawing $K$ samples for each of the $n$ latent variables, then averaging over all $K^n$ possible combinations. While the sum over exponentially many terms might seem to be intractable, in many cases it can be computed efficiently as a series of tensor inner-products. We show that TMC is superior to IWAE on a generative model with multiple stochastic layers trained on the MNIST handwritten digit database, and we show that TMC can be combined with standard variance reduction techniques.

Motivation & Objective

  • Address the poor scalability of multi-sample importance-weighted variational autoencoders (IWAE) in high-dimensional latent spaces, where required samples grow exponentially with model size.
  • Overcome the sequential, non-differentiable resampling step in sequential Monte Carlo (SMC), which hinders parallelization on GPUs and prevents gradient-based optimization.
  • Enable differentiable, high-precision estimation of marginal likelihood bounds using a structured, tensor-based computation that exploits conditional independence.
  • Develop a method that combines the strengths of SMC (robustness to poor proposals) and VAEs (differentiable training via reparameterization) for scalable deep generative modeling.

Proposed method

  • Draw K independent samples for each of n latent variables separately, rather than jointly sampling all latent variables.
  • Compute the expectation over all K^n combinations of samples using a series of tensor inner products, enabling efficient computation via dynamic programming or message-passing on factor graphs.
  • Formulate the TMC estimator as a lower bound on the log-marginal likelihood, analogous to IWAE but with exponentially many samples.
  • Leverage the reparameterization trick for gradient estimation, enabling end-to-end training with low-variance gradients.
  • Integrate with existing variance reduction techniques such as Sticking the Landing (STL), Doubly Reparameterized Gradients (DReGs), and Reweighted Wake-Sleep (RWS).
  • Use tensor operations to express the computation as a sequence of reductions on a factor graph, enabling efficient exact summation even in loopy or complex graphical models.

Experimental results

Research questions

  • RQ1Can we achieve tighter variational bounds than IWAE without incurring exponential computational cost or sacrificing differentiability?
  • RQ2Can we parallelize the computation of exponentially many importance samples across modern GPU hardware while maintaining gradient compatibility?
  • RQ3Can we efficiently compute expectations over all combinations of K samples from each of n latent variables using tensor operations?
  • RQ4Does TMC outperform IWAE and SMC in terms of log-marginal likelihood estimation and uncertainty quantification on deep generative models?
  • RQ5Can TMC be combined effectively with existing variance reduction techniques in a differentiable framework?

Key findings

  • TMC achieves significantly tighter bounds on the log-marginal likelihood than IWAE, with models trained under TMC outperforming those trained under IWAE even when evaluated under the same metric.
  • Despite considering up to 20^5 = 3.2 million samples, TMC training time was comparable to IWAE, demonstrating efficient GPU parallelization of the exponential sum via tensor operations.
  • The method enables differentiable training with low-variance gradients, unlike SMC, due to the absence of non-differentiable resampling steps.
  • TMC can be combined with variance reduction techniques such as STL and DReGs, with STL showing similar runtime to vanilla TMC and DReGs being more expensive in the authors' implementation.
  • Models trained under TMC exploited the additional flexibility of the method, as evidenced by a dramatic performance gap when evaluated under TMC versus IWAE, indicating that TMC enables better posterior approximation.
  • The tensor-based computation of TMC allows exact summation over exponentially many terms in cases with conditional independence, making it suitable for complex, loopy graphical models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.